Repository navigation
Closed
Labels
meta/follow-upFollow-up spun out of earlier workFollow-up spun out of earlier workqueue/queuedHas a queued queue taskHas a queued queue taskstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Description
Directive (Drew, 2026-11-12)
All fleet GitHub work should be done using the fleet app, which seamlessly switches between the personal token and each of the 3 GitHub App installation tokens. Build this in two steps:
- Now: a
fleet ghsubcommand on the fleet multicall binary. It selects a token (personal PAT + the 3 App installations), exports it asGH_TOKEN, and passes every argument through to the realghbinary unchanged. On a rate-limit or permission failure it retries with the next token in the rotation instead of failing the caller. - Later: dedicated higher-level tools (project sync, queue sync, etc.) built on top of the same rotation, so callers stop shelling out to raw gh at all.
Why
- Project reconciliation (single writer to Project Bump build/buck/preludes/buck2-prelude from
3a02ea3to9530656#4) currently runs on the single fine-grained PATgithub.project-token(Projects read/write only, no repository access). On 2026-11-12 it partially failed: milestone writes were refused with "Resource not accessible by personal access token" — 6 updates landed, 49 left pending (tracker: fix(orchestrator): project-reconcile.sh times out over ~200 items — make the bounded pass the standard path #1408). - The user token has hit GitHub secondary rate limits mid-shift repeatedly (content creation blocked); App installation tokens carry separate rate-limit buckets and broader repo permissions.
- Today every caller picks its own token ad hoc (reconcile script fetches the PAT by name; paperwork mints App tokens separately — see also the closed fleet-paperwork: installations() fetches only page 1 of /app/installations — with 103 installations the developing-today org is page 2, so every App-route write fails 'no installation found' #7930 pagination break in that path). One rotation point ends the ad-hocery.
Acceptance
fleet gh <args...>behaves exactly likegh <args...>(stdout/stderr/exit code passthrough) with a working token selected.- Rotation covers the personal token and all 3 App installations; a rate-limited or permission-denied attempt fails over to the next token and the caller sees only the final result.
- Tokens are resolved by name from the fleet secrets broker at runtime; no token value is ever printed, logged, or written to a file.
project-reconcile.shis rewired to callfleet ghinstead of fetchinggithub.project-tokendirectly, and a full reconcile pass completes with zero "Resource not accessible" failures.- The follow-on (higher-level sync tools) is filed as its own issue when step 1 lands; this issue covers step 1 + the reconcile rewire.
Metadata
Metadata
Assignees
Labels
meta/follow-upFollow-up spun out of earlier workFollow-up spun out of earlier workqueue/queuedHas a queued queue taskHas a queued queue taskstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this item
Activity
developing-today commentedon Nov 12, 2026
CODE-2689
dezren39 commentedon Nov 12, 2026
Dropped-thread catcher (2026-11-12T09:31Z run): this issue was filed from Drew's directive in the orchestration chat after the board sync failed two passes in a row on the milestone PAT error (tracked on #1408), but it carried only
meta/follow-up— no queue label and no task label, so no fleet lane was ever going to pick it up. Launched in place:task/triage+queue/queuedadded and verified by read-back, so the repo-health-code-pilot feeder enqueues the triage/build of thefleet ghpassthrough.fleet gh: silent by default — failover notes only under FLEET_GH_TRACE (
Merge pull request #9014 from developing-today/fleet-gh-8887
dezren39 commentedon Nov 12, 2026
Implemented — PR #9014 (merged,
febd7fa921)fleet ghis a domain in the fleet multicall binary (full build): it runs the realghwith every argument unchanged, exports a broker-resolved token asGH_TOKENper attempt, and returns the final attempt's stdout/stderr/exit code byte-exact (rotation is silent by default;FLEET_GH_TRACE=1names each attempt's source on stderr).Rotation (tokens resolved by name from the fleet secrets broker at runtime; never printed, logged, or written to files):
ghOAuth token, parsed out of the broker secretgithub-cli.hosts-yml;github-app.developing-today-fleet.private-key; a different App from the paperwork one, whose key lives only in sops) for ownersdeveloping-today,developing-today-forks,dezren39. The JWT is RS256-signed via systemopensslwith the key passed on an inherited fd (never on disk, never in argv); installations are resolved live fromGET /app/installations, paginated (the fleet-paperwork: installations() fetches only page 1 of /app/installations — with 103 installations the developing-today org is page 2, so every App-route write fails 'no installation found' #7930 lesson). A call naming a repo/org leads the App leg with that owner's installation, since installation tokens are scope-bound.Retry-safety rule (as built): a write is repeated under a fresh token only when the failure proves GitHub refused it before processing — rate-limit rejections (the limiter answers before the mutation runs) and permission/scope rejections (INSUFFICIENT_SCOPES, "Resource not accessible by …", "missing required scopes"). Any other failure of a write is returned as-is, so a retry can never double-post. Reads repeat on any failure class while tokens remain. Failure classification keys on gh/GitHub's observed refusal strings.
Reconcile rewire:
project-reconcile.shnow callsfleet ghfor all Project reads/writes. It no longer fetchesgithub.project-token; the probe-gated paperwork ladder is deleted. The outbox leg survives for the all-buckets-spent case, andRECONCILE_FORCE_LIMITstill exercises it.Acceptance evidence (2026-11-12)
gh.rs(failure classification, retry gate, read-only whitelist, rotation order + owner hint, hosts.yml parse, base64url vectors, fake-ghend-to-end failover + write-not-repeated). Fullcargo test -p fleet -p fleet-registrygreen (41 bin + 5 registry + integration suites).projectscope refresh, so the personal attempt onproject field-listfails with a scope refusal → failover → thedeveloping-todayinstallation serves the real Project Bump build/buck/preludes/buck2-prelude from3a02ea3to9530656#4 field list. (Ops note: the broker's storedgithub-cli.hosts-ymlshould be re-stored from a refreshed hosts.yml so the personal leg carriesprojectagain; the rotation covers its absence meanwhile.)FLEET_GH_ORDER=app:dezren39,app:developing-todayon a Project Bump build/buck/preludes/buck2-prelude from3a02ea3to9530656#4 read — the user-installation attempt fails, the org installation serves the call.fleet gh(rewired script, apply mode): 113 proposals, 113 applied live, 0 queued, zero "Resource not accessible" failures — the failure class that stranded 49 updates under the old PAT (see fix(orchestrator): project-reconcile.sh times out over ~200 items — make the bounded pass the standard path #1408). Auto-adds landed for all 11 then-unboarded epics (epic: GitHub and dynamic compute — rulesets, CI capacity, and elastic compute across the orgs #8985–epic: mcpx — one canonical MCP gateway and server parity #8993, opencode#2319, openchamber#2153 — verified on the board by paginated GraphQL). One wart found and fixed in the same run: the script parses item-add JSON out of a merged 2>&1 capture, which the rotation's stderr notes polluted —fleet ghis now silent by default (note above), restoring byte-exact passthrough; the adds' Status/Kind sets, skipped that pass, are picked up by the next pass's normal sync.~/.local/bin/fleeton the laptop (previous binary kept asfleet.bak-20261112-pre-gh). Note for future installers: another lane's reinstall briefly replaced it with a main build during this run — from this merge on, main builds carry theghdomain, so the normal rebuild flow keeps it.Step 2 (higher-level sync tools on the rotation) is filed as #9016, per this issue's two-step shape.
One pre-existing defect observed, deliberately not fixed here: the reconcile pass's
ITEM_LIMIT=1000now truncates the item list (the project holds 1,229 items), so its presence checks and proposals cover only the first 1,000. It predates this rewire and belongs to the #910/#1408 tracker line.dezren39 commentedon Nov 12, 2026
Follow-up from the acceptance note: the broker's stored
github-cli.hosts-ymlhas been re-stored from the current sandbox~/.config/gh/hosts.yml(the copy refreshed 2026-11-12 ~14:08 CST with theprojectscope).Route used: the
fleet secretsclient exposes get/list only; the broker is a read-through cache whose store of record is the Bitwarden vault. The write therefore used the repo's established pattern for this key (pkgs/agent-backup/bws-backup-secrets.sh): replace the vault entry forgithub-cli.hosts-ymlin place (delete + recreate in the same project, updated note), with a round-trip SHA-256 check against the source file — the stored value differed before the rewrite and matches after. A brokerPOST /refreshwas then triggered, andfleet secrets get github-cli.hosts-ymlnow hash-matches the current file.Verification (laptop, personal leg only, no failover — trace showed a single attempt under
personalfor each):FLEET_GH_ORDER=personal FLEET_GH_TRACE=1 fleet gh api user --jq .login→dezren39FLEET_GH_ORDER=personal FLEET_GH_TRACE=1 fleet gh project view 4 --owner developing-today --format json→ Project Bump build/buck/preludes/buck2-prelude from3a02ea3to9530656#4 "Developing Today",closed: falseSo the personal leg now presents the refreshed token with project scope directly; rotation no longer has to cover this gap via the App.
Merge pull request #9054 from developing-today/feat/fleet-gh-apps-tiers
developing-today-fleet commentedon Nov 12, 2026
Done — landed and verified 2026-11-12.
What shipped
fleet ghpassthrough with tiered token rotation: PR fleet gh: passthrough with personal + App token rotation (#8887) #9014 (queue lane implementation), extended by PR fleet gh: rotate all three fleet Apps, add tiers probe, platform-verifier TLS roots (#8887) #9054 (merged 22:10Z, merge commit 7439665): the rotation is now personal token first, then installation tokens of all three fleet Apps — developing.today fleet (5612056), developing.today, developing-today-backup — resolved live per owner (developing-today, developing-today-forks, dezren39). Writes repeat only on pre-execution refusals (rate limit / permission); reads repeat on any failure.fleet gh tiersprobes every source's core + GraphQL headroom.fleet gh(no more Projects-only PAT identity, no paperwork minting ladder).Verified live (sandbox, 2026-11-12 ~22:15Z)
fleet gh tiers: all 7 sources up — personal core 4146/5000 graphql 3083/5000; app:developing-today 5000/5000; app:developing-today-forks 5000/5000; app:dezren39 12500/12500; devtoday:developing-today 4881/5000; devtoday:dezren39 12493/12500; backup:developing-today 6850/6850.fleet gh, readback Done.3a02ea3to9530656#4 by readback.