Repository navigation
Conversation
0538193 to
f27bc19
Compare
|
Moved to Draft: the three Copilot platform failures are the expected manifest check ( |
f27bc19 to
c7bff1f
Compare
|
I tested this head ( With provider Sessions whose provider is the alias |
A fine-grained PAT is the bearer itself and is never exchanged (_is_fine_grained_pat). refresh_pool_runtime_credentials now declines a PAT row before it evicts the exchange caches or calls exchange_copilot_token, matching the other 'never exchanged by design' branches.
…arer Pool rows now keep the raw GitHub grant, and core resolves a row's api_mode before it prepares the row, so api_mode_for_model received the grant and read the catalog with it. Exchange a GitHub grant first (the cached exchange that preparation reuses); exchanged tokens and fine-grained PATs are used as given. Restores main's test_copilot_wire_runtime expectations after the rebase.
…llings Run one- and two-row pool-only sign-ins through core's runtime resolver and AIAgent for copilot and github-copilot: an expired exchanged token renews the selected grant once, saved grants stay unchanged, a refused renewal ends the turn, and an exchange outage never sends the GitHub grant as a bearer. The github-copilot cases skip while core drops the pool for an alias spelling (probed through credential_pool_matches_provider). Harness adapted from @recoilburner's review on NousResearch/hermes-agent#154360.
copilot-api.<enterprise>.ghe.com is not in credential_pool_base_urls, and core's admission only trusts that static list, so a GHEC exchange cannot move a pool row there. Document the limitation and pin today's behaviour: the env-token setup still resolves to the enterprise endpoint through core's env path and re-exchanges after a 401, and neither selection nor renewal retargets a pool row to the GHEC origin.
c7bff1f to
ee9740c
Compare
|
Rebased onto
The earlier 180-pass result was for |
Summary
Keep the durable GitHub grant in Copilot pool rows and exchange only the selected row. The exchanged bearer and endpoint go back to core as a
PoolRuntimeCredentialinstead of overwritingentry.access_tokenandentry.base_url(the corruption in NousResearch/hermes-agent#155441).refresh_pool_runtime_credentialsrenews only the failed row's grant and never substitutes an ambient account or the raw grant. Initial resolution keeps the existing same-account raw fallback; catalog source ordering is unchanged.Changes
prepare_pool_entryexchanges at selection and returns a typed pair.refresh_pool_runtime_credentials: exact-row renewal. A fine-grained PAT is declined before any cache eviction or exchange; it is the bearer itself and is never exchanged.api_mode_for_modelreads the catalog with a pooled grant's exchanged bearer. Core resolves a row's api_mode before preparing it, so it otherwise received the raw grant.credential_pool_base_urlslists the four official*.githubcopilot.comorigins. Relays, ports, paths and lookalikes are refused at selection and at renewal.copilotandgithub-copilotwith one and two rows, adapted from @recoilburner's review on fix: keep derived pool credentials runtime-only hermes-agent#154360.Before this leaves Draft
PoolRuntimeCredential,refresh_pool_runtime_credentials,credential_pool_base_urls) must land first. No catalog repin before a compatible core release.copilot-api.<enterprise>.ghe.comcan't be listed in a staticcredential_pool_base_urls, so core refuses that endpoint for ahermes auth add copilotrow. With onlyCOPILOT_GH_HOSTset, the request then goes toapi.githubcopilot.comwith the GHEC bearer; withCOPILOT_API_BASE_URLormodel.base_urlset it reaches GHEC but isn't renewed after a 401. (Onmainsuch rows reach GHEC, but the exchanged bearer overwrites the saved grant.) The env-token setup (COPILOT_GH_HOST+COPILOT_API_BASE_URL) keeps working through core's env path and re-exchanges after a 401. Fixing this needs core to accept one exact per-user origin for the profile; asked on fix: keep derived pool credentials runtime-only hermes-agent#154360. The README documents the gap, and tests pin that neither selection nor renewal moves a row to an unlisted origin.The
github-copilotspelling recovers only once core keeps the pool for a declared alias: NousResearch/hermes-agent#160726. Without it those four cases skip; the gate probescredential_pool_matches_provider, not a version. The replay track (#78, landed via #99; core NousResearch/hermes-agent#154361) is independent.A grant that an older derived bearer already overwrote can't be recovered; that account must sign in again. No installed plugin, account or profile changes here.
Validation
Rebased onto
mainataf1cb017. One conflict, inseed_pool_credentials: kept the raw-grant seeding; #55's PAT guard inprepare_pool_entryand #96's auxiliary refresh came through unchanged.Plugin head
ee9740c, offline, synthetic credentials, isolated HOME/HERMES_HOME, Python 3.14.9:75e5f9b6f0merged with fix(credential-pool): keep a provider's pool when the session uses a declared alias hermes-agent#160726 at4e0ef61261: 342 passed; manifest validation passed.75e5f9b6f0alone: 338 passed, 4 skipped (thegithub-copilotcases).mainplugin suite on the same core: 306 passed.From
github-copilot/:CI
The workflow checks out core
main, which lacks the SDK, so the three Copilot jobs stop at manifest validation (registered no ProviderProfile at import) before pytest. This is the dependency gate, not a test failure; no test or validator was weakened to get past it.