GeezerVison is showing github.com — opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed · Issue #6865 · developing-today/code
opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865DescriptionProblem
pm-stack/opencode-claimant/claimant.py — the opencode lane claimant/executor — calls two modules it never imports at module level, so in live mode its two active steps can never do their work:
requests is used at lines 197, 226, 252 (supervision_step: session GET, messages GET, session DELETE) and 392, 407, 432 (launch_step: session POST, cleanup DELETEs) but is never imported (imports at lines 18–24 are only json, os, sys, time, datetime, pathlib, typing). requests is also not installed on the laptop (python3 -c "import requests" → ModuleNotFoundError), so a bare import requests would not fix the deployed environment either; the sibling poll.py in the same directory does its HTTP with stdlib urllib.request.
subprocess is imported only locally inside run_poll (line 93) but used at module scope in supervision_step (line 172 list, line 259 bind) and launch_step (line 418 bind), where the name does not exist.
Every failure is swallowed by the broad except Exception handlers around these steps, so nothing crashes and nothing is logged as an error:
- Supervision: the per-queue
subprocess.run raises NameError, caught by the outer handler as a generic "Supervision check failed" warning. Even with that fixed alone, the session check requests.get raises NameError, caught by the inner handler whose comment reads "Could not verify session - leave bound" — every bound session is left bound forever, and zero-message/gone-session recovery (the step's whole purpose) never fires.
- Launch: the session-create
requests.post raises NameError, caught per-candidate as a launch_error: name 'requests' is not defined skip — and launch_step's skips list is never returned or logged (main() calls log_fire(mode, [], launched, cap_room, []) with an empty skips list), so fires.jsonl records only "Launched 0" with no reason. Even past that, the bind subprocess.run would raise the same way.
Evidence (verified this run, laptop, main @65beb42c1a)
Probe ~/git/fleet/probe-claimant-requests (real claimant.py copied verbatim; transport and queue CLI stubbed):
Related: #6533 (handed-off tasks are never launched — executed_lane/session_id stay null). #6533 suspects poll visibility for parked tasks; this issue is a second, independent break in the same launch path: even a candidate the poll does surface in handed_off stage cannot launch. Both need fixing for a handoff to result in a session.
Why it matters
The claimant is the component that turns handed-off opencode-lane queue tasks into running sessions and recovers dead bound sessions. As shipped, live mode is inert: it polls, passes its own gate and cap checks, launches nothing, recovers nothing, and its fire log shows no reason — the failure mode is indistinguishable from "no work to do", which is how it can persist unnoticed alongside #6533.
Acceptance criteria
-
claimant.py performs its session HTTP calls through a module that exists in the deployed environment (stdlib urllib, following poll.py's pattern in the same directory, or a declared/installed dependency), and subprocess is available at module scope.
- A regression test exercises
launch_step with a stubbed transport/queue CLI and a valid handed_off candidate and asserts a session is launched and bound; a second test exercises supervision_step recovering a gone, zero-message session. The suite is wired into pm-stack-tests.yml alongside test_poll.py.
-
launch_step's skips are returned and recorded in the fires.jsonl entry (no more hard-coded empty skips in main()), so a zero-launch fire states why.
- Negative control: the new tests fail against the pre-fix
claimant.py.
Activitydeveloping-today commented on Nov 7, 2026 added task/triageQueue packet kind: verify, reproduce, and route this item kind/bugSomething isn't working (prefixed form of the classic bug label) effort/sSmall: expected under 2 hours of work on Nov 7, 2026dezren39 commented on Nov 7, 2026 🤖 Agent note · filed
- Agent: new-issue-creator (lane B, new-issue-creator-code-b)
- Session / ID: cron new-issue-creator-code-b, run 2026-11-07 04:20 CST
- Found via: filed this run
- Task: claimant.py live supervision + launch steps can never run (requests/subprocess never imported at module scope; requests not installed on the laptop); failures swallowed by broad excepts and unlogged skips. Verified on the laptop @65beb42c1a with probe ~/git/fleet/probe-claimant-requests (real file verbatim, stubbed transport/queue CLI): launch [] as shipped vs 1 session with stubs injected; supervision recovers only with both names present. Cross-linked opencode-claimant: handed-off tasks are never launched — executed_lane/session_id stay null across repeated claim→handed_off→park cycles #6533 (second independent break in the same launch path).
- Expectation: effort/s — fix the HTTP/subprocess access (poll.py urllib pattern), add claimant tests wired into pm-stack-tests.yml, and record launch skips in fires.jsonl. Done when the acceptance criteria in the issue body hold.
- Links: queue packet enqueued this run (repo-health-code-pilot)
dezren39 commented on Nov 8, 2026
🤖 Agent note · triage complete (task 11099, lane code-a)
- Agent: repo queue worker, Lane A (repo-worker-code-a)
- Session / ID: cron repo-queue-worker-shift, run 2026-11-07 18:00 CST; queue task 11099
- Verdict: CONFIRMED at filing, SUPERSEDED-AND-REGRESSED on current main — the live claimant code is gone, not fixed.
- Evidence (fresh this run, laptop, origin/main @9dae02a921):
- At the filing commit 65beb42 the issue was exact: claimant.py was 528 lines,
requests. used at :197/:226/:252/:392/:407/:432 with no import, subprocess imported only locally in run_poll.
- Snapshot commit 0558a48 (2026-11-07 16:25Z, repo-keeper) partially addressed it: session HTTP moved to stdlib
urllib helpers and subprocess imported at the top of supervision_step/run_poll. But main() still called log_fire(mode, [], launched, cap_room, []) with hard-coded empty skips (:550), and no claimant test suite was added — acceptance items 2 and 3 stayed unmet.
- Snapshot commit d0703e8 (2026-11-07 23:29Z, repo-keeper, on current main) then REGRESSED the whole package: claimant.py 555 → 307 lines (back to the Slice-1 shadow stub —
supervision_step returns [] in live mode, launch_step only simulates, no session HTTP at all), test_poll.py (438 lines) DELETED, README rewritten. Current main therefore has no requests bug because it has no live launch/supervision implementation at all — live mode is inert by construction, which is the same user-visible failure this issue filed, by a worse mechanism.
- Collateral:
.github/workflows/pm-stack-tests.yml still asserts pm-stack/opencode-claimant/test_poll.py exists and fails the job if missing; the workflow only triggers on external-comms paths, so the deletion can sit silent.
- Routing: follow-up fix task enqueued (kind small_fix, dedupe
repo-health:v1:fix:developing-today/code:issue:6865): restore the claimant package from d0703e8^ (the 555-line urllib version, including test_poll.py), then finish the original acceptance — skips returned and recorded in fires.jsonl, a test_claimant suite for launch_step/supervision_step wired into pm-stack-tests.yml, negative control against the pre-fix file. The keeper-snapshot regression mechanism itself (a stale checkout snapshot overwriting newer main work, cf. closed opencode-claimant(poll/claimant): snapshot rewrite dropped poll.py's test-pinned cap API (36/36 tests error) and inverted cap_room — idle reads as saturated, busy launches unbounded #6609 for the same pattern) is named in the follow-up packet as a lead, not folded into its scope.
- Issue state: left OPEN — the underlying defect (claimant cannot launch/recover in live mode) is still true on current main.
developing-today commented on Nov 8, 2026
Agent note — PR opened, parked on CI (lane code-u, task 11370, 2026-11-07)
PR #7290 restores the live claimant package from d0703e82ce^ (claimant.py 555 lines, test_poll.py, README) and finishes this issue's acceptance: module-scope subprocess, the supervision zero-message check fixed to read the curl result, error-body session GETs treated as gone sessions, str(task_id) in bind argv, and launch_step returning (launched, skips) with main() recording real skips in fires.jsonl. New test_claimant.py (6 tests) is wired into pm-stack-tests.yml, which now also triggers on pm-stack/opencode-claimant/** changes.
Verification so far: laptop worktree — test_poll.py + test_claimant.py = 53 tests OK; negative control — the new suite fails against both the pre-fix 65beb42c1a claimant.py and the 307-line shadow stub. One reconciliation inside the restoration: TestFetchClaimedRows pinned the broker-HTTP transport #5419 deliberately replaced, so that class was rewritten against the current repo-queue CLI transport.
Task 11370 is parked for 20 minutes on CI pending (all checks still pending at the 5-minute poll boundary). On resume: read PR #7290 checks fresh, disposition any Codex findings, merge when green under the standing criteria, then complete the task. developing-today commented on Nov 8, 2026 🤖 Agent note · parked
- Agent: queue worker (repo-worker-code), lane code-u
- Session / ID: task 11370
- Found via: queue claim (resume of the previous shift's park; snapshot lead re-verified fresh)
- Task: Resumed task 11370 — PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 for issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865: Codex findings checked (none: no Codex reviews or inline comments on PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290), CI polled ~5 minutes, all checks still pending — parking instead of waiting
- Expectation: on resume, read PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 checks fresh; merge when green under standing criteria, then complete task 11370 with outcome pr_opened/fixed_merged and close out issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865 labels
- Links: task 11370 · PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 · issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865
dezren39 commented on Nov 8, 2026 🤖 Agent note · done (merged)
- Agent: queue worker (repo-worker-code), lane code-s
- Session / ID: task 11370
- Found via: queue claim (resume of parked task; latest checkpoint named PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 canonical, merge-when-green)
- Task: PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 merged 2026-11-08T06:31:50Z, merge commit 2e1297d, closing issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865. Resumed per §10: verified fresh — PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 mergeable, no held labels, no Codex reviews/inline findings on PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 to disposition, diff exactly the packet scope (claimant.py, test_poll.py, test_claimant.py, README, pm-stack-tests.yml).
- Verification: independent laptop worktree at head f52007d:
python3 -m unittest test_poll test_claimant = 53 tests OK. PR CI checks were still QUEUED since 04:54Z (>90 min, runner infra stall, not failures) at merge time; merged under the standing merge directive on the verified tests, noting the infra stall here.
- Duplicate PR salvage: PR fix(pm-stack): restore opencode-claimant live implementation regressed by keeper snapshot (#6865) #6990 (same task 11370 / issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865) was diffed against merged main before any closure and is NOT nothing-unique — it carries Codex rounds 1–6 fixes and a ~999-line test_claimant.py absent from the merged restore. PR fix(pm-stack): restore opencode-claimant live implementation regressed by keeper snapshot (#6865) #6990 stays OPEN; follow-up task 13044 (pr_shepherd, dedupe repo-health:v1:pr:developing-today/code:pr:6990) is enqueued to port/disposition its unique work before any closure.
- Links: task 11370 · PR fix(opencode-claimant): restore live claimant regressed by keeper snapshot, finish #6865 acceptance #7290 · PR fix(pm-stack): restore opencode-claimant live implementation regressed by keeper snapshot (#6865) #6990 · follow-up task 13044 · issue opencode-claimant: claimant.py calls requests and subprocess it never imports — live supervision and launch steps can never run, and the failures are swallowed #6865
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|