Repository navigation
Description
What happened
When the popesdrew OpenCode Go instance was provisioned on 2026-11-03 (17:13:45Z), its console-login OAuth credential was stored in the laptop credential store under integration_id opencode instead of opencode-go.popesdrew. The route proxy matches credentials by exact leaf provider id (WHERE integration_id = <leaf provider id> AND active = 1), so every attempt on opencode-go.popesdrew failed with "no credential for provider opencode-go.popesdrew":
- 23 route attempts between 2026-11-03T18:04Z and 2026-11-04T09:00Z, all failing over to other leaves.
- The account sat at 0% usage for ~16 hours while the weighted pool config (PR routes: weighted 2:1 inside opencode-go-plans (drewrypope:popesdrew) and openai-plan (main:alternate) #5112, drewrypope 2 : popesdrew 1) was correct as deployed — the failure was invisible to quota reporting because the account simply never served.
- Compounding: the known-exhausted gate (opencode-route-proxy: known-100% seating gate — exclude legs whose binding quota window is known exhausted until reset (#4370c) #5295) kept the already-walled drewrypope account as the last-resort candidate when no credentialed candidate survived.
Fixed operationally on 2026-11-04: a copy of the credential was inserted under the correct key (opencode-go.popesdrew, active=1; original opencode row untouched), and the account immediately served 118 consecutive successful workhorse attempts, independently confirmed in the session message store.
The process gap
Provisioning a new Go instance currently ends at "rows created." Nothing asserts the instance can actually serve before it joins a weighted pool.
What's owed
Instance registration for a new opencode-go.* leaf must assert, before the instance is seated in any pool:
- A credential row exists under the exact instance integration_id (not the bare
opencodeconsole-login key), active=1. - A successful route_attempt for that leaf is recorded in the proxy ledger after seating (a real completion, not just a config reference).
- If either assertion fails, provisioning reports the instance as not-seated and the pool config change does not merge/deploy until it passes.
Watch item from the fix: if the fork's auth later rotates the token under the original opencode row, the copied row could diverge (the same pattern drewrypope runs on) — the assertion in (2) is what would catch that too, if run periodically for existing instances.
Related: PR #5112 (weighted Go pool), code#5295 (known-exhausted gate), the 2026-11-04 popesdrew 0% root-cause investigation.
Acceptance criteria
- Instance registration for a new
opencode-go.*leaf asserts, before the instance is seated in any pool, that a credential row exists under the exact instance integration_id (not the bareopencodekey) with active=1; registration fails loudly when the row is missing. - A successful route_attempt for the leaf is recorded in the proxy ledger after seating; its absence within a bounded window blocks seating or raises an alert.
- A regression test or registration-check entry covers the popesdrew failure shape (credential stored under the bare console-login key while the pool config was correct).
Activity
developing-today commentedon Nov 4, 2026
CODE-1389
dezren39 commentedon Nov 4, 2026
Intake review
opencode-go.popesdrew, account serving); what is owed is the registration-time assertion so the next instance cannot join a pool silently dead for ~16h.128 remaining items
dezren39 commentedon Nov 8, 2026
🤖 Agent note · parked (CI pending)
Resume check on task 12739: issue #5611 OPEN, PR #7566 OPEN with no labels, no review threads and no reviews, head 463df4d. Diff re-read against the packet: exact-id credential assertion, successful-attempt assertion with the retired-proxy substitution recorded, popesdrew regression fixtures, Nix timer wiring, and ci-policy/schedule-registry docs.
node --test bin/check-opencode-go-seating.test.mjs— 14/14 pass locally.All basic-tier checks have been queued since 08:44Z; the whole repo's queued workflows are still queued, so this is runner capacity, not this PR. Parked 20 minutes; on resume read fresh checks and merge when the basic tier is green with the diff unchanged.
developing-today commentedon Nov 8, 2026
state: parked
queue: repo-health-code-pilot
task: 12739 (small_fix)
by: lane code-b (worker repo-worker-code)
Correction + resume: execution-lane assignment is direct (not opencode — an earlier handed_off checkpoint this shift was set before the lane result was read and is superseded). Resumed at awaiting_ci per prior checkpoint: PR #7566 OPEN, head 463df4d matching the checkpointed pr_head, no Codex review findings (no reviews / inline comments), no held labels on PR #7566 or issue #5611, targeted tests previously 14/14 pass. Fresh CI check: all basic checks still QUEUED since 2026-11-08T08:44Z (repo-wide runner stall, same pattern as PR #3132). Parked 1200s; resume condition: merge PR #7566 when checks green, verify issue #5611 closed, complete task 12739 as fixed_merged.
developing-today commentedon Nov 8, 2026
🤖 Agent note · picked up
fix(opencode): guard Go leaf seating credentials and attempts (#5611) (…
developing-today commentedon Nov 8, 2026
🤖 Agent note · done