Repository navigation
feat(runtime-host): sign in to GitHub Copilot with a device grant #3390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Astro-Han
merged 48 commits into
apache:main
from
hgaol:feat/github-copilot-device-flow-login
Sep 3, 2026
Merged
Changes from 5 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
66c59b9
feat(runtime): add GitHub Copilot device-flow enrollment
hgaol 38657e4
feat(desktop): sign in to GitHub Copilot with a device grant
hgaol d13edc7
fix(runtime,desktop): move Copilot enrollment onto the Host OAuth seam
hgaol 16f6520
fix(desktop): restore the GitHub Copilot sign-in in Settings
hgaol 9fff4c6
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 5530fe2
feat(runtime-host): own GitHub Copilot enrollment end to end
hgaol 7d20e18
fix(desktop): adopt the account's own model inventory after sign-in
hgaol 53a72cb
fix(settings): show the device code on the connection re-login notice
hgaol bc44d6e
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol b5da959
fix(desktop): open an account on a model its own live list reported
hgaol 51f8282
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol df9b4b4
fix(desktop): let the selected Host decide whether a provider may enroll
hgaol 5619ced
Merge branch 'main' of github.com:apache/maka into feat/github-copilo…
hgaol 49fae7c
fix(runtime): report an unanswered Copilot entitlement check as retry…
hgaol 6c417a5
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 99ac4df
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 0685beb
test(runtime-host): claim the late-request rejection before awaiting …
hgaol 0b9ebaf
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 0cc8898
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 1d460ed
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 85abcaa
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol d2f566c
chore: add missing ASF headers on upstream plugin-composition files
hgaol a4c1fff
chore: retrigger CI (flaky slash-command-menu e2e test)
hgaol ab38b1f
Merge remote-tracking branch 'upstream/main' into feat/github-copilot…
hgaol 43cc284
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol 55d1c20
fix(runtime-host): move the compatibility epoch off a value other ope…
hgaol 2ff12f7
test(desktop): retarget the Copilot generation story at the Host sign-in
hgaol a2e6095
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol 02ee0bf
docs(astryx): regenerate the surface inventory totals
hgaol bec8187
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol 12844b0
fix(desktop): stand the local import down while a device grant is pol…
hgaol 0dbfd9d
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol f555b2d
Merge branch 'main' of https://github.com/apache/maka into feat/githu…
hgaol 4096d9d
fix(desktop): ask the Host whether Copilot may enrol before offering …
hgaol 6040b19
Merge origin/main and resolve Copilot entitlement feedback
hgaol fb4ff2f
chore(desktop): refresh renderer architecture ledger
hgaol 766c8cf
Merge origin/main into feat/github-copilot-device-flow-login
hgaol 0574002
fix(storage): admit github-copilot through the interactive OAuth enro…
hgaol c8c33b6
Merge origin/main into feat/github-copilot-device-flow-login
hgaol e5d0aea
fix(oauth): restore selected-Host authority after main merge
hgaol aa6dd35
fix(oauth): adopt local Copilot credentials through the Host
hgaol aec5dfb
Merge origin/main into feat/github-copilot-device-flow-login
hgaol 6f27b0c
refactor(desktop): route OAuth settings through the feature services …
hgaol 25d49be
chore(desktop): remove obsolete OAuth bridge surface
hgaol f859b6d
fix(storybook): bind OAuth stories through connection services
hgaol 3f07d3f
Merge origin/main into feat/github-copilot-device-flow-login
hgaol 24ded23
Merge origin/main into feat/github-copilot-device-flow-login
hgaol 9b91ae6
fix(settings): align Copilot entry copy and OAuth fixture contracts
hgaol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Keep local credential import discovery-only
Reachability: ② reasonable concurrent or multi-client path. The local adapter currently performs entitlement discovery in Desktop, then this handler reads the Host's current credential revision and commits the imported secret. If import A is waiting on model discovery while an interactive login B commits through HostOAuthCoordinator, A can resume, adopt B's latest revision as its expected value, and overwrite the newer login. A remote Host also validates the import through the Desktop network environment rather than the Host transport.
The clean final state is for Desktop to return only the locally discovered raw credential and for a Host adoption operation to own entitlement, generation/supersede, and the atomic credential commit alongside interactive login. That closes the race and preserves one network and credential authority without adding another Desktop guard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Reproduced on exact head
02ee0bf874912102984991b31ff64c588649506e: the local import can still replace a newer interactive login.I paused local import A during its Desktop-side model discovery, committed interactive login B through the Host, and then resumed A. The handler queried B's current credential revision, used that revision as the expected value, and successfully committed A's local secret over B. The observed result was
ok: true; the commit expected B's revision 2, so the compare-and-swap guard accepted the overwrite rather than rejecting stale work.The current test only covers a local import with no overlapping login. Please keep Desktop limited to discovering the local raw credential, and let a Host adoption operation own entitlement, supersession/generation, network transport, and the atomic commit alongside interactive login. That gives both paths one ordering authority.
Posted by an automated review agent operated by @M4n5ter. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.
简体中文
本条评论由 @M4n5ter 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。