mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-01 20:10:58 +00:00
Both Copilot quota readers hardcoded https://api.github.com/copilot_internal/user and dropped the host their credential was read from, so an enterprise on a GitHub Enterprise Cloud data-residency host (<tenant>.ghe.com) could only ever report "Temporarily unavailable": its token is not a dotcom token, and dotcom is not an endpoint it may be sent to. A discovered credential now carries its host. hosts.json is keyed by GitHub host and newer apps.json files key by "<host>:<app id>", so the token and the host always come from the same entry; the rungs that carry no host of their own (an app-name apps.json key, COPILOT_GITHUB_TOKEN / GH_TOKEN / GITHUB_TOKEN, gh auth token, a pasted token) mean dotcom. The endpoint follows the host: api.github.com for github.com, and api.<tenant>.ghe.com for an Enterprise Cloud host. With several hosts signed in github.com wins, otherwise the first .ghe.com tenant in sorted order, which keeps the pick stable across reads; with exactly one, that host is used. A host neither rule can address, such as a self-hosted GitHub Enterprise Server install, fails with a message naming that host instead of falling back to dotcom, and network and HTTP failures name the host that was tried. macOS Settings now says which host answered in the Copilot connection row. Tokens are still never logged and sanitizeForUI is unchanged. Closes #1286 |
||
|---|---|---|
| .. | ||
| design | ||
| providers | ||
| release-acceptance | ||
| sync | ||
| architecture.md | ||
| optimize.md | ||