Skip to content

opencode-claimant tests can switch the real installation into live mode #8742

Closed

Description

@dezren39

Finding

pm-stack/opencode-claimant/test_slice1.sh is described as a test, but unconditionally writes live to the user state mode file and runs the production claimant (lines 72–78). The claimant reads that same file in claimant.py:166–177; in live mode its launch_step proceeds past the shadow-only branch and can create sessions/bind tasks (claimant.py:587–627). The test only removes the mode file afterward (test_slice1.sh:83), so it can both perform real queue/session mutations and delete a pre-existing mode setting.

Impact

Running this test on a developer laptop or CI host with access to the live queue can launch work or mutate task state. It is also not hermetic: it changes ~/.local/state/opencode-claimant/mode, and the cleanup does not restore an existing value.

Suggested fix

Refactor the test to use isolated temporary state and injected/mock queue/session dependencies. Keep any live-mode smoke check behind an explicit opt-in that cannot be enabled by the ordinary test target; preserve and restore any user state if a manual live check remains.

Activity

  1. developing-today commented on Nov 11, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 11, 2026

    @dezren39
    MemberAuthor

    Queue coverage note: I attempted a dry-run enqueue to repo-health-code-pilot; the installed repo-queue rejected the packet because it requires a validated repo-task/v1 payload and a fleet-recognized repo identity, which I could not establish from the installed CLI/context. Deliberately not queued rather than guessing a repo identity or submitting an invalid task. Finding and evidence are in the issue.

  3. added this to the PM stack coherence milestone on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codeepic/pm-stackReprioritization program epic (2026-11-12)status:done

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions