Skip to content

fix(#1194): parseQaSummary parses bold/emoji-less status words and survives an unparseable AC table - #1214

Merged
admarble merged 4 commits into
mainfrom
feature/1194-fix-qa-parseqasummary-returns-null-when-ac-statuse
Sep 29, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/1194-fix-qa-parseqasummary-returns-null-when-ac-statuse

Conversation

@admarble

@admarble admarble commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1194

Summary

  • parseQaSummary's STATUS_CELL regex only matched an emoji-prefixed status keyword, so a table using bold-no-emoji cells (**MET**, **PENDING**, **NOT MET**) or the skill's own documented ⏳ PENDING / 🔄 Overridden forms counted zero AC rows and the function returned null — before it ever read the SEQUANT_QA_GAPS findings marker.
  • The marker parse is now hoisted above the acTotal === 0 guard, so a valid marker (including the skill's clean-pass {"findings":[]} shape) produces a summary even when no AC row parsed.
  • QaSummary gains an optional pendingAcIds field; buildQaVerdictComment lists PENDING AC ids and pause_for_human findings in their own section under a NEEDS_VERIFICATION verdict, distinct from the generic gaps list.

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Bold status words with no emoji parse correctly ✅ Implemented phase-executor.ts STATUS_CELL now tolerates \*{0,2} and normalizes NOT MET/NOT_MET; test #1194 AC-1 in phase-executor.test.ts
AC-2 A valid marker survives acTotal === 0 ✅ Implemented rawFindings hoisted above the guard; tests #1194 AC-2 (x2) in phase-executor.test.ts
AC-3 ⏳ PENDING and 🔄 Overridden parse ✅ Implemented emoji added to STATUS_CELL, OVERRIDDEN keyword added; property test in phase-executor.property.test.ts
AC-4 NEEDS_VERIFICATION lists PENDING ACs + pause_for_human findings; no "0/0 met" ✅ Implemented buildQaVerdictComment in batch-executor.ts; 4 tests under #1194 AC-4 in batch-executor.test.ts

Runner follow-up (graph-run #1203, commit f50de5f9)

QA returned AC_MET_BUT_NOT_A_PLUS with two gaps that would have shipped, both fixed here:

  • Notes-cell override. With the looser NOT[ _]MET, the right-to-left cell scan took a notes cell such as Not met in first pass; fixed as the status (0/1 on this branch vs 1/1 on main). A table status cell must now hold the keyword alone, optionally bold, or followed by a separator (—, (, : …). The checklist fallback keeps its prefix match.
  • Duplicate pause_for_human. parseQaSummary already unions marker descriptions into gaps, so those findings printed under both Gaps and Needs human review. Under NEEDS_VERIFICATION they now appear only in the latter. The new test builds the summary through parseQaSummary; the earlier fixture hand-wrote gaps, which is why it missed this.

Mutation-verified: notes-cell fix — reverted the table scan to STATUS_CELL; src/lib/workflow/phase-executor.test.ts > parseQaSummary > #1194: a notes cell that starts with a status word does not override the status cell failed (1/192); restored.
Mutation-verified: AC-4 dedupe — made the gaps filter keep every gap; src/lib/workflow/batch-executor.test.ts > #1194 AC-4: buildQaVerdictComment lists PENDING ACs and pause_for_human findings > lists each pause_for_human finding once when the summary comes from parseQaSummary failed (1/102); restored.

Open Questions resolution (per spec recommendations)

  1. "NOT MET" (space) normalizes to NOT_MET. ✅
  2. A marker with {"findings":[]} (empty, non-null) suppresses the acTotal === 0 early return. ✅
  3. 🔄 Overridden counts as MET-equivalent. ✅

Runner follow-up, round 2 (commit 2e5111d7)

QA's second pass returned AC_MET_BUT_NOT_A_PLUS. I fixed its fix_now finding:

  • An AC that appears in two tables (the coverage table, then the Manual Test table) was counted twice. With 🔄 Overridden newly parsing, a later Overridden row could credit an AC that the coverage table marks PENDING. Each AC id is now counted once, from its first table row.
  • Comments now use the real characters instead of literal — / § escape text.

Left as documented: a notes cell written as Not met — fixed still reads as the status. I kept the em dash as a separator on purpose, because ✅ MET — verified is a real status-cell shape.

Mutation-verified: per-id dedupe — disabled the repeat check; src/lib/workflow/phase-executor.test.ts > parseQaSummary > #1194: an AC repeated in a second table is counted once, from its first row failed (1/193); restored.

Test plan

  • npx vitest run src/lib/workflow/phase-executor.test.ts — 24/24 parseQaSummary tests pass (AC-1, AC-2 evidence)
  • npx vitest run src/lib/workflow/phase-executor.property.test.ts — 7/7 pass, including new ⏳/🔄 property test (AC-3 evidence)
  • npx vitest run src/lib/workflow/batch-executor.test.ts — 4 new AC-4 tests pass, plus full file (all pass)
  • npm run build and npm run lint — clean
  • Runner re-run at f50de5f9: npx vitest run src/lib/workflow/phase-executor.test.ts src/lib/workflow/phase-executor.property.test.ts src/lib/workflow/batch-executor.test.ts — 3 files, 301/301 passed; npx tsc --noEmit clean
  • Full npm test intentionally not run in this phase per the issue's own wave-2 launch constraint (hard 30-minute MCP phase wall; wave-1 exec phases ran 25-29 min). CI runs the full suite.

Refs #1203 (graph tracker)

🤖 Generated with Claude Code

…moji, and a marker with no parseable AC row

AC-1: STATUS_CELL tolerates a **-bold cell with no emoji and normalizes NOT MET/NOT_MET.
AC-2: a valid SEQUANT_QA_GAPS marker is hoisted above the acTotal===0 guard.
AC-3: adds the skill's documented emoji, PENDING and OVERRIDDEN keywords.
AC-4: buildQaVerdictComment lists pendingAcIds and pause_for_human findings under NEEDS_VERIFICATION.
Entire-Checkpoint: f2b3d66cee0b
…_for_human findings once

A notes cell starting 'Not met' no longer overrides the status cell. NEEDS_VERIFICATION comments drop pause_for_human descriptions from Gaps since they get their own section; the new test builds the summary through parseQaSummary instead of a hand-written gaps list.

Entire-Checkpoint: 6d2b4c9f99b2
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.

fix(qa): parseQaSummary returns null when AC statuses are bold words with no emoji — the SEQUANT_QA_GAPS findings marker is then never read

1 participant