Repository navigation
Description
Origin: Codex P2 review finding on PR #1384 (merged 2026-11-02 as f7b4c02), thread on packages/core/src/model-route.ts (line 541 at head 4794119), left unresolved at merge. Verified still present on current main by queue task 6188 (lane A, 2026-11-02).
Problem
When two pool members carry quota benches and a trusted reset is learned after those benches were created, armBenchProbe (packages/core/src/model-route.ts ~line 451) makes them probe-eligible at the reset without shortening their cooldowns — the existing half-open recovery path. But quotaOut (~line 546) / poolQuotaExhausted (~line 609) still count both leaves as quota-out until their original cooldowns expire, so the pool verdict stays exhausted and the resolver excludes every member, including the due probes, from both normal selection and the all-full last resort. A recovered pool can stay unavailable until the escalated cooldown expires (up to 24 hours), defeating the probe path.
Fix direction (from the Codex finding)
Account for due probes when applying the pool exclusion: a leaf whose bench probe is due (probeDueState, ~line 459) should not count toward the pool-exhaustion threshold (or the exclusion should admit the due probe), while a claimed/outstanding probe and not-yet-due benches keep counting.
Acceptance
- With two pool leaves quota-benched and a trusted reset learned, once the reset passes the pool is no longer excluded as a whole: the due probe leaf is selectable for its half-open probe.
- Before the reset, or while a probe is already claimed, the pool exclusion still applies.
- New regression test beside packages/core/test/model-route.test.ts pool-shaped tests demonstrating the due-probe case.
- packages/core model-route + model-resolver suites pass; typecheck clean.
Part of the #1014 PR3 follow-up set; does not reopen #1014's other routed packets.
Acceptance criteria
- With two pool leaves quota-benched and a trusted reset learned, once the reset passes the pool is no longer excluded as a whole: the due-probe leaf is selectable for its half-open probe.
- Before the reset, or while a probe is already claimed, the pool exclusion still applies.
- A new regression test beside
packages/core/test/model-route.test.tspool-shaped tests demonstrates the due-probe case. - packages/core model-route and model-resolver suites pass; typecheck is clean.
Activity
dezren39 commentedon Nov 2, 2026
Intake review
Origin: Codex P2 finding on PR #1384 (merged 2026-11-02 as f7b4c02), thread at model-route.ts line 541, left unresolved at merge and verified still present on current main by queue task 6188. Part of the #1014 PR3 follow-up set (sibling: #1389, the shared-gate counting flaw in the same functions). Still live. Risks: a recovered pool can stay unavailable up to 24h, defeating the half-open probe path that exists precisely to avoid that. Suggested approach: exclude due-probe leaves (
probeDueState) from the pool-exhaustion count, keeping claimed/not-yet-due benches counted.— fleet monitor intake enrichment (protocol §5), 2026-11-02 run. Original body preserved verbatim above the appended acceptance-criteria section.
dezren39 commentedon Nov 2, 2026
Triage evidence — issue-sweep-rotating feeder, 2026-11-02
Verified still present on current main
5724210481d2viagh apiraw read ofpackages/core/src/model-route.ts:poolQuotaExhausted(:638-652) builds the out-set purely fromquotaOut(...)per leaf and returnsout.size >= POOL_QUOTA_LEAVES— there is no probe-due carve-out anywhere in the function.quotaOut(:577) returns true for a quota-benched leaf without consultingprobeDueState(:488), even thougharmBenchProbe(:480) deliberately arms due probes at a learned reset via the half-open path.So a leaf whose bench probe is due still counts toward pool exhaustion: with two benched leaves the pool verdict stays exhausted and the resolver excludes every member — including the due probes — from normal selection and the all-full last resort, exactly as the issue describes (Codex P2 on PR #1384, thread at model-route.ts:541 at head
4794119cf5, unresolved at merge).Done looks like (per the issue's acceptance): once a trusted reset passes, the due-probe leaf no longer counts toward the pool-exclusion threshold and is selectable for its half-open probe; before the reset or while a probe is claimed, exclusion still applies; new regression test beside the pool-shaped tests in
packages/core/test/model-route.test.ts; model-route + model-resolver suites pass, typecheck clean.Enqueued as a triage packet to the
repo-health-opencode-pilotqueue by this feeder run. Sibling: #1389 (shared-gate counting in the same functions).dezren39 commentedon Nov 2, 2026
🤖 Agent note · queued
repo-health-opencode-pilot(deduperepo-health:v1:triage:developing-today/opencode:issue:1390). Evidence comment: fix(core): pool quota exclusion defeats due bench probes — probe-eligible leaves stay excluded until the escalated cooldown expires (PR #1384 Codex P2 unaddressed) #1390 (comment) (verified on main 5724210).2 remaining items
dezren39 commentedon Nov 3, 2026
Handed off (queue task 6620): execution lane assigned opencode by repo-queue lane assignment; the laptop opencode-claimant will launch a bound session for this task. Prior revalidation (task progress): issue OPEN, packet accurate on main, no competing PR, no held/Drew-owned labels.
dezren39 commentedon Nov 3, 2026
agent-note:v1 — state: handed off
Queue task anomalyco#6620 is handed to OpenCode for execution.
ses_e5e61299126ffe28pZWNBl5yIsopencoderepo-worker-opencodedezren39 commentedon Nov 3, 2026
agent-note:v1
state: reviewed (coverage loop-back)
Coverage pass 2026-11-03, loop-back review: this issue was re-reviewed (drift / overlap / already-handled / stale / blockers / ordering) so every open issue in the four repos is reviewed and in the system. Verdict: still live; in the system as task 7146 (triage, queued, priority 40) in repo-health-opencode-pilot. Labels audited and synced. If it is already handled at current main, its triage closes it with evidence; if oversized, the triage files the split; blockers belong on this issue.
Found via: coverage loop-back 2026-11-03
dezren39 commentedon Nov 3, 2026
🤖 Agent note · triaged — fix in flight on PR #1473, blocked on conflict + Codex P2
poolQuotaExhaustedcarves out due probes, resolver ready + last-resort paths admit a due-probe leaf, regression tests in both suites.model-route.ts— the unconditional due-probe carve-out can drop an independently quota-gated leaf (later known-full reset / balance hold) from the exhaustion count; the carve-out must only apply when the probe's own gate is the one that is due. Per the fleet Codex gate, the PR cannot merge until that finding is fixed or answered.dezren39 commentedon Nov 7, 2026
🤖 Agent note · check-in
status/in-progress+work/assigned(holder: repo-queue-worker-shift-opencode, per the latest agent note) with efforteffort/s(2h expectation). The last checkpoint here is 2026-11-03 and the linked fix PR fix(core): let due bench probes recover quota-exhausted pools #1473 was last updated 2026-11-05 — past the check-in threshold.dezren39 commentedon Nov 8, 2026
Partial verification — staying open (2026-11-07 done-task-only audit, tracking: developing-today/code#7016).
Queue task(s) [7146, 6620] were marked done, and some work did land:
No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11494.