Repository navigation
Description
Motivation
CLAUDE.md already mandates: "Gate tests ship with a recorded mutation result... delete the thing it asserts, confirm exactly that test fails, restore, and record the result in the commit message or PR body" (added after #830, where deleting an injection fixture's payload left the suite green). But the rule is honor-system prose — nothing parses or checks the recorded result, so compliance is invisible and unenforceable. This is the exact defect class #834 fixed for the qa skill's own §7 gates: "§2h was prose only, and therefore unenforceable, from the day it shipped."
The transcript audit (28 gap-prompt episodes, 2026-07-14 → 08-10) shows tests-that-don't-bind as the single largest deterministic-catchable defect class: #842 (test "cannot fail under any condition — zero regression value"; AC downgraded MET → PARTIALLY_MET), #883 ("the guard fired" as env-coupled proxy), #799 (test regex-matched the symptom it should reject), plus #467 (zero assertions) from the earlier corpus. A test observed to fail when its target is removed is evidence; one that hasn't is a claim. The red-phase discipline is the load-bearing part of TDD for agent workflows — and it is checkable.
Proposal
Promote the mutation-verification record from prose to a parseable PR-body marker checked by a /qa §7 gate.
Marker format (PR body, one line per verified test):
Mutation-verified: AC-3 — removed `payload` fixture block; `injection.test.ts > rejects payload` failed; restored.
Machine-anchored form alongside the prose (same durable-marker idiom as SEQUANT_SPEC):
<!-- SEQUANT_MUTATION: {"ac":"AC-3","mutation":"removed payload fixture block","failedTest":"injection.test.ts > rejects payload"} -->Gate (/qa §7, new status mutation_verification_status):
- Applies to ACs that are (a) gate tests per the CLAUDE.md definition (file-reading/section-presence/flag-wiring assertions), or (b) ACs with a declared test-command
Evidence:clause once the Evidence-field issue lands. Missing(in-scope AC with no marker) caps the verdict atAC_MET_BUT_NOT_A_PLUS— advisory-shaped statuses that never touch the verdict have a 0% action rate (investigate(metrics): gap-check signal-to-noise — does flagged → action rate justify cumulative QA prompt cost? #608), so this gate must enter the verdict algorithm to exist.- Marker present but naming a test that doesn't exist in the diff →
Failed, floors toAC_NOT_MET(a fabricated marker is worse than a missing one).
Reachability: the gate is added to the §7 status collection list AND to scripts/lint-skill-gates coverage so it cannot ship unwired (the #834 lesson, mechanically enforced).
Non-Goals
- No automated mutation-testing framework (Stryker etc.) — the record is of a manual red-phase check the implementer already performed; automation is a separate, much larger investigation.
- No requirement on ACs whose evidence is manual/human review.
- No retroactive enforcement on merged PRs.
Tailored caveats
- The skill guidance for performing the mutation must carry the two standing safety rules: commit before mutating (
git checkout <file>to revert a mutation wipes uncommitted edits), and never mutate a variable afinallyblock passes tormSync(fix(test): cli.integration flag-surface tests assert on the not-initialized guard, so they fail on any locally init'd clone #883 deleted a worktree this way). Both belong in the marker how-to section. - Scope file-reading gate tests to the delimited region they check (whole-file matches let a doc header satisfy the assertion — the CLAUDE.md rule's second half; the gate should spot-check this in review guidance, not regex-enforce it).
- Marker parsing in TS, single flat-JSON line (nested-JSON breaks the
\{[^}]+\}regex family). - Skill edits sync three dirs.
Acceptance Criteria
- AC-1:
/qa§7 collectsmutation_verification_statusfromSEQUANT_MUTATIONmarkers in the PR body, with statuses Verified / Missing / Failed / Not-Applicable. Evidence: skill gate test scoped to the §7 collection list, mutation-verified per this issue's own rule. - AC-2:
Missingcaps the verdict atAC_MET_BUT_NOT_A_PLUSandFailedfloors toAC_NOT_METin the verdict algorithm. Evidence: scoped gate test on the verdict-algorithm block asserting both branches, mutation-verified. - AC-3: A TS
parseMutationMarkers(prBody)exists and rejects markers naming tests absent from the diff's test files. Evidence: unit tests with valid, absent-test, and malformed-JSON markers. - AC-4:
scripts/lint-skill-gatescovers the new gate so it cannot regress to unreachable. Evidence: lint test fails when the §7 entry is deleted (mutation-verified). - AC-5: Measurement before enforcement breadth is widened — backtest the gate definition against the last 20 merged PRs and record in the PR body how many would have been Missing, to size the authoring burden honestly. Evidence: counts and method in the PR body.
- AC-6: CLAUDE.md's testing section is updated to point at the marker format as the required record form. Evidence: doc diff in the PR.
Human decisions required
- Scope call after AC-5's backtest: gate-tests-only first, or include all declared-test-Evidence ACs from day one?
Context
From the 2026-08-13 strategy review (TDD-shape assessment: red-phase observability is the adoptable core; full test-first is the wrong shape for same-author agent workflows). Extends the #830/#834 family. Complements the Evidence: field issue (declared evidence gives this gate its widest scope) and the structured gap schema (test_gap findings cite missing mutation records as evidence).
Activity
admarble commentedon Aug 13, 2026
Plan Complete
AC Checklist
/qa§7 collectsmutation_verification_statusfromSEQUANT_MUTATIONmarkers, statuses Verified/Missing/Failed/Not-ApplicableMissingcaps atAC_MET_BUT_NOT_A_PLUS,Failedfloors toAC_NOT_METparseMutationMarkers(prBody)exists, rejects markers naming absent testsscripts/lint-skill-gatescovers the new gate (dogfooded via this PR's own mutation-verified record)CLAUDE.mdtesting section points at the marker formatImplementation Plan
src/lib/workflow/mutation-marker.ts—parseMutationMarkers+classifyMutationMarker, flat-JSON idiom mirroringspec-recommendation.tsisGateTestEvidencekeyword heuristic (gate-test classification for §6i applicability)/qa§6i (Purpose/When/How/Status/Output) + full §7 4-point wiring, across all 3 skill-mirror dirsmutation-verification-skill.test.ts) + confirmlint-skill-gates.tscatches an unwired §6i for free (I1–I4)CLAUDE.mdKey Decisions
/qapass (nostate.jsonpersistence) — matchesSEQUANT_SPEC/SEQUANT_PHASEprecedentFailedhard-floors (AC_NOT_MET);Missingsoft-caps (AC_MET_BUT_NOT_A_PLUS) — matches the issue's explicit wording and §6h's severity precedenttestgenphase despite the mechanical detector saying skip (see Recommended Workflow reasoning)Open Questions
parseMutationMarkersdiff-awareness — recommend a separateclassifyMutationMarker(marker, diffTestFiles)passReady to implement.
admarble commentedon Aug 13, 2026
Test Stubs Generated
Counts explained:
Unit Test Stubs
src/lib/workflow/mutation-marker.test.ts(AC-3)Integration Test Stubs
src/lib/__tests__/mutation-verification-skill.test.ts(AC-1, AC-2, AC-4 — mirrorsevidence-clause-skill.test.ts's pattern for §6h)mutation_verification_statusattributed to Section 6i)lint-skill-gates.tsreports zero violations against the wired skill; §6i present in both-mode checklists/templates) + 1 assumption validator documenting the required manual mutation-verification step (delete §7 wiring → confirm lint fails → restore → record as this PR's ownMutation-verified:evidence)Manual Test Checklists
AC-5 — Backtest against last 20 merged PRs
AC-6 — CLAUDE.md testing section update
Next steps:
throw new Error(...)with actual test logic)/exec 939to implement the featurenpm testGenerated with Claude Code
admarble commentedon Aug 13, 2026
Exec Complete
AC Coverage: 6/6 original + 1/1 derived — all Implemented (see PR's Pre-PR AC Verification table)
Key files changed:
src/lib/workflow/mutation-marker.ts(+ test) —parseMutationMarkers/classifyMutationMarkersrc/lib/ac-parser.ts(+ test additions) —isGateTestEvidence.claude/skills/qa/SKILL.md(+skills/,templates/skills/mirrors) — new §6i, wired into §7src/lib/__tests__/mutation-verification-skill.test.ts— dedicated skill-content pinning testscripts/qa/backtest-mutation-gate.ts(+ test) — AC-5 backtestCLAUDE.md,CHANGELOG.mdChecks:
npm run build✅ ·npm run lint✅ ·npm test✅ (266 files, 5459 passed, 1 expected fail, 2 skipped) ·npx tsx scripts/lint-skill-gates.ts✅ 0 violations ·npx tsx scripts/check-skill-sync.ts✅ 44 synced, 0 divergedMutation-verified (AC-4): deleted §7's
mutation_verification_statuswiring, confirmed bothlint-skill-gates.tsand the dedicated vitest file fail; restored, suite green. Full record in the PR body.Backtest (AC-5): last 20 merged PRs, 7 in-scope gate-test ACs across 3 PRs with a parseable AC table, 100% Missing (expected — pre-dates this feature). Full numbers in the PR body.
Notable finding during implementation: the first wiring pass used prose ("floors the verdict at") that didn't match
lint-skill-gates.ts's exact phrase list, so the generic structural check silently never evaluated the new §6i section. Caught only by actually running the required dogfood mutation test rather than trusting the "no violations" output at face value — fixed and re-verified.PR: #949
Next steps:
/qareview.admarble commentedon Aug 13, 2026
Execution Verification
Command:
npx tsx scripts/qa/backtest-mutation-gate.ts --limit 20Result: Verified — automated confirmation (exit 0, deterministic output matching the count previously reported in the PR body's AC-5 backtest section)
Execution Output (click to expand)
Exit code: 0
Duration: 2s
Confirmation:
Verified by
/verifycommandadmarble commentedon Aug 13, 2026
QA Review for Issue #939
Precheck Findings
Precheck Findings: unavailable — inline fallback used.
CI Status
No CI checks reported yet on PR #949 (
gh pr checks 949returns "no checks reported"). No CI-related AC items in this issue's checklist.AC Coverage
/qa§7 collectsmutation_verification_statusfromSEQUANT_MUTATIONmarkers, statuses Verified/Missing/Failed/Not-Applicablemutation_verification_status = status from Section 6i (Verified/Missing/Failed/Not-Applicable). Dedicated test + mutation-verified (see below)Missingcaps atAC_MET_BUT_NOT_A_PLUS,Failedfloors toAC_NOT_METparseMutationMarkers(prBody)exists and rejects markers naming tests absent from the diff's test filesparseMutationMarkersitself only parses — it does not take a diff-test-file list and does not reject anything. Rejection is a paired export,classifyMutationMarker(marker, diffTestFiles). This was a deliberate split, flagged proactively in the/specplan's Open Question 2 with its own impact analysis, not a silently discovered gap. The underlying requirement (a TS mechanism that rejects a marker naming a test absent from the diff) is fully implemented and tested across both functions together (11 tests inmutation-marker.test.ts). Verified live against the real PR #949 body — see Execution Verification belowscripts/lint-skill-gatescovers the new gate so it cannot regress to unreachable/verify, realghdata, deterministic re-run matched the PR body's numbers exactly (7 in-scope ACs, 3/20 PRs had a parseable table)CLAUDE.md's testing section points at the marker formatMutation-verified:prose form and theSEQUANT_MUTATIONmachine-anchored form, preserves the #830 rationale sentenceisGateTestEvidenceheuristic has unit tests covering true-positive and true-negative real evidence textac-parser.test.ts— true positives quote this issue's own AC-1/AC-4 evidence text verbatim; true negatives quote AC-3/AC-5's prose evidence text verbatimCoverage: 7/7 AC items fully met (includes 1 derived AC)
Original ACs: 6/6 met
Derived ACs: 1/1 met
Quality Plan Verification
Quality Plan found: Yes (from
/spec's Feature Quality Planning section)Derived ACs: 1/1 addressed
Quality Plan Status: Complete
Quality Metrics
any)Build Verification
N/A — build passed (
npm run buildclean, no TypeScript errors).Test Coverage Analysis
src/lib/workflow/mutation-marker.tssrc/lib/workflow/mutation-marker.test.tssrc/lib/ac-parser.tssrc/lib/ac-parser.test.tsscripts/qa/backtest-mutation-gate.tsscripts/qa/backtest-mutation-gate.test.ts.claude/skills/qa/SKILL.md(+ mirrors)src/lib/__tests__/mutation-verification-skill.test.tsCLAUDE.md,CHANGELOG.mdCoverage: 4/4 changed source modules have corresponding tests. No critical-path (auth/payment/security/middleware/admin) files touched.
Code Review
Strengths:
SEQUANT_SPEC/SEQUANT_PHASEflat-JSON marker idiom precisely, including thestripMarkdownCode()fence-safety reuse — no reinvention.lint-skill-gates.ts's I1–I4 invariants passing.isGateTestEvidence's true-positive/true-negative unit tests use this issue's own real AC evidence text verbatim, not synthetic fixtures — satisfies the derived AC's intent precisely.Issues:
parseMutationMarkers) as the thing that "rejects" bad markers; the implementation splits parsing and rejection across two functions. Flagged above — not blocking, but worth a maintainer's explicit sign-off since it's a plan-vs-ship divergence, however well-justified.isGateTestEvidenceis a keyword heuristic (fixture/section/flag/wired/exists/present/registered/mutation-verified/mutation test) that could, in principle, misclassify a human-review-only AC whose evidence text happens to use one of these words (e.g. "reviewed manually, fixture exists in the demo env"). Not observed in the real backtest (7/18 rows in-scope, all genuinely gate-test-shaped), but it's a known false-positive surface, already named in the PR's own Pre-PR Confidence Check.Suggestions:
parseMutationMarkersin a follow-up toparseMutationMarkersRawor similar if the split becomes a recurring point of confusion, or foldclassifyMutationMarkercalls into a singleparseAndClassifyMutationMarkers(prBody, diffTestFiles)convenience wrapper — not required now,/specalready flagged and accepted the current shape.Test Quality Review
Issues Found: None.
Anti-Pattern Detection
Dependency Audit: N/A — no
package.jsonchanges.Code Patterns: Reviewed by sub-agent (type-safety/deleted-tests, scope/size, security) — see Quality Checks below. No hardcoded secrets, no injection risk, no unsafe eval/innerHTML, no N+1 patterns, no uncleared timers.
Critical Issues: 0
Warnings: 0
Quality Checks (sub-agent results)
any/as anyoccurrences in added linesexecFileSyncuses array-form argv (no shell injection);JSON.parseon PR-body text is try/catch-wrapped and Zod-validated before trust; no eval/DOM sinks/hardcoded secretsCall-Site Review
New exported functions detected: 8 (
parseMutationMarkers,latestMutationMarkerPerAc,classifyMutationMarker,isGateTestEvidence,fetchMergedPrs,extractAcTableRows,backtest,formatReport)None are called from other production TS modules by direct import — by design, consumed via ad-hoc
npx tsx -esnippets embedded in/qa§6i's skill prose (the same integration pattern §6h'sresolveVerificationMethod/ac-parser.tsexports use) and viabacktest-mutation-gate.ts's own CLI direct-run block. This is not a dead-export smell — verified live during this QA pass: both §6i "How to perform" commands were executed against real data (issue #939's own AC state, PR #949's own body) and produced correct results, including correctly identifying AC-1/AC-2/AC-4 as the gate-test ACs and correctly classifying all three markers asvalid.Findings: None. Recommendations: None.
Execution Verification
Posted separately via
/verify— see issue comment. Command:npx tsx scripts/qa/backtest-mutation-gate.ts --limit 20, exit 0, output matches the PR body's AC-5 numbers exactly.Additionally, during this QA pass, both §6i skill commands were executed live:
StateManager.initializeIssue/updateAcceptanceCriteriaflow, which/spechad skipped in favor of inline analysis) — correctly returned exactly AC-1, AC-2, AC-4.mutation_verification_statusresolves toVerifiedfor this very PR once all three in-scope ACs' markers were added.Skill Command Verification
Skill files changed: 3 (
.claude/skills/qa/SKILL.md,skills/qa/SKILL.md,templates/skills/qa/SKILL.md— identical content, confirmed viacheck-skill-sync.ts).claude/skills/qa/SKILL.mdnpx tsx -eblocks)Commands Verified:
StateManager.getAcceptanceCriteria+isGateTestEvidencefilter) → ✅ executed, correct outputparseMutationMarkers/latestMutationMarkerPerAc/classifyMutationMarker) → ✅ executed, correct outputVerification Status: Passed
Detection Pattern Verification
Skill markdown files with pattern changes: 3 (mirrors) — one new
grep -E '\.(test|spec)\.'usage inside §6i's "How to perform" block, filtering test files from a diff listing.git ls-filessampleNote: this is the exact same regex already shipped and in production use elsewhere in the same file (§2b/2c's pre-existing "deleted tests" check,
grep -cE '\.(test|spec)\.', line 1183, unmodified by this PR) — a reused, already-proven pattern applied to a new purpose (filtering, not counting deletions), not a novel unverified one.Motivating-example fixtures from issue body: N/A — the issue's own marker-format example (
Marker formatsection) was used directly as the basis forMutationMarkerSchema's shape and verified live against PR #949's real body (see Execution Verification); no separate grep/awk/jq fixture is implicated by that example.Verification Status: Passed
CLI Registration Verification
N/A — no option interfaces (
RunOptions,bin/cli.ts) modified.Behavior-Rule Survival Check
Status: N/A — no AC triggers the behavior-rule heuristic (confirmed via
detectBehaviorRulerun against all 6 original AC texts).Declared-Evidence Execution
Status: N/A — none of this issue's 6 ACs declare evidence naming a backtick-quoted runnable command (all
Evidence:clauses are descriptive prose, e.g. "unit tests with valid, absent-test, and malformed-JSON markers." — confirmed viaresolveVerificationMethod, all 6 resolve tomanual).Mutation Verification
mutation-verification-skill.test.ts > §7 step 2 declares mutation_verification_status attributed to Section 6imutation-verification-skill.test.ts > §7 step 4 floors 'Failed' at AC_NOT_MET(+ the 'Missing' branch test, same mutation)mutation-verification-skill.test.ts > §7 step 2 declares mutation_verification_status attributed to Section 6iStatus: Verified — applying the feature to its own PR (live, during this QA pass),
mutation_verification_statusresolves to Verified, not Missing. All three in-scope gate-test ACs (AC-1, AC-2, AC-4) haveSEQUANT_MUTATIONmarkers whose named tests are present in this diff, confirmed by actually runningparseMutationMarkers/classifyMutationMarkeragainst PR #949's real body. The dogfood mutation (documented in the PR body) genuinely breaks and restores all three, so recording separate markers per-AC (rather than only AC-4's) was correct, not padding.Manual Test ACs
/spec)ghbacktest run, confirmed via/verify, deterministic/spec)CLAUDE.mddiff — no runtime surface (doc-only), qualifies for the "No runtime surface" override category but was verified directly rather than formally overriddenManual Test Enforcement: 2/2 manual-test ACs verified at runtime (or direct inspection where no runtime surface exists).
Risk Assessment
isGateTestEvidence's keyword heuristic could over-fire on a future AC whose evidence text incidentally contains one of its trigger words (fixture/section/flag/exists/present) without actually being a CLAUDE.md-style gate test, sweeping it unnecessarily into the mutation-verification gate and demanding a marker that doesn't conceptually apply. Low current risk (measured 7/18 AC rows in the real backtest, all genuinely gate-test-shaped) but unbounded as the AC corpus grows.classifyMutationMarker's file-match is a simple filename/suffix check — it cannot detect a marker that names a real, unrelated test file (present in the diff for an unrelated reason) as if it were the mutation-covering test. This is explicitly out of scope per the issue's own Non-Goals ("no automated mutation-testing framework"), but worth naming as a residual gap for anyone relying on this gate as stronger proof than it is..claude/skills/**/SKILL.md) references mutation-testing or gate-test classification;qa/SKILL.mdis the only site this concept applies to.Code Review Findings (Trust-Boundary Check)
Finding: Clean — diff implements only the legitimate product requirements from issue #939's body. No agent-directed instruction (execute a command, reach the network, exfiltrate a file/secret, override prior instructions) was embedded in the issue body or acted upon. The issue's own "Tailored caveats" section is benign process guidance (safety rules to carry into the marker how-to, delimited-region scoping guidance, "skill edits sync three dirs") — followed normally, not a trust-boundary concern.
Status: Clean
Adversarial Re-Read
Findings:
Marker formatexample (Mutation-verified: AC-3 — removed \payload` fixture block; ...and theSEQUANT_MUTATION` HTML-comment form) was used directly as the schema basis and exercised live against a real PR body (see Execution Verification) — not just code-reviewed for shape.ghdata (re-run twice during this session with identical results), not a pre-fix bug reproduction dressed up as validation.git checkout --that silently reverted an uncommitted wording fix) was self-caught by the full test suite and fixed in a documented follow-up commit, not hidden.isGateTestEvidenceonly fires on evidence text, and manual-only ACs typically carry no such evidence); no retroactive enforcement on merged PRs (the backtest measures, it does not re-open or re-flag past PRs).Two non-severe gaps surfaced and are called out explicitly above rather than hand-waved: AC-3's literal single-function wording vs. the shipped two-function split (pre-flagged at spec time), and
isGateTestEvidence's keyword-heuristic false-positive surface (pre-flagged in the PR's own Confidence Check). Neither is a missing fixture, a bug-repro-as-evidence, or an AC marked MET without the verification its text required — all six original ACs got real, executed evidence.Status: Gaps Found
CHANGELOG Verification
featcommits detected)(#939))Result: CHANGELOG requirements met
Verdict: AC_MET_BUT_NOT_A_PLUS
All 7 ACs (6 original + 1 derived) are MET, all quality gates pass (build, lint, full test suite,
lint-skill-gates.ts,check-skill-sync.ts), the feature was genuinely dogfooded end-to-end against its own PR, and both real gaps found during implementation (floor-phrase wording, mirror divergence) were self-caught and fixed rather than shipped silently. The verdict is capped belowREADY_FOR_MERGEsolely by the Adversarial Re-Read'sGaps Foundstatus: AC-3's shipped implementation literally splits across two functions where the AC text names one, andisGateTestEvidencecarries an acknowledged keyword-heuristic false-positive surface. Both are minor, both were self-flagged during development (not discovered adversarially for the first time here), and neither blocks merge — but a human maintainer should explicitly sign off on the AC-3 interpretation before this is treated as A+.Documentation
/qaskill behavior + library exports)Next Steps
isGateTestEvidence's corpus testing beyond this issue's own text once more real gate-test ACs accumulate (the backtest script is already reusable for this).admarble commentedon Aug 13, 2026
/fullsolve Complete
Issue: #939
Status: AC_MET_BUT_NOT_A_PLUS
Summary
Promoted CLAUDE.md's honor-system mutation-verification rule to a parseable
/qa§6i gate:SEQUANT_MUTATIONPR-body markers, parsed byparseMutationMarkers/classifyMutationMarker, wired into the §7 verdict algorithm (MissingcapsAC_MET_BUT_NOT_A_PLUS,FailedfloorsAC_NOT_MET). Gate-test AC classification viaisGateTestEvidence. Backtested against the last 20 merged PRs (7 in-scope gate-test ACs). The feature was applied live to its own PR during QA and correctly resolved toVerifiedonce all three in-scope ACs (AC-1, AC-2, AC-4) got their markers.isGateTestEvidence's keyword-heuristic false-positive surface), both documented in the QA comment and PR body rather than hiddenIterations
lint-skill-gates.tsfloor-phrase wording mismatch that silently defeated its own structural check, and a 3-way skill-mirror divergence from an interruptedgit checkout --restore)origin/mainto resolve a real CHANGELOG.md conflict from a concurrent doc-prep commit; re-ran full suite green, re-pushedPR: #949
Risk Assessment (from QA)
isGateTestEvidence's keyword heuristic could over-fire on a future AC whose evidence text incidentally contains a trigger word without being a genuine gate test. Low current risk (7/18 real backtest rows, all genuinely gate-test-shaped).classifyMutationMarkercannot detect a marker naming a real-but-unrelated test file as if it covered the claimed mutation — explicitly out of scope per the issue's own Non-Goals (no automated mutation-testing framework).Next Steps
parseMutationMarkers+classifyMutationMarkervs. the AC's single-function wording) — pre-flagged at spec time, not a surprise.Ready for human review and merge.
fix(#939): close both QA-flagged gaps
admarble commentedon Aug 14, 2026
QA Review for Issue #939 (Re-review after gap fixes)
Precheck Findings
Precheck Findings: unavailable — inline fallback used.
CI Status
validate-skillsbuild (22.x)Plugin Structure Validationnode-floor-guardHooks ValidationSetup Directory Creationtypecheckvalidate-pluginCI Summary: 8 passed, 0 pending, 0 failed.
build (22.x)finished (SUCCESS) during this review — all gating checks now green.AC Coverage
/qa§7 collectsmutation_verification_statusfromSEQUANT_MUTATIONmarkersMissingcaps atAC_MET_BUT_NOT_A_PLUS,Failedfloors toAC_NOT_METparseMutationMarkers(prBody)exists and rejects markers naming tests absent from the diff's test filesparseMutationMarkersnow has a(prBody, diffTestFiles)overload that inlines the classification/rejection into the same function named in the AC. Verified:src/lib/workflow/mutation-marker.test.ts(4 new tests for the overload), and re-ran the updated §6i skill command live against PR #949's real body — correctly returnedvalidfor all 3 markersscripts/lint-skill-gatescovers the new gateCLAUDE.md's testing section points at the marker formatisGateTestEvidenceheuristic unit tests (true-positive/true-negative)MANUAL_REVIEW_NEGATIVE_SIGNALSshort-circuit. Mutation-verified: removing the guard makes exactly the 2 new regression tests fail (ac-parser.test.ts), confirmed and restored (see PR body)Coverage: 7/7 AC items fully met (includes 1 derived AC)
Quality Plan Verification
Quality Plan found: Yes. Derived AC (AC-7): 1/1 addressed. Quality Plan Status: Complete (unchanged from initial review).
Quality Metrics
any)Test Coverage Analysis
src/lib/ac-parser.tssrc/lib/ac-parser.test.ts(+3 new tests for the negative-signal guard)src/lib/workflow/mutation-marker.tssrc/lib/workflow/mutation-marker.test.ts(+4 new tests for the overload)scripts/qa/backtest-mutation-gate.tsscripts/qa/backtest-mutation-gate.test.ts.claude/skills/qa/SKILL.md(+ mirrors)src/lib/__tests__/mutation-verification-skill.test.tsCoverage: 4/4 changed source modules have corresponding tests.
Code Review
Strengths:
parseMutationMarkersoverload is backward-compatible: the one-argument form is byte-identical in behavior (verified by the existing 11 pre-fix tests still passing unmodified), so no existing caller could regress."npm test -- manual-approval.test.ts, fixture exists").Issues: None found in this re-review.
Suggestions: None beyond what the initial review already noted (optional convenience-wrapper naming, not required).
Anti-Pattern Detection
Re-run via sub-agent against the full current diff (see Quality Checks below) — no new findings beyond the initial pass.
Quality Checks (sub-agent results, re-run against full diff)
any/as anyin added linesMANUAL_REVIEW_NEGATIVE_SIGNALSis pure string matching, theparseMutationMarkersoverload still validates via Zod before use, no new injection/eval/exfiltration surfaceCall-Site Review
No new exported functions in this incremental fix beyond what the initial review already covered (
parseMutationMarkers's signature changed via overload, not a new export).MANUAL_REVIEW_NEGATIVE_SIGNALSis a private, unexported constant. No findings.Execution Evidence
scripts/qa/backtest-mutation-gate.tsunchanged by this fix — evidence from the initial/verifyrun still applies (re-running would produce identical output since neither fix touches that script).Skill Command Verification
Skill files changed: 3 (mirrors, identical) — §6i's step-2 command updated to the new single-call form.
mm.parseMutationMarkers(prBody, diffTestFiles)(new single-call form)validclassifications for all 3 markersVerification Status: Passed
Detection Pattern Verification
No new
grep/awk/jq/sed/regex-literal additions to skill markdown in this incremental fix (the step-2 command change replaces JS logic, not a shell pattern). N/A — no pattern changes in this delta.CLI Registration Verification
N/A — no option interfaces modified.
Behavior-Rule Survival Check
N/A — re-confirmed no AC (including AC-3 and AC-7's updated evidence text) triggers the behavior-rule heuristic.
Declared-Evidence Execution
N/A — unchanged from initial review; no AC declares a backtick-quoted runnable command.
Mutation Verification
isGateTestEvidence— "mutation-verified" keyword)SEQUANT_MUTATION: {"ac":"AC-7",...})Status: Verified — all 4 in-scope gate-test ACs (AC-1, AC-2, AC-4, and now AC-7 for the negative-signal guard fix) carry markers naming tests present in this diff.
aggregate mutation_verification_statusfor this PR isVerified, notMissing.Manual Test ACs
Unchanged from initial review: AC-5 and AC-6 both executed/directly verified. Not re-run since neither fix touches those ACs.
Risk Assessment
isGateTestEvidence's remaining keyword-list nature (now with a negative-signal layer) can still miss an unanticipated phrasing on either side. This is narrower than before (the QA-named scenario is fixed), not eliminated as a class.classifyMutationMarker's file-match doesn't verify semantic connection between the named test and the claimed mutation (explicit Non-Goal).Trust-Boundary Check
Finding: Clean — this incremental fix is a direct, mechanical response to the prior QA comment's own findings (self-authored feedback, not external issue-body content), and touches only the two named functions plus their tests and skill docs. No agent-directed instruction from any external text was acted on.
Status: Clean
Adversarial Re-Read
Findings:
"reviewed manually","manual review","human review","manually verified","manually confirmed") that this is unlikely in practice, and no such case appears in the 7-AC real backtest corpus.a6e9caa8), 0 commits behind main, full suite re-verified green (266 files, 5466 passed) after the fixes, before pushing.The only residual item — CI's
build (22.x)still in progress — is an external/temporal condition, not a code gap, and is captured in CI Status above rather than here.Status: Clean
CHANGELOG Verification
Unchanged —
[Unreleased]entry still present and covers the feature as a whole; the two follow-up fixes are corrections to already-described behavior, not separately changelog-worthy.Result: CHANGELOG requirements met
Verdict: READY_FOR_MERGE
Both gaps named in the prior QA review are genuinely fixed and mutation-verified: AC-3's implementation now literally matches its text (the named function itself rejects, via an overload), and AC-7's
isGateTestEvidenceno longer false-positives on the exact scenario QA identified. All 7 ACs areMET, code review is clean, security/type-safety/scope sub-agents all pass, the adversarial re-read found nothing new, and CI is fully green (8/8 checks passed, includingbuild (22.x)which completed during this review).Documentation
CLAUDE.mdand CHANGELOGNext Steps
feat(#939): mutation-verification becomes a parseable /qa §6i gate (#949
docs: cover the v2.11.0→next batch's behavior changes and QA gates
fix(#1520): code-review fixes — marker suffix match, no bare-name att…