Title: 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 · GitHub
Open Graph Title: 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
X Title: 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
Description: 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...
Open Graph Description: 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 l...
X Description: 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 l...
Opengraph URL: https://github.com/developing-today/code/issues/7366
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"opencode-claimant(claimant.py): launch_step ignores its mode argument — a shadow fire creates and binds a session if discovery ever returns a candidate","articleBody":"## Summary\n\n`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**.\n\n```python\n# claimant.py:512-550\nmode = read_mode()\nif mode == \"live\":\n supervision_step(mode)\n...\nlaunched, skips = launch_step(mode, cap_room) # mode is passed and ignored\n```\n\n`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`.\n\nThe 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.\n\n## Reproduction (verified 2026-11-08, laptop)\n\nPatched `read_mode` → `\"shadow\"`, `run_poll` → one valid `handed_off` candidate, and stubbed `subprocess.run` to record argv:\n\n```\n$ python3 \u003cstub harness invoking claimant.main()>\nOpenCode claimant starting in shadow mode\nRunning gate step...\nRunning cap step...\nCap room: 36 sessions available\nRunning launch step...\nFire complete. Launched 1 sessions.\nsubprocess calls:\n curl -s -m 10 -X POST ... -d {\"location\": {\"directory\": \"/home/user/git/code\"}, ...} http://127.0.0.1:13420/api/session\n repo-queue bind 999999 --worker opencode-claimant --session-id ses_FAKE --launched-by opencode-claimant\n```\n\n`main()` returns 0 having created and bound a session **while `mode == \"shadow\"`**.\n\n## Why it is invisible today\n\nShadow 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.\n\nThis 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.\n\n## Suggested acceptance\n\n1. `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.\n2. `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`).\n3. 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`.\n4. Test the inverse: `read_mode` → `\"live\"` still launches, so the gate is not a silent kill switch.\n\nFound 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.\n\n## Acceptance criteria\n\n- 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').\n- In live mode, launches proceed as today.\n- The filer's stub harness (patched `read_mode` → shadow, one valid `handed_off` candidate, recorded argv) shows zero mutating subprocess calls after the fix.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-08T06:49:23Z","url":"https://github.com/developing-today/code/issues/7366"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:318490f2-512c-bb19-70ea-9fa9f7fe97e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C166:345F05:AD3B12:E71FFA:6B064246 |
| html-safe-nonce | a96426bdda9f538666a88225af462000310eafe8d05ffe2a7a514cecbe05ce88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTY2OjM0NUYwNTpBRDNCMTI6RTcxRkZBOjZCMDY0MjQ2IiwidmlzaXRvcl9pZCI6IjE1MDE2NDc3NDY3NTM3NzQxNTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1798cd68d25e3a18f80e57d296b5fbca0c170cec258ec81975384aa43bc5e1d8 |
| hovercard-subject-tag | issue:6268472514 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/7366/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cb8c250debd14227695a0fc43534b02e4389b15a3adf2721f11ef44e3a18300b/developing-today/code/issues/7366 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cb8c250debd14227695a0fc43534b02e4389b15a3adf2721f11ef44e3a18300b/developing-today/code/issues/7366 |
| og:image:alt | 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 l... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width