Skip to content

test(#1095): property-based and metamorphic tests for parsers; fix checklist AC counting - #1114

Merged
admarble merged 6 commits into
mainfrom
feature/1095-test-parsers-property-based-and-metamorphic-tests-
Sep 20, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1095-test-parsers-property-based-and-metamorphic-tests-

Conversation

@admarble

@admarble admarble commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Acceptance criteria

  • AC-1: fast-check in devDependencies; --project unit -t property runs the new properties (16 tests across 4 files, all green).
  • AC-2: checklist counting in parseQaSummary (phase-executor.ts); -t checklist green.
  • AC-3: guard lives in buildQaVerdictComment (parseQaSummary never sees the verdict, per spec Open Question 2); -t consistency green.
  • AC-4: metamorphic id-set property green. Filler is re-indented, not AC lines (spec Open Question 1: the base parser already anchors on ^-).
  • AC-5: marker round-trips green.
  • AC-6: every fc.assert passes { seed } from FC_SEED; FC_SEED=42 and unseeded runs both green.
  • AC-7: full npm run build && npm test deferred to the runner per the runner context; the build (run by the vitest global setup), tsc and npm run lint pass locally.
  • AC-8: vitest untouched (^4.1.11); chore(deps-dev): bump vitest from 4.1.11 to 5.0.1 #1082 not touched.

Mutation verification

Mutations were applied on a clean, committed tree and restored. Existing example tests stay green under both mutants (206/206 and 83/83), so the properties add coverage.

Mutation-verified: AC-2 — disabled the checklist branch in parseQaSummary (table-only); src/lib/workflow/phase-executor.property.test.ts failed; restored.

Mutation-verified: AC-4 — parser loop skips the last input line; src/lib/ac-parser.property.test.ts failed; restored.

The AC-4 mutation as literally named (drop the last AC when indented) is vacuous, since the base parser already drops indented AC lines; a real mutant was used instead (spec Open Question 1).

Notes

Closes #1073

🤖 Generated with Claude Code

Runner verification (guard-2026-09 wave 1, 2026-09-20)

  • qa verdict: AC_MET_BUT_NOT_A_PLUS. Runner ran AC-1 (35 properties), AC-2 (3), AC-3 (2), AC-4 (3), AC-5 (8) in the worktree; both markers classifier-valid; FC_SEED plumbing present in all four property files; no vitest bump (fast-check ^4.10.2 on vitest ^4.1.11).
  • Shared-file scope holds: the batch-executor.ts hunk is inside buildQaVerdictComment only; phase-executor.ts hunks are inside parseQaSummary only. Trial merge with fix(#1070): post failing qa verdicts (AC_NOT_MET) to the issue #1118: clean.
  • Full npm test from a clean shell on this branch: 326 files, 6565 passed, 1 expected fail, 3 skipped, 368 s.

…d omit contradictory AC coverage line

Entire-Checkpoint: 2d5acfceeba9
Entire-Checkpoint: 19f1ae4fe8b7
@admarble
admarble merged commit 08afa29 into main Sep 20, 2026
6 checks passed
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.

bug(qa): the posted verdict comment publishes a miscounted AC coverage — "0/1 met" on an 8-AC issue under an AC_MET verdict

1 participant