GeezerVison is showing github.com — fix(fleet-hosted): fail over token exchange refusals by developing-today-fleet[bot] · Pull Request #16101 · developing-today/code
Conversation
Summary
- Treat GitHub rate-limit and permission refusals from
/access_tokens as per-installation rotation failures.
- Keep other exchange errors and malformed token responses fail-closed before any write.
- Add coverage for refusal failover, non-failover exchange errors, and malformed token responses.
Verification
- Fleet run
dezren39/fleet#45984690324: package typecheck and test/github.test.ts command completed successfully; awaiting GitHub Actions post-command cleanup to reach terminal status.
Closes #16079
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-27T10:52:44Z",
"session_id": null,
"lane": null,
"host": "amd",
"worktree": "/home/user/git/fleet/fleet-16079-20261127T102817Z-de82a9fb",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/fleet/fleet-16079-20261127T102817Z-de82a9fb",
"repo": "developing-today/code",
"branch": "agent-next-22-local/16079-token-exchange-failover",
"sha": "4fc6f2b03444e7029e107fc282d446ecbce964d4"
},
"auth_subject": "oc-code-05",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
db292933-188b-4bfc-85b6-7d61bd3f5a4a
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Lane 0452-C (agent work loop SUSTAIN bravo, 2026-11-27) — verify-then-merge evidence for head 4fc6f2b03444e7029e107fc282d446ecbce964d4:
- Claim scan: PR body + all comments (only coderabbit bot review-skipped comment) and issue fleet-hosted: fail over when an installation token exchange is refused #16079 comments (author bot's implementation note only) — no live sibling claim; head unchanged /
updated_at stable at 2026-11-27T10:52:53Z across repeated reads, so the author is not live-iterating.
- Diff read-through:
pkgs/fleet/hosted-worker/src/github.ts (+38/-5) reuses the pre-existing isFailoverRefusal helper (defined at line 565 on this head) so /access_tokens rate-limit/permission refusals return a per-installation refusal and rotation continues in all four call loops; other exchange errors and malformed token bodies (empty token / unparseable expires_at / invalid JSON) stay fail-closed before any write. Tests (+65/-1) cover refusal failover, non-failover 500 stopping before any write, and malformed token stopping before any write — matches the PR body.
- Exact-head evidence: fleet run
dezren39/fleet#45984690324, job 140457227110 log re-read via gh api: Target HEAD: 4fc6f2b03444e7029e107fc282d446ecbce964d4; command cd pkgs/fleet/hosted-worker && npm install --no-package-lock --ignore-scripts && npm run typecheck && node --experimental-transform-types --test test/github.test.ts — typecheck (tsc --noEmit) passed, tests 17 / pass 17 / fail 0, command step outcome=success. The run itself remains in_progress in post-command cache cleanup (the known fleet-command cleanup hang noted in the PR body), but the command step is terminal-success on the exact head.
Merging under standing merge authority.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|