Repository navigation
Description
Blocked by: — Tier: mechanical Doc: guard plan 2026-09-18 (16-bug classification; research: OSS-Fuzz, Ravi & Coblenz OOPSLA'25 on PBT mutation power)
Why
Two of the recent bugs were parsers tested on one shape. parseQaSummary (src/lib/workflow/phase-executor.ts:595) counts only | AC-N | table rows, so a checklist-shaped report produced 0/1 met under an AC_MET verdict (#1073). isIssueMergedIntoMain's (#N) grep matched any commit title mentioning the number (#1044). Example-based tests pin the shapes the author imagined; properties pin the invariants that must hold for every shape.
Change
Add fast-check as a dev dependency and one property file per parser:
src/lib/ac-parser.property.test.ts— never throws or hangs on arbitrary strings; metamorphic: re-indenting, reordering unrelated lines, or changing- [ ]to- [x]does not change the set of AC ids parsed; every parsed AC's text is a substring of the input.src/lib/workflow/phase-executor.property.test.ts—parseQaSummarynever throws; for a generated report containing N AC lines in any supported shape (table row, checklist, bold-prefixed) with M marked MET, it returnsacTotal === NandacMet === M; consistency: anAC_MET*verdict withacMet === 0andacTotal > 0is never emitted (the bug(qa): the posted verdict comment publishes a miscounted AC coverage — "0/1 met" on an 8-AC issue under an AC_MET verdict #1073 hardening).src/lib/workflow/mutation-marker.property.test.tsandqa-gaps-marker.property.test.ts— round-trip:parse(format(x))deep-equalsxfor generated payloads; parse never throws on arbitrary text.
Each property must kill at least one seeded mutant that the existing example tests miss, recorded in the PR body.
Closes #1073 when this lands: AC-2 is the checklist-shape fix and AC-3 is the consistency hardening #1073 asks for. The parseQaSummary change lives in phase-executor.ts; the only batch-executor.ts edit is the presence guard inside buildQaVerdictComment so the count line is omitted when the parser returned no counts (PLAN D-10).
Release-graph plan — guard-2026-09 (2026-09-20)
Graph: guard-2026-09 Tier: mechanical Wave: 1
May touch: package.json, package-lock.json (fast-check only), src/lib/ac-parser.property.test.ts, src/lib/workflow/phase-executor.property.test.ts, src/lib/workflow/mutation-marker.property.test.ts, src/lib/workflow/qa-gaps-marker.property.test.ts, src/lib/workflow/phase-executor.ts (parseQaSummary), src/lib/workflow/batch-executor.ts (buildQaVerdictComment only — #1070 edits the postQaVerdictComment gate in the same wave), CHANGELOG.md; not vitest.config.ts (#1086 owns it this wave — seeds live in the test files)
The npm run build && npm test AC is verified by the runner from a clean shell after the PR opens (PLAN I-1); the agent runs only the test files its ACs name. Mutation markers use failedTest starting with the test file path (I-4). Close #1073 from the PR body (Closes #1073).
Acceptance criteria
- AC-1:
fast-checkis indevDependenciesandnpx vitest run --project unit -t "property"runs at least 8 properties — Verify: the run's summary shows ≥ 8 passed. - AC-2:
parseQaSummarycounts checklist-form ACs (- [x] **AC-1**: …) — Verify:npx vitest run src/lib/workflow/phase-executor.property.test.ts -t "checklist"→ green. Mutation-verified per CLAUDE.md §Testing: restore the table-only regex → the property fails; restore. - AC-3:
parseQaSummarynever returnsacMet === 0withacTotal > 0for anAC_MET*verdict; the count line is omitted instead — Verify:-t "consistency"→ green. - AC-4: the ac-parser metamorphic property holds — Verify:
npx vitest run src/lib/ac-parser.property.test.ts→ green. Mutation-verified: make the parser drop the last AC when the line is indented → the property fails; restore. - AC-5: marker round-trips hold — Verify:
npx vitest run src/lib/workflow/mutation-marker.property.test.ts src/lib/workflow/qa-gaps-marker.property.test.ts→ green. - AC-6: every property is deterministic in CI: each
fc.assertpasses{ seed }fromprocess.env.FC_SEEDwhen set and prints the failing seed on failure — Verify:FC_SEED=42 npx vitest run -t "property"→ same result as unseeded. - AC-7:
npm run build && npm testgreen. - AC-8: the fast-check integration targets the vitest major on
mainat execution time (^4.1.11on 2026-09-20) and the PR does not bump vitest; dependabot chore(deps-dev): bump vitest from 4.1.11 to 5.0.1 #1082 (vitest 5) stays open and unmerged — Verify:git show origin/main:package.json | grep '"vitest"'and the PR'spackage.jsonagree on the major.
Not in scope
Fuzzing pre-tool.sh (see the hook golden-corpus issue) and any change to the AC line format.
Activity
admarble commentedon Sep 20, 2026
Runner context — guard-2026-09 launch, 2026-09-20. Base:
origin/mainatda9ed6e8(2.16.0 plus the plan docs). These rules override the exec skill's defaults for this run:npm testin the worktree. Run only the test files this issue's ACs name. The runner runs the full suite once per PR from a clean shell. Undersequant runthe suite is not hermetic againstSEQUANT_*(bug(test): suite isn't hermetic against the SEQUANT_* env phases inject — exec sees red tests it didn't cause and opens no PR #1086), so a full run shows red files you did not cause.env -u SEQUANT_ORCHESTRATOR -u SEQUANT_WORKTREE -u SEQUANT_PHASE -u SEQUANT_ISSUE -u SEQUANT_RELAY -u SEQUANT_RELAY_FRAME npx vitest run <file>. If it is still red, the PR body names the issue number and the base-vs-head result for that test.<!-- SEQUANT_MUTATION: {"ac":"AC-N","mutation":"<what you deleted>","failedTest":"<test file path> > <describe> > <case>"} -->in the PR body.failedTestMUST start with the test file path, or the qa classifier reports it Failed. Commit before mutating.timeout.git commit -m "...", noCo-Authored-By. Never rebase or force-push after pushing. One AC per line in the PR body, idsAC-Nonly.Issue-specific: Do not bump vitest; dependabot #1082 (vitest 5) stays unmerged, so
fast-checkmust work with^4.1.11. Insrc/lib/workflow/batch-executor.tseditbuildQaVerdictCommentonly; #1070 edits thepostQaVerdictCommentcall-site gate in the same file concurrently. PR body:Closes #1073.admarble commentedon Sep 20, 2026
Complexity: Standard (8 ACs, 3 directories)
AC Quality Check
property, because-t "property"is a name filter.parseQaSummary(output)never sees the verdict, so it cannot return a verdict-dependent count. See Open Question 2.FC_SEEDmeans a random seed each run. See Open Question 4.Scope Assessment
Non-Goals: present ("Not in scope": fuzzing
pre-tool.sh, any change to the AC line format).src/lib,src/lib/workflow)Verdict: ✅ SCOPE_OK
Acceptance Criteria
devDependencies→ Whennpx vitest run --project unit -t "property"→ Then ≥ 8 passedparseQaSummaryruns → ThenacTotal===N && acMet===MAC_MET*verdict and a summary withacMet===0→ WhenbuildQaVerdictCommentruns → Then there is noAC coverage:line[ ]becomes[x]→ Then the parsed id set is unchangedparse(format(x))deep-equalsx. Parse never throws on arbitrary textFC_SEED=42→ Then the result equals the unseeded run, and a failure prints the seednpm run build && npm test. Run by the runner after the PR opens, not by the agentgit show origin/main:package.jsonand the PR'spackage.jsonagree on the vitest majorImplementation Plan
Facts checked against
origin/main(da9ed6e8):*.property.test.tsmatches theunitproject glob, so the 5 s timeout applies. Keep the defaultnumRuns(100) and use bounded string generators.formatfunction exists for either marker. The emitters live in skill prose. The round-trip tests need a test-localformatthat mirrors the documented shape:<!-- SEQUANT_X: ${JSON.stringify(x)} -->.Phase 1: dependency and fix (sequential)
npm i -D fast-check(package.json, lockfile). Do not touch vitest.phase-executor.tsparseQaSummary: also count checklist lines (- [x|X| ] **AC-N**[:] …). Count each AC id once, with the table row winning on a duplicate. The checkbox is the MET signal. Table-shape logic is unchanged.batch-executor.tsbuildQaVerdictCommentonly: omit theAC coverage:line whenacTotal===0, or when the verdict isAC_MET*andacMet===0. bug(qa): a failing qa verdict (AC_NOT_MET) is never posted to the issue — posting is gated on phase success #1070 edits thepostQaVerdictCommentcall site in the same file, so keep the diff to that one function.Phase 2: property files (independent, parallelizable)
ac-parser.property.test.ts:fc.string();-,#or fence);phase-executor.property.test.ts: never throws; the "checklist" property (-t "checklist"); the "consistency" property (-t "consistency", importsbuildQaVerdictComment).mutation-marker.property.test.tsandqa-gaps-marker.property.test.ts: round-trip plus a never-throws property. Usefc.recordgenerators, withGapFindingSchema-shaped findings for qa-gaps.fc.asserttakes{ ...(process.env.FC_SEED ? { seed: Number(process.env.FC_SEED) } : {}) }. fast-check prints the seed on failure by default. Inline this in each file: a shared helper is outside the "May touch" list.CHANGELOG.mdentry.Design Review
parseQaSummaryfix stays inphase-executor.ts. The verdict-consistency guard goes inbuildQaVerdictComment, the only place where verdict and summary meet.SEQUANT_QA_GAPS. That marker carries findings, not per-AC status.AC_PATTERNS. The marker round-trip follows the flat-JSON HTML-comment idiom.@fast-check/vitest?" It adds a second dependency and no capability the plainfc.assertcalls lack.Feature Quality Planning
Notable items (three of these are defects fast-check will find on the current code):
AC_PATTERNSanchor on^-, and- [ ] **AC-1**: xparses to nothing (verified). A "re-indent" metamorphic property over AC lines fails on the base branch.}inside aSEQUANT_MUTATIONstring value drops the marker. The{[^}]+}regex truncates mid-JSON (verified:mutation:"removed } brace"gives 0 markers). A backtick in a value survives, and only``` fences and inline-code spans are stripped.SEQUANT_QA_GAPShas the same weakness on the sequence `} -->` inside a value.- [ ] **AC-1: foo** barparses tofoo bar(verified). The**is dropped and the two capture groups are joined with a space. The ids are also upper-cased.Derived ACs
}in flat-marker values, no-->in qa-gaps values); a boundary example test pins each known-lossy inputOpen Questions
parseQaSummaryhas no verdict input. Recommendation: test the guard inbuildQaVerdictComment(per D-10), coveringAC_MET,AC_MET_BUT_NOT_A_PLUSandREADY_FOR_MERGE. Impact if wrong: the AC cannot be met literally.FC_SEEDis unset. That is how new counterexamples get found, and failures print the seed. Impact if wrong: a newly found counterexample turns CI red until fixed.Closes #1073. bug(qa): the posted verdict comment publishes a miscounted AC coverage — "0/1 met" on an 8-AC issue under an AC_MET verdict #1073 also reports duplicated gaps (one-line and full-paragraph forms of the same finding). This plan does not fix that. Recommendation: writeCloses #1073as the owner instructed, but note the gaps duplication in the PR body and file a follow-up. Impact if wrong: a defect closes unfixed.format. No production formatter exists, so a test-local one only proves parser consistency with a mirror of the docs. Recommendation: accept this, and name it in the test.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: the deliverable is tests, so
testgenwould only stub the deliverable. There is no UI. Mutation markers are needed for AC-2 and AC-4, withfailedTeststarting with the test file path.Label Review
Current: enhancement, qa
Recommended: enhancement, qa, planned
Reason: planning is complete.
Quality Loop: won't auto-enable (SCOPE_OK).
admarble commentedon Sep 20, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/3 met
Gaps:
gh issue list --state all).Closes #1073will close an issue with one of its two reported defects unfixed and untracked.parseQaSummaryaccepts only the bold checklist form. Verified live:- [x] AC-1: done→null. See Adversarial Re-Read.Suggestions:
Closes #1073.\*\*optional in the checklist regex in a follow-up (see gap 2 below).chore(#1095): merge origin/main
chore(#1095): merge origin/main
chore(#1095): merge origin/main
test(#1095): property-based and metamorphic tests for the parsers; co…
admarble commentedon Sep 20, 2026
Merged as PR #1114 (squash 08afa29) on 2026-09-20; #1073 closed from the same PR.