Skip to content

Safety tests: Claude keep-alive reap and CI sign-off fail-closed (#1447) - #1457

Merged
currentbits merged 4 commits into
mainfrom
coder/runner-split-safety-tests-first-48f76e
Oct 5, 2026
Merged

currentbits merged 4 commits into
mainfrom
coder/runner-split-safety-tests-first-48f76e

Conversation

@currentbits

@currentbits currentbits commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Round 3 of #1447. Safety tests for two behaviours the createRunner split will move. Neither had coverage before. This is test-only, against current behaviour; no product code changes.

electron/test/claude-idle-reap.test.js (3 tests, mock.timers, fast)

  • An idle kept-alive Claude CLI is reaped after CLAUDE_IDLE_REAP_MS (30 min); the next turn spawns a fresh process.
  • A reused turn disarms the reaper and restarts the window when it settles.
  • Past the cap of 3 idle CLIs, the least recently used one is evicted, not the oldest spawned.

electron/test/ci-workflow-signoff.test.js (14 tests) checks that the CI-workflow sign-off fails closed:

  • A workflow patch is held: a card is pushed, the thread waits, and nothing merges.
  • Deny, a stale or mismatched request id, stopping the lead, or restarting the app all leave it unsigned.
  • An approval doesn't carry over to another thread or to a changed patch.
  • An approval is single use: retrying the identical merge after a failed merge raises a fresh card.
  • An approval is not honoured while the lead's current turn was started by an orchestration notice (auto turn).

The tests found no fail-open path, so nothing is marked todo.

Mutation-checked: each deliberate bug below was applied to runner.js on its own, then reverted:

Mutation Result
idle cap 3 → 4 caught (1 fails)
idle reap disabled caught (2 fail)
sign-off accepts any request id caught (2 fail)
sign-off reusable (single-use delete removed) caught (1 fails)
isAutoTurn check removed from the sign-off caught (1 fails)

Checked

  • The sign-off file passes 14/14 on 5 runs in a row; the idle-reap file passes 3/3.
  • Full electron suite (CI-like env) passed 4125/4125 before the auto-turn case was added. That's the 4109 already on main plus the first 16; the auto-turn case adds one more.

🤖 Generated with Claude Code

Willem and others added 3 commits October 4, 2026 20:50
Deny, refused decisions, stale ids, stopRun, restart, cross-thread and
changed-patch approvals all leave the merge blocked with nothing landed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
mock.timers drives the 30-minute window; no product seam needed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A merge that fails after the gate (pre-commit hook) consumes the approval;
the identical retry raises a fresh card instead of reusing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…#1447)

Drives a real auto turn through runner.deliverNotice with a held fake
agent. The approved merge is refused mid-turn without consuming the
approval, then honoured once the queued human resume resets the chain.
Fails if requestCiWorkflowSignOff drops its isAutoTurn check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@currentbits
currentbits merged commit 4bfebe4 into main Oct 5, 2026
6 checks passed
@currentbits
currentbits deleted the coder/runner-split-safety-tests-first-48f76e branch October 5, 2026 11:01
currentbits pushed a commit that referenced this pull request Oct 5, 2026
…s (incl. the auto-turn case from #1457)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant