Repository navigation
[1/4] authentication: refresh Copilot on session issuer changes - #338149
Merged
Merged
Conversation
This was referenced Sep 26, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Identity-only changes violate the legacy access-token event contract and leave code-search status stale.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Refreshes Copilot authentication when a GitHub session’s account or issuer changes without an access-token change.
Changes:
- Compares complete session identity during authentication refresh.
- Adds an issuer-only regression test.
| File | Description |
|---|---|
authentication.ts |
Detects account and issuer identity changes. |
session.spec.ts |
Tests issuer-only authentication refresh. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
Base:
|
TylerLeonhardt
marked this pull request as ready for review
September 27, 2026 05:55
TylerLeonhardt
enabled auto-merge (rebase)
September 27, 2026 05:55
Detect issuer or account identity changes even when the access token is unchanged, and notify consumers after refreshing Copilot state. Co-authored-by: Copilot <[email protected]>
Use the shared account/issuer identity comparison in the code-search subscriber while retaining session-ID invalidation and token-refresh suppression. Test real repository status refreshes for both session kinds when an issuer or account changes without a new session ID. Co-authored-by: Copilot <[email protected]>
Accept the CI-captured DarkHighContrast baseline for SessionsList_SelectedKeyboardFocus as a one-time maintainer-approved update. The maintainer reports that the visual difference is not noticeable to their eye. No UI or fixture implementation changes. Co-authored-by: Copilot <[email protected]>
TylerLeonhardt
force-pushed
the
tyleonha/ghe-stack-1-copilot-identity
branch
from
September 27, 2026 15:03
c65c3e0 to
6444d0c
Compare
Both captures after the upstream fixture rebase match the original main baseline. Remove the one-time, visually imperceptible override so the authentication PR no longer changes screenshot expectations. Playwright fixture tests passed on the unchanged-head retry. Co-authored-by: Copilot <[email protected]>
roblourens
approved these changes
Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Review stack
#338149 (1: Copilot identity) → #338150 (2: provider lifecycle) → #338151 (3: credential storage) → #338080 (4: multi-host enablement)
Each PR targets the preceding branch. Review and merge in numbered order. After squash-merging a layer, rebase and retarget the next layer onto
mainbefore merging it.Stack 1/4: Copilot identity refresh
Base:
main.Review question
Does changing a GitHub session's account or authorization server refresh Copilot authentication and identity-dependent repository state, even when its token and session ID are unchanged?
This is an independent bug fix using the session-provenance API already on main. It adds service and subscriber regressions without changing providers, configuration, credential storage, or enrollment.
Validation
The next layer (#338150) separates enterprise registration from host-bound engines while keeping current single-host behavior.
Screenshot CI follow-up
The earlier one-time screenshot override was explicitly approved by the maintainer, who reported that its two-pixel difference was not noticeable to their human eye. After rebasing onto the newer upstream fixture code, both captures in run 36328148644 matched the original upstream baseline instead. Commit
fc3e05b83c2removes the now-obsolete override; this PR no longer changes screenshot baselines.The new Playwright fixture tests initially hit render timeouts, but all 75 passed on an unchanged-head retry. No fixture implementation, UI, timeout threshold or authentication code was changed for this CI repair. Final fixture CI passed: all 75 Playwright tests, Screenshots, and Screenshots & Tests succeeded on run 36334957548 attempt 2. This PR merged on 2026-09-27.