Repository navigation
Description
Symptom
Every claimant.py fire that ends at the gate writes a false cap_room: 0 into the fire log:
{"timestamp": "2026-11-08T14:20:19Z", "mode": "shadow", "candidates_seen": [], "sessions_launched": [], "cap_room": 0, "skips": [{"reason": "no_candidates"}]}
But poll.py, run seconds later against the same server, reports real headroom:
cap: 36 concurrency_cap: 36 live_root: 9094 active_root: 4 cap_room: 32
Cause
claimant.py:533 hardcodes 0 in the gate-exit path:
if not has_candidates:
print("No unbound opencode-lane candidates found. Exiting.")
log_fire(mode, [], [], 0, [{"reason": "no_candidates"}])
return 0cap_step() is never reached — it runs after the gate — so the value logged is a placeholder, not a measurement.
Why it matters
cap_room in fires.jsonl is the field an operator reads to answer "was this fire idle because the fleet was full, or because nothing was eligible?" With the gate-exit path writing 0, every candidate-less fire is indistinguishable from a saturated one.
This is not hypothetical confusion: the fire log shows cap_room: 0 for the 14:05, 14:10, 14:15 and 14:20 fires on 2026-11-08 while the true cap_room was ~31-32. A reader would conclude the fleet was pinned at the 36 cap; it was at 4 active roots.
It also masks #7325. A blind-discovery fire and a genuinely-empty-queue fire both log no_candidates with cap_room: 0, so the log cannot distinguish "nothing to do" from "I could not read the queues."
Suggested fix
- In the gate-exit path, log
null(unknown) rather than0, since the cap was not measured on that path. - Optionally run
cap_step()before the gate so every fire log carries a measured cap count, and recordcandidates_seenas unknown-vs-empty.
Environment
claimant.pyat HEADf9dfb4cfa5- Laptop OpenCode server
http://127.0.0.1:13420 - Shadow mode (no
~/.local/state/opencode-claimant/mode)
Acceptance criteria
- A gate-exit fire (no candidates) logs
cap_roomas null/unknown — never a hardcoded 0 — infires.jsonl. - If the optional measured path is chosen instead, the logged value comes from
cap_step()run on that fire, and reconciles with apoll.pyreading taken at the same time. - A regression test or fixture fire proves an idle fire's log line cannot be mistaken for a saturated one.
Activity
developing-today commentedon Nov 8, 2026
CODE-2300
dezren39 commentedon Nov 8, 2026
Intake review
Related: #7325 (blind discovery — the masking interaction named in the issue); claimant siblings #7760 (zero-message gate) and #7706 (yield-field mismatch).
Live check: fresh defect filed today from the live fire log (14:05–14:20Z fires logging cap_room 0 against a true ~32); no merged fix found this run.
Notes / risks: telemetry-only, but it corrupts the operator's one signal for 'idle vs saturated' and masks #7325. Null-for-unknown is the honest encoding; a measured value is better only if the cap step's cost on every idle fire is acceptable.
Suggested approach: log null on the gate-exit path (
claimant.py:533), and record explicitly whether candidates were unknown vs empty so the two idle causes stay distinguishable.— fleet monitor (repo-fleet-monitor), 2026-11-08 10:12 CST run: acceptance criteria appended to the body, labels normalized,
meta/enrichedapplied.dezren39 commentedon Nov 8, 2026
🤖 Agent note · design-architect pass 74 — adopted as a phase of design #7770
files/designs/code-claimant-seam-contract.mdin the keep-the-four-repos-healthy goal workspace. Audit at origin/mainb64288a567.dezren39 commentedon Nov 10, 2026
🤖 Agent note · triaged
task/small-fix· priority/normal · effort/s ·kind/bugrepo-health:v1:fix:developing-today/code:issue:7732→ queuerepo-health-code-pilot, task 14535.dezren39 commentedon Nov 10, 2026
🤖 Agent note · parked — conflicting active work in the primary
5 remaining items
dezren39 commentedon Nov 10, 2026
agent-note:v1 — state: parked (awaiting CI) (task 14535, lane code-e)
Merge pull request #8123 from developing-today/queue/14535-7732-cap-r…
dezren39 commentedon Nov 10, 2026
🤖 Agent note · done (task 14535, lane code-k)
dezren39 commentedon Nov 11, 2026
🤖 Agent note · Phase 4 evidence (design #7770 closing audit, issue #7772, task 14782)
pm-stack/opencode-claimant/README.md(PR claimant: #7770 Phase 4 closing audit — seam contract, fire-log unknowns, stub-shape fix (#7772) #8367): shadow mode mutates nothing (gate insidelaunch_step); the landed launch order is create → verify location → bind → verified prompt (the opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356 resolution — a prompt that cannot be landed leaves the binding standing for supervision, superseding the design text's create → prompt → bind order, recorded in the README contract statement).-1sentinel ascap_room— nownull; a failed candidate discovery was logged identically to a verified empty queue —gate_stepnow returnsNoneon discovery failure and the fire logscandidates_seen: nullwith reasongate_unknown. Two new tests pin both (TestCapUnknownFireLog,TestGateUnknownFireLog); the full claimant suites pass (80 + 5 + 50 tests).