Repository navigation
Conversation
…ication refuses a dirty tree, requires a real failing run, restores by patch, and produces the SEQUANT_MUTATION markers begin records HEAD on a clean tree; check resolves one test with vitest list, captures the mutation with git add -A + git diff --cached --binary, requires the named test to fail under it and pass after git apply -R --index, and appends the record to .sequant/mutations/<N>.json; render prints markers through renderMutationMarker. Under sequant run, openOrUpdatePR reads the record file and buildAutomatedPRBody appends its markers, deduped against exec's. renderMutationMarker escapes backticks. ADR-0022, docs/reference/mutation-verification.md. Entire-Checkpoint: 8b53a986ce4a
Entire-Checkpoint: 9681f39698b6
…limiter Entire-Checkpoint: c7585144cbf8
…e-local exports unexported, ADR renumbered to 0023 behind #1603 QA fix_now items from the #1604 verdict: a runner that throws after the patch is captured now restores by patch and names the patch path (new test); defaultVitestRunner, renderMutation and VitestRunResult are file-local so lint:health returns to the baseline. The ADR moves from 0022 to 0023 because #1603's PR #1618 ships ADR-0022 and lands first. Entire-Checkpoint: 776551c51856
This was referenced Oct 27, 2026
Entire-Checkpoint: a602a22c7f74
admarble
deleted the
feature/1604-feat-cli-sequant-mutation-begin-check-render-mutat
branch
October 28, 2026 06:45
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What changed
sequant mutation begin --issue Nexits 2 with "commit first" if the tree has changes. On a clean tree it records HEAD and the time in.sequant/mutations/N.json, keeping any earlier records.sequant mutation checkruns the D-2.3 steps in order:begin.vitest listfinds exactly one test for the name.git add -Aandgit diff --cached --binary.git apply -R --indexand checks the tree is clean.checknever runsgit checkout,stashorreset. Its own record file is never counted as a change, even in a repo that doesn't ignore.sequant/.sequant mutation renderprints one marker per AC (the latest record wins) through the existingrenderMutationMarker. It does not add a second renderer.openOrUpdatePRreads the worktree's record file and passes its markers tocreatePR.buildAutomatedPRBodyadds each marker the exec summary doesn't already contain, so a pasted marker still appears once. The "Read first" comment uses the same reader. There is still only one PR-body writer (createPR).docs/reference/mutation-verification.md, ADR-0022, index rows indocs/README.md,docs/adr/README.mdand the cheat sheet, and a CHANGELOG entry.Where this goes beyond the spec (for review)
checkreads vitest's JSON report and needs the named test's own result to befailed, thenpassed, not just a non-zero exit. Without this, a mutation that stops the test file from loading would count as a pass. ADR-0022 records the choice.failsandfails in --json mode) could never resolve to one test.renderMutationMarker. The AC-5 round-trip test found that the parser strips inline code before parsing, so a mutation text like "removed `foo`" came back cut. The renderer now writes a backtick as\u0060. Other output is unchanged.AskUserQuestion, waiting per mode, completion with a link; skills callsequant comment renderandsequant mutation …instead of hand-rendering #1606. Markers typed into exec output still reach the PR body, deduplicated against the record file. The "Done when" line is only fully met once feat(skills): the human-surface reference — decisions viaAskUserQuestion, waiting per mode, completion with a link; skills callsequant comment renderandsequant mutation …instead of hand-rendering #1606 switches the skills over.-tmatches against the>-joined full name.vitest listneeds--no-static-parsein this repo.Acceptance criteria
-t "begin": 4 passed, 0 failed-t "check restores": 6 passed (passes under mutation → 2, no record; fails then passes → 1 record; fails both ways → 2, names the test; delete + add restored byte-for-byte; plus "did not run" and empty mutation)-t "commit mid-mutation": 1 passed-t "ambiguous name": 3 passedmutation-marker.test.ts -t "round-trip from state": 2 passedbatch-executor.test.ts -t "mutation state": 2 passedgrep -cE '^## (begin|check|render)'gives 3Mutation records. All six come from real
node dist/bin/cli.js mutation checkruns on this branch (each about 14 s). I also ran the real refusal paths: an ambiguous name (exit 2, both names listed), a mutation the test doesn't catch (exit 2, tree restored, record file byte-identical) andbeginon a dirty tree (exit 2). All six markers classifyvalidunder `Fixes #1604
Runner verification (graph-run, 2026-10-26)
Executed in the worktree at 1185e29, then again at 7552a80:
-t "begin"→ 4 passed; AC-3-t "commit mid-mutation"→ 1 passed; AC-4-t "ambiguous name"→ 3 passed; wholesrc/commands/mutation.test.ts→ 15 passed, now 16.npx vitest run src/lib/workflow/mutation-marker.test.ts -t "round-trip from state"→ 2 passed.npx vitest run src/lib/workflow/batch-executor.test.ts -t "mutation state"→ 2 passed.grep -cE '^## (begin|check|render)' docs/reference/mutation-verification.md→ 3. AC-8 skill-dir diff count → 0.npx tsc --noEmit,eslint --max-warnings 0andnpm run lint:healthclean after the fix commit (unusedExportsback at the 339 baseline).Fix commit 7552a80 beyond the agent's work, from the QA
fix_nowfindings:checkMutationstep (4) now catches a throwing runner, restores by patch first and names the patch path (testrestores the tree and names the patch when the runner throws under the mutation);defaultVitestRunner,renderMutationandVitestRunResultare file-local. The ADR is renumbered 0022 → 0023 in all five places because #1618 ships ADR-0022 and lands first;grep 0022over the branch's files finds nothing.The
SEQUANT_QA_VERDICTon the issue names commit 1185e29; the runner fix is the only commit after it. This PR lands after #1618 and needs oneCHANGELOG.md/docs/adr/README.mdre-merge round frommain.🤖 Generated by
sequant run