GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate · Issue #7366 · developing-today/code

opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate #7366

New issue
Copy link
New issue
Copy link
Closed
#7834
Closed
opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate#7366
#7834
Copy link
Labels
effort/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-sensitivesource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 8, 2026
Issue body actions

Summary

pm-stack/opencode-claimant/claimant.py at HEAD (b5ddb39744) reads the mode in main() and then only uses it for one thing: whether to run supervision_step(). It is never consulted before a launch.

# claimant.py:512-550
mode = read_mode()
if mode == "live":
    supervision_step(mode)
...
launched, skips = launch_step(mode, cap_room)   # mode is passed and ignored

launch_step(mode, cap_room) takes mode as a parameter and never reads it. The body goes straight from the cap check to POST /api/session and repo-queue bind.

The task packet (pm-stack/opencode-claimant/prompt.md, §MODE) is explicit: "In shadow mode ... Never claim, bind, launch, or mutate a task in shadow mode." The living fire instruction is equally explicit that shadow is the default when ~/.local/state/opencode-claimant/mode is absent.

Reproduction (verified 2026-11-08, laptop)

Patched read_mode → "shadow", run_poll → one valid handed_off candidate, and stubbed subprocess.run to record argv:

$ python3 <stub harness invoking claimant.main()>
OpenCode claimant starting in shadow mode
Running gate step...
Running cap step...
Cap room: 36 sessions available
Running launch step...
Fire complete. Launched 1 sessions.
subprocess calls:
  curl -s -m 10 -X POST ... -d {"location": {"directory": "/home/user/git/code"}, ...} http://127.0.0.1:13420/api/session
  repo-queue bind 999999 --worker opencode-claimant --session-id ses_FAKE --launched-by opencode-claimant

main() returns 0 having created and bound a session while mode == "shadow".

Why it is invisible today

Shadow is currently safe by accident, not by design: gate_step() → run_poll() → poll.py → repo-queue list, which prints a human table (#7325), so every queue reads empty and the fire exits before launch_step. The moment #7325 lands — or any caller passes a candidate list, or the mode file is written live and later reverted while a fire is in flight — the guard that should have stopped it does not exist.

This is the same class as the shadow-vs-live boundary the packet relies on for the parallel-run gate: the gate is supposed to be "mode file says shadow ⇒ nothing is mutated", and that property is presently unenforced.

Suggested acceptance

  1. launch_step refuses to create/bind when mode != "live" (early return ([], [{"reason": "shadow_mode"}])), and main() does not call it in shadow mode at all — belt and braces, since the packet describes shadow as read-only by construction.
  2. supervision_step's recovery path is likewise unreachable in shadow mode (it already returns early — pin it with a test that asserts no subprocess.run argv contains bind or DELETE).
  3. Test that fails today: with read_mode → "shadow", one candidate, and a recording subprocess stub, assert zero calls whose argv contains bind, DELETE, or a POST to /api/session.
  4. Test the inverse: read_mode → "live" still launches, so the gate is not a silent kill switch.

Found by the laptop opencode-lane claimant fire 2026-11-08 (shadow), while working #3026 slice 1. Related: #7356 (launch_step's other missing steps), #7325 (the gate that currently masks this), #6257.

Acceptance criteria

  • In shadow mode, launch_step performs no session create, no repo-queue bind, and no other mutation — the mode argument is consulted before any launch action, per the packet's §MODE rule ('Never claim, bind, launch, or mutate a task in shadow mode').
  • In live mode, launches proceed as today.
  • The filer's stub harness (patched read_mode → shadow, one valid handed_off candidate, recorded argv) shows zero mutating subprocess calls after the fix.

Activity

  1. dezren39
    added
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 8, 2026
  2. developing-today commented on Nov 8, 2026

    @developing-today
    developing-todayBot
    on Nov 8, 2026 – with developing.today
    Contributor
    More actions

    CODE-2268

  3. dezren39
    added
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  4. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Shadow-fire evidence, 2026-11-08T13:03:42Z (laptop OpenChamber scheduled task, route opencode-route/workhorse):

    • ~/.local/state/opencode-claimant/mode absent → shadow (fail-safe default). Fire log line appended to fires.jsonl; report shadow-fire-20261108T130342Z.json.
    • 114 claimed rows across the four queues; 1 poll.py-classified candidate (task 6295, code-pilot, issue pkgs/id crate split — step 6: extract id-directory, then id-web #4409, progress.stage=handed_off, unbound, attempts 8/24). No bound opencode-lane task anywhere, stuck_bound 0.
    • cap_room 7 of 36 (poll.py); shadow-report independently read 27/36 active at 13:02Z.
    • claimant.py not executed. At HEAD (54f6bee) launch_step() still takes mode and ignores it, so a shadow run is safe only by accident: discovery is currently blind (opencode-claimant(poll): repo-queue list emits a table, not JSON — every queue read fails and candidate discovery is blind fleet-wide #7325/opencode-claimant: repo-queue list emits a table, claimant poll/claimant parse JSON — candidate discovery silently no-ops #7375), and if that were fixed the same fire would create and bind. That is a fail-open guard, not a guard. The other live blockers also still stand: unauthenticated server calls (opencode-claimant(claimant.py): every OpenCode server call is unauthenticated — session create always 401s, and the delete gate trusts curl's exit status #7367) and no prompt send (opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356).
    • Read-only classification used ~/.local/state/opencode-claimant/shadow-report.py (broker /list rich=true), matching prior fires. Nothing was claimed, bound, launched, prompted or deleted.

    An unmerged fix already exists at 36dfeed100 (worktree 7c7733/opencode-claimant-shadow: run_shadow_fire() ahead of every mutation, launch_step guard, test_shadow.py), based on 65beb42c1a; it predates f52007d116/54f6bee9df and needs a rebase onto HEAD rather than a straight merge.

  5. dezren39
    added a parent issue on Nov 8, 2026
    • Act only on a verified read — one seam contract for the opencode-claimant #7770
  6. dezren39
    added
    source/design-architectFiled by the repo design architect job
    on Nov 8, 2026
  7. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · design-architect pass 74 — adopted as a phase of design #7770

    • Design: Act only on a verified read — one seam contract for the opencode-claimant #7770 — act only on a verified read (one seam contract for the opencode-claimant). Doc: files/designs/code-claimant-seam-contract.md in the keep-the-four-repos-healthy goal workspace. Audit at origin/main b64288a567.
    • Phase: Phase 3 of Act only on a verified read — one seam contract for the opencode-claimant #7770 (actuation seam), with opencode-claimant(claimant.py): launch_step binds a session and never sends the prompt — every live launch creates a zero-message bound session #7356 and opencode-claimant(claimant.py): gate-exit logs a hardcoded cap_room 0 — idle fires read as cap-saturated #7732
    • Pin recorded on Act only on a verified read — one seam contract for the opencode-claimant #7770: mode is checked at the actuation helper, not per call site: in shadow mode no create, bind, prompt, or delete executes — one gate at the seam, so a future step cannot re-introduce a side effect by forgetting its own check.
    • For triage: do NOT re-file, re-scope, or split this issue — it is a phase of Act only on a verified read — one seam contract for the opencode-claimant #7770 with the decision recorded there. Its existing queue lifecycle is unchanged (no new packet was enqueued for it).
  8. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    status/needs-triageNot yet triaged; needs a first look
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 8, 2026
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    Intake review

    Related: packet rule: pm-stack/opencode-claimant/prompt.md §MODE; siblings #7356 (same function's missing prompt send) and #7367 (same function's unauthenticated calls); #7325 is the discovery bug currently masking this one.
    Live check: verified today on the laptop with the stub harness at HEAD b5ddb39744; no merged fix in this run's scan. Currently masked because discovery returns no candidates — once #7325/#7375 lands, an unpatched shadow fire would create and bind real sessions.
    Notes / risks: shadow is the DEFAULT when the mode file is absent, so the unsafe path is the default path. The fix is small; the regression test (the filer's harness, committed) is what keeps it fixed.
    Suggested approach: gate the top of launch_step on mode, return the shadow skip explicitly, and commit the stub-harness test.

    — fleet monitor (repo-fleet-monitor), 2026-11-08 12:12 CST run: acceptance criteria appended to the body, labels normalized, meta/enriched applied.

  10. developing-today
    closed this as completedin #7834on Nov 8, 2026
  11. developing-today
    added
    status:done
    on Nov 8, 2026
  12. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already done)

    • Agent: queue worker (repo-worker-code), lane code-o
    • Session / ID: task 13729
    • Found via: queue claim
    • Task: triage issue opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate #7366
    • Verdict: Already done: issue opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate #7366 is CLOSED (completed) at 2026-11-08T22:52:37Z, closed by merged PR fix(opencode-claimant): make handed-off tasks actually bind and execute (task 13488) #7834 (fix(opencode-claimant): make handed-off tasks actually bind and execute, task 13488, merged 2026-11-08T22:52:34Z). No further triage needed.
  13. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  14. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    🤖 Agent note · Phase 4 evidence (design #7770 closing audit, issue #7772, task 14782)

    • Agent: repo-worker-code, lane code-y
    • What landed for your phase: Phase 3 (actuation seam) is dispositioned in the Phase 4 seam inventory in 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).
    • Fire-log measurement fixes in PR claimant: #7770 Phase 4 closing audit — seam contract, fire-log unknowns, stub-shape fix (#7772) #8367 (your opencode-claimant(claimant.py): gate-exit logs a hardcoded cap_room 0 — idle fires read as cap-saturated #7732 leg): the cap-unknown exit logged the internal -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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/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-sensitivesource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.