Skip to content

v4.0.3: mutation copy is a real worktree; end parked runs merged or closed by hand - #58

Merged
Param-Harrison merged 4 commits into
mainfrom
fix/mutation-worktree
Oct 12, 2026
Merged

Param-Harrison merged 4 commits into
mainfrom
fix/mutation-worktree

Conversation

@Param-Harrison

Copy link
Copy Markdown
Contributor

What

  • mutate.sh runs each mutation in a detached git worktree of HEAD with TMPDIR outside it, removed and pruned afterwards. The archive copy had no history, no common git dir and a TMPDIR inside the tree, so tests that read history, find a sibling checkout, or check a path lies outside the repo failed on baseline and every mutation came back baseline-red (seen on kaas-suite: 4 to 5 baseline failures, 0 with a worktree).
  • A test gate may set fileCmd, used by mutate.sh with named test files, for a gate whose cmd ignores file arguments (make check). Validated in src/config.ts.
  • The watcher ends parked runs finished outside the factory: a parked issue whose PR a human merged ships, and a parked run whose issue was closed is ended on the next poll (shipped if merged, else cancelled). Their tmux windows close. Before, they stayed needs-human forever (12 on kaas-suite).
  • A merged PR removes the issue workspace, as a cancel already did. The branch keeps the work.
  • Version 4.0.3.

Proof

  • make check passes.
  • New tests: 3 in tests/mutate.test.ts, 1 in tests/config.test.ts, 7 in tests/scenarios.test.ts. Each fails against the old code.
  • 12 new tests/mutations.json entries, each red; one stale find string updated.

🤖 Generated with Claude Code

Param-Harrison and others added 4 commits October 12, 2026 15:36
…nner

The archive copy had no history and no common git dir, and TMPDIR sat inside it,
so tests that read git history, find a sibling checkout, or check a path is
outside the repo failed on baseline and every mutation was baseline-red. The
copy is now `git worktree add --detach` of HEAD under a temp root, TMPDIR is a
sibling of it, and the worktree is removed and pruned afterwards.

A test gate may set fileCmd for runners whose cmd ignores file arguments
(make check), so mutations run only the named tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erge

Only in-review checked for a merged PR, and a closed issue drops out of every
label list, so a parked run whose PR was merged by hand or whose card was
closed stayed parked forever: its row said needs-human and its tmux window
stayed open. A parked issue now checks for a human merge first, and each poll
ends parked runs whose issue is closed: shipped if the PR merged, else
cancelled. A merge drops every lifecycle label, and a merge or a cancel removes
the issue workspace; the branch keeps the work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Param-Harrison
Param-Harrison merged commit 58716b6 into main Oct 12, 2026
3 checks passed
@Param-Harrison
Param-Harrison deleted the fix/mutation-worktree branch October 12, 2026 13:31
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