Files
msd-core/tests/fixtures/representative/decision-coverage-guard
Tom Boucher f15eb5f5c9 fix(#2347): make the decision-shape evidence test format-agnostic (#2389)
#1365's fail-loud guard reused the parser's own D- grammar as its evidence test, so a populated <decisions> block using any other ID prefix (e.g. D5-01) was invisible to both parser and guard, collapsing could-not-parse into a clean none-present pass. Add an ID-shaped bold-lead-in probe as format-agnostic evidence on both parse paths; empty/prose scaffolds stay none-present. Graduates the #2371 d5-prefix representative fixture to its expected* assertion.

Closes #2347. Admin-merged (self-review bypass) with full green CI.
2026-07-17 16:25:13 -04:00
..

Decision-coverage guard fixture (#2347)

d5-prefix-context.md is the verbatim reproduction shape from #2347 — the - **D5-01:** some decision bullet given in the issue's own "Steps to reproduce" — used as a CONTEXT.md <decisions> block and driven through query check.decision-coverage-plan <phaseDir> <contextPath> (the real CLI gate; see tests/decisions.test.cjs for the established pattern this follows), not extractDecisions() called in isolation.

The #1365 fail-loud guard's "is this decision-shaped?" evidence test (/\bD-[A-Za-z0-9]/) reuses the same D- grammar as the parser it guards. For any ID prefix the parser cannot read — D5-01 here — the guard sees no evidence either, so the two failure modes the guard exists to distinguish (none-present vs could-not-parse) collapse into none-present, and a populated, genuinely decision-shaped CONTEXT.md passes silently.

Expected once fixed: reason: 'could-not-parse', passed: false (see MANIFEST.json's expectedReason/expectedPassed). Today's gate instead reports passed: true, skipped: true, reason: 'no trackable decisions' — pinned in MANIFEST.json's currentBuggyOutput and asserted directly in tests/representative-corpus.test.cjs (a characterization of today's known-broken behavior, not a todo — see tests/fixtures/representative/README.md for why) until #2347 lands.