GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session · Issue #7356 · developing-today/code Closed Labels app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/design-architectFiled by the repo design architect jobstatus/needs-triageNot yet triaged; needs a first lookstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item DescriptionSummary
# claimant.py:474-489 # Step 4d: Send prompt to bound session prompt = f""" Execute queue task {task_id} ... """ # In a real implementation, this would send the prompt via the session API # For now, we just record the successful launch launched.append({"task_id": task_id, "session_id": session_id, ...}) There is no Why this is urgent nowTwo things changed today:
A bound-but-never-prompted session is exactly the state #4758's recovery rule exists to clean up. So every launch would produce one zero-message session that supervision then has to delete and reclaim 30+ minutes later — a self-inflicted oscillating loop rather than forward progress. Also missing from the spec'd launch sequence (all zero-hit
|
| Spec step | Required | At HEAD |
|---|---|---|
| 4c | checkpoint <id> --worker <worker_id> --stage launched with session id in progress |
absent |
| 4d | send the queue runbook prompt to the bound session, --worker <worker_id> on every verb, terminal --execution {"lane":"opencode","session_id":"<id>"} |
string built, never sent |
| 4e | agent-note agent-note:v1, state=handed off, task id + session id |
absent |
| gate | skip candidates whose issue carries held / user/owned / do-not-merge / do-not-auto-edit |
absent (no label read at all) |
| gate | attempts < max_attempts before relaunch |
absent |
| §EXECUTION | single-instance lock + bounded parallel pool | absent |
On the last row: the task prompt's EXECUTION section states claimant.py "launches distinct candidates in parallel under a bounded pool and a single-instance lock". Neither exists — the loop is serial with no flock/O_EXCL/ThreadPool. Fire cadence is 10 min and a fire can take minutes, so two overlapping fires are possible and would both walk the same candidate list; the atomic bind is what keeps exactly-once, but the lock the description relies on is not there.
location: {directory}, model: {id, providerID}, agent).location.directory is verified against PRIMARY_CLONE before bind, with delete-on-mismatch.launch_step POSTs the prompt to the bound session id before recording the candidate as launched; on send failure, reconcile (read the session's messages) rather than relaunch, per the task's step 5.checkpoint --stage launched and the 4e agent-note.attempts >= max_attempts.POST to /api/session/ses_new1 occurs, and that a send error produces a reconciled skip rather than a second launch.Found by the laptop opencode-lane claimant fire 2026-11-08 (shadow). Related: #7325, #6865, #4758, #4912, #5400.
Additional acceptance criterion, found by the same fire (HEAD b5ddb39744, ~06:41Z 2026-11-08):
launch_step() never consults mode. Its mode parameter is declared and unused, and main() reaches it whenever gate_step() returns true — regardless of shadow/live. Today that is masked only because gate_step() reads poll.py, which returns zero candidates (#7325). The moment #7325 lands, a shadow fire whose gate sees candidates would create, verify-location and bind sessions, violating the packet's hard rule "never claim, bind, launch, or mutate a task in shadow mode" — and (per this issue) binding promptless sessions. supervision_step() is already mode == "live"-guarded; launch_step is the one unguarded mutation path.
Suggested fix folds into the rest of this issue: short-circuit launch_step when mode != "live". Add a test that runs main() in shadow mode with a stubbed non-empty gate and asserts zero POST /api/session and zero bind calls.
Shadow-mode finding from the 2026-11-08T06:48Z laptop fire (#3026 slice 1):
main() calls launch_step() unconditionally (claimant.py:550) and launch_step() never reads its mode argument. It creates the session, verifies location, and binds — so in shadow mode, with a working discovery path, it would mutate tasks, contradicting the packet's hard rule ("never claim, bind, launch, or mutate a task in shadow mode").
The only reason a shadow fire is a no-op today is #7325: poll.py reads queues through repo-queue list, which prints a human table, so every queue parses as empty and gate_step() is always False. Fix #7325 without this guard and the very next shadow fire launches.
The 06:48Z fire therefore did not execute claimant.py; it reproduced the same classification read-only through poll.py's own functions over the broker /list rich path (shadow-report.py / supervise-report.py in ~/.local/state/opencode-claimant/).
Suggested additions to this issue's acceptance:
main() skips launch_step() entirely when mode != "live"; test: shadow main() over a stubbed non-empty candidate list creates no session and records no bind.supervision_step returns [] for shadow, so a shadow fire reports no bound-session state at all).cap_room: 0 hardcoded (claimant.py:529) instead of the measured room, so a blind-discovery fire also reports a false saturation.🤖 Agent note · design-architect pass 74 — adopted as a phase of design #7770
files/designs/code-claimant-seam-contract.md in the keep-the-four-repos-healthy goal workspace. Audit at origin/main b64288a567.Related: #7290 (restored claimant.py's live path today, #6865); #7325 is the last discovery gate before live mode does this on every launch; siblings #7366 / #7367 (same function); the zero-message recovery gate #7760 would then reap these never-prompted sessions — the failure compounds.
Live check: body verified at HEAD 9f5a92057d — step 4d builds the prompt string and the 'In a real implementation' comment stands in for the send; no merged fix in this run's scan.
Notes / risks: urgency is sequencing, not current damage: live mode is a no-op only while discovery is blind. Land this before or with #7325/#7375, not after.
Suggested approach: implement the prompt POST using the authenticated server helper (see #7367), record send failure as launch failure, and verify against the laptop server with one live fire.
— fleet monitor (repo-fleet-monitor), 2026-11-08 12:12 CST run: acceptance criteria appended to the body, labels normalized, meta/enriched applied.
🤖 Agent note · done (already handled)
🤖 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 inside launch_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).-1 sentinel as cap_room — now null; a failed candidate discovery was logged identically to a verified empty queue — gate_step now returns None on discovery failure and the fire logs candidates_seen: null with reason gate_unknown. Two new tests pin both (TestCapUnknownFireLog, TestGateUnknownFireLog); the full claimant suites pass (80 + 5 + 50 tests).