Repository navigation
Description
Epic: graph-2026-10-review-surface Tier: judgment Execution: split (phases write the script, fixture and report; the owner adds the blind re-read line, AC-5) Blocked by: #1523
Problem
The QA skill posts per-AC results as free-form prose (tables in some comments, bullet lists in others; the skill's own notes record ~45% format variance in past specs). The only machine marker is SEQUANT_PHASE with the overall verdict. A producer that parses per-AC status from that prose is either good enough to ship or it is not, and the sample taken at planning (4 issues, 24 ACs, 23 matched) is too small to say. This node measures it on every QA-marked comment since 2026-08-01 (49 exist at planning) against hand-labelled ground truth, commits the fixture that RS-02's tests run against, and writes the RD-1 line.
Acceptance Criteria
- AC-1: A fixture of real QA comments with ground truth exists. Evidence:
ls __tests__/fixtures/qa-comments/*.md | wc -l | tr -d ' '→≥ 10andjq -e '[.[] | .acs | length] | add >= 40' __tests__/fixtures/qa-comments/expected.json > /dev/null && echo ok→ok(each fixture is a verbatim public comment from this repo;expected.jsonmaps fixture →[{id, status}]with status inmet|not_met|pending|unknown, labelled by hand before the parser is written) - AC-2: The coverage script runs over every QA-marked comment since 2026-08-01 (49 at planning) and reports a number. Evidence:
npx tsx scripts/qa/ac-status-parse-coverage.ts --since 2026-08-01 --json | jq -e '.comments >= 45 and (.acs | type == "number") and (.classified | type == "number")' > /dev/null && echo ok→ok - AC-3: Against the fixture, the candidate parse's precision is reported, not only recall. Evidence:
npx tsx scripts/qa/ac-status-parse-coverage.ts --fixture --json | jq -e '(.precision | type == "number") and (.recall | type == "number")' > /dev/null && echo ok→ok(a strayMETin prose near an AC id must count as a false positive) - AC-1 and AC-3 are classified as gate tests by
isGateTestEvidence; the PR body carries aSEQUANT_MUTATIONrecord for each (delete one fixture's entry fromexpected.json→ the≥ 40check fails; remove the false-positive case from the fixture → precision reads 100% and the record names it; restore). - AC-4: The evidence file records the numbers and the RD-1 line. Evidence:
grep -cE '^RD-1: (parser-now|marker-first) — coverage [0-9]+% on [0-9]+ comments, precision [0-9]+%' docs/evidence/review-surface/ac-parse-coverage.md→1 - AC-5: Eight fixtures are re-labelled blind at the end and the agreement is recorded (human-read metric rule). Evidence:
grep -cE '^Re-read: [0-9]+ of 8 agreed' docs/evidence/review-surface/ac-parse-coverage.md→1
Prior fixes / producers
- Prior work on parsing QA output:
parseQaVerdict(#?, overall verdict),parseQaSummary(counts and gaps),parseMutationMarkers(feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939). None yields per-AC status. Producers of the comments: the QA skill (frozen) viabuildQaVerdictCommentand the skill's own comment post. - The attribution-rate script in feat(run): review by exception — a computed "Read first" PR comment partitions the diff into residue (nothing vouches for it), tests by seam class, and AC-explained hunks #1520 AC-1 measures a different thing (whether
Evidence:names a path); the two scripts sharescripts/qa/and nothing else.
May touch
scripts/qa/ac-status-parse-coverage.ts (new), __tests__/fixtures/qa-comments/ (new), docs/evidence/review-surface/ac-parse-coverage.md (new).
Non-Goals
- Writing the producer (RS-02).
- Any edit under
plugin/,.claude/skills/,templates/skills/(I-1). - Fixtures from any private repo; this repo's public comments only.
Done when
The RD-1 line is on the tracker with its coverage and precision numbers, and the fixture RS-02 will test against is committed.
Activity
admarble commentedon Oct 19, 2026
Runner context, 2026-10-19, before launch (review-surface W0, beside #1521/#1528; judgment tier, all phases on Opus; stop-at-PR). main = ec9d583.
No file overlap with anything else in this wave.
For every phase, and the qa phase by name: run the full suite at most once, in the foreground, under
timeout, after a WIP commit. Each MCP-dispatched phase has a 30-minute wall, and this wave runs 7 issues at once. Prefer the targetednpx vitest run <files>for the ACs.CHANGELOG: add
[Unreleased]lines, notchangelog.d/fragments. #1370 has not merged.Freeze: nothing under
plugin/,.claude/skills/ortemplates/skills/.Health baseline: if this PR changes a measured metric, regenerate
scripts/qa/health-baseline.jsonwithnpx tsx scripts/qa/health-report.ts --write-baselineafter the last source change. Never hand-edit it.npm run lint:healthmust print "no metric rose".admarble commentedon Oct 19, 2026
Complexity: Standard (5 ACs, 3 directories)
AC Quality Check
lintAcceptanceCriteria: 5/5 passed. Each AC is on one line with anEvidence:clause, and the issue has a## Non-Goalssection.main(ec9d583): every Evidence command fails today.scripts/qa/ac-status-parse-coverage.ts,__tests__/fixtures/qa-comments/anddocs/evidence/do not exist yet. Nothing is vacuous.isGateTestEvidencereturns true for AC-1 and AC-3 and false for AC-2, AC-4 and AC-5, as the issue says.failedTest. The Evidence commands for AC-1 and AC-3 arejq/npxone-liners, and those cannot befailedTest. Exec must add a vitest file (see Plan, step 4). If it does not, both SEQUANT_MUTATION records classifytest_not_in_diff, which floors the verdict atAC_NOT_MET.- [ ], so the parser does not see it as an AC. That is intended: it is an instruction, not a criterion.≥ 45. On a live count today (2026-10-19), 76 comments carrySEQUANT_PHASE {"phase":"qa"}and were created since 2026-08-01: 61completedand 15failed. The body's AC-2 floor is the binding number. The 49-vs-76 gap is Open Question 1.Scope Assessment
Non-Goals: the producer (RS-02/#1525); any edit under
plugin/,.claude/skills/ortemplates/skills/(I-1); fixtures from private repos.scripts/qa/,__tests__/fixtures/,docs/evidence/)Verdict: ✅ SCOPE_OK
In-flight overlap: none. #1521's worktree touches
scripts/qa/health-baseline.json, and this PR may touch it too (it is regenerated, never hand-edited). Whichever PR merges second regenerates it after mergingmain.Acceptance Criteria
AC-1: Fixture of real QA comments with ground truth
Verification: Integration Test (shell Evidence) + a gate test in vitest
Scenario: Given ≥ 10 verbatim QA comments from this repo → When
expected.jsonis read → Then it maps each fixture to[{id, status}]with ≥ 40 entries in total, every status inmet|not_met|pending|unknown.Assumptions: The labels are committed in an earlier commit than the parser. That commit order is the only evidence a reviewer can check for "labelled before the parser is written". The fixture set must contain at least one real comment where an AC id sits near a stray
METin prose, so that AC-3's false-positive case exists (Open Question 3).AC-2: Coverage over every QA-marked comment since 2026-08-01
Verification: Integration Test (live
gh, needs auth in the QA phase)Scenario: Given
ghauth → When--since 2026-08-01 --jsonruns → Then the JSON hascomments ≥ 45andacsandclassifiedare numbers. Acoverageratio is also reported.Assumptions:
sinceon/issues/commentsfilters byupdated_at, so the script also filters oncreated_aton the client. The denominatoracsis the AC ids parsed from each comment's issue body byextractAcceptanceCriteria, not the ids mentioned in the comment (Open Question 2).AC-3: Precision as well as recall on the fixture
Verification: Integration Test + a gate test in vitest
Scenario: Given the fixture → When
--fixture --jsonruns → Thenprecisionandrecallare numbers. Given the stray-METcomment → Then that AC counts as a false positive, and precision is below 1.Assumptions: Definitions: TP = parsed status equals the truth label and is not
unknown. FP = parsed status is notunknownand differs from truth, or is assigned to an id the truth does not list. FN = truth is notunknownand the parse isunknownor missing.AC-4: Evidence file with numbers and the RD-1 line
Verification: Manual Test (grep)
Scenario: Given the runs in AC-2 and AC-3 → When the report is written → Then exactly one line matches
^RD-1: (parser-now|marker-first) — coverage N% on M comments, precision P%.Assumptions: The decision rule is RD-B: parser-now if coverage ≥ 90%. The line records exec's proposal. RD-1 is a human approval point, so the owner confirms it on #1523.
AC-5: Blind re-read of 8 fixtures (owner's step)
Verification: Manual Test (owner)
Scenario: Given the committed labels → When the owner re-labels 8 fixtures without looking at
expected.json→ ThenRe-read: N of 8 agreed …is added.Assumptions: Execution is
split. Exec must not write this line. It writes a placeholder that does not match the regex, for exampleRe-read (owner): pending — 8 fixtures listed below. QA should report AC-5 asPENDING(owner), not as an exec failure.Implementation Plan
Phase 1: Corpus and fixture (labels first)
fetchQaComments({since})inscripts/qa/ac-status-parse-coverage.ts, modelled on theharvestshape inscripts/qa/backtest-mutation-gate.ts. It runsgh api repos/{owner}/{repo}/issues/comments?since=… --paginatethroughexecFileSync. It selects bodies matchingSEQUANT_PHASE: {"phase":"qa", filters oncreated_at ≥ since, and fetches each distinct issue's body once forextractAcceptanceCriteria.failed-status verdicts, and pre-/post-feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939 shapes. At least one must contain the stray-MET-near-AC-id prose. Save each one verbatim as__tests__/fixtures/qa-comments/<issue>-<commentId>.md. Hand-labelexpected.jsonwith ≥ 40 ACs. Commit the labels before step 3.Phase 2: Candidate parse and metrics
parseAcStatuses(body, acIds): Map<id, status>. Start from the 23/24 regex taken at planning,AC-N … (MET|NOT MET|PENDING|✅|❌|⚠), and anchor it to table rows and list-item lines rather than free prose. AddscoreFixture()for precision and recall, and the CLI flags--since <date>,--fixtureand--json. Keep the parser in the script. RS-02 (feat(run): one producer for per-AC status — parse the QA phase output, write the state record through updateACStatus, carry acs[] in the run log; unknown is a status #1525) ownssrc/lib/workflow/ac-status.tsand may lift it later. Only export it.scripts/qa/ac-status-parse-coverage.test.ts, which runs offline. Write (a) a fixture-shape test: ≥ 10.mdfiles, ≥ 40 labelled ACs, every status in the enum, every key backed by a file. Write (b) a test that names the stray-MET case and asserts it scores as an FP withprecision < 1. Run both mutations from the issue and record them in the PR body, withfailedTestset toscripts/qa/ac-status-parse-coverage.test.ts > ….Phase 3: Report
docs/evidence/review-surface/ac-parse-coverage.md. Include the corpus definition and count (76 vs 49, explained), coverage, precision, recall, the per-format misses, the commands to re-run, the RD-1 line, and theRe-read (owner): pendingplaceholder that lists the 8 fixtures for the owner.CHANGELOG.md[Unreleased]line (not achangelog.d/fragment, because feat(#1351): improve(release): changelog fragments instead of a shared [Unreleased] block — 121/192 main commits touch CHANGELOG.md #1370 has not merged). Runnpx tsx scripts/qa/health-report.ts --write-baselineif a metric moved.npm run lint:healthmust print "no metric rose". Runnpx vitest run scripts/qa/ac-status-parse-coverage.test.ts. Run the full suite at most once, in the foreground undertimeout, after a WIP commit.Design Review
scripts/qa/, next tobacktest-mutation-gate.ts: a re-runnable measurement over a real corpus. Not insrc/, because I-2 gives the AC-status producer to RS-02 alone.backtest-mutation-gate.tsfrom feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939,scripts/spec/measure-corpus.ts). The neighbouring prose parser,parseQaVerdict, has been re-patched for format drift: its own comment records the emoji-prefix fix, and the bold/header variants were added separately. That history is the risk RD-1 measures, and it argues for marker-first. It is input to the decision, not a divergence from this issue's lever, because this node measures and does not ship a parser.buildQaVerdictComment(src/lib/workflow/batch-executor.ts:886), and feat(qa): the verdict comment names its reviewer — separate session, driver and model, author's driver and model beside it — and the docs namephases.qa.agentas the independence knob #1521, which appends a reviewer line after the fixture's cutoff. Fixture consumers: this script's test and feat(run): one producer for per-AC status — parse the QA phase output, write the state record through updateACStatus, carry acs[] in the run log; unknown is a status #1525. Report consumer: the owner's RD-1 decision on tracker: graph-2026-10-review-surface — the acceptance criterion as the unit every surface shows: producer, renderers, cost, verdict attribution, Read-first comment, issue form #1523. There is one producer per artifact, so no parity test is needed.No design choice needs an ADR. This is a measurement, and RD-1 is recorded on the tracker.
Feature Quality Planning
All standard checks pass. Notable items:
--sincemode callsgh.docs/subdirectories self-publish to the landing site.docs/evidence/review-surface/will become public, which is fine because the content is public comments plus numbers. Keep the private-repo exclusion.Open Questions
SEQUANT_PHASE {"phase":"qa"…}created since 2026-08-01, with the count broken down by status (61/15) in the report. Impact if wrong: the coverage denominator shifts. Report thecompleted-only number as well.AC-N … was NOT MET … now METfirst. If none exists, record that in the report, keep fixtures verbatim, and ask the owner rather than synthesise one. Impact: the AC-3 mutation record would have nothing to name.Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: All five ACs are shell- or grep-verified measurement checks. The gate-test vitest file is part of exec's own deliverable, so testgen stubs would duplicate it. QA must run AC-2 against live
gh, and must treat AC-5 as owner-pending (split execution).Label Review
Current: graph-2026-10-review-surface
Recommended: +
plannedReason: Planning is complete. No UI and no security surface.
Quality Loop: Won't auto-enable (SCOPE_OK).
admarble commentedon Oct 19, 2026
Correction to the runner context above (health baseline), 2026-10-19:
scripts/qa/health-baseline.jsononly to record a metric that went down.npm run lint:healthreports a metric rose (for examplefunctions.longest.linesoremptyCatch.total), do not regenerate to make it pass. Restructure so the metric holds: put new logic in a new small function instead of growing an existing long one.admarble commentedon Oct 19, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 4/5 met
Gaps:
Suggestions:
<!-- SEQUANT_PHASE: {"phase":"qa"comment. That may include the orchestrator's compact verdict comments as well as the skill's full reviews, and that would change how the 80% should be read.Pending ACs:
Needs human review:
docs(#1524): AC-5 blind re-read — 8 of 8 agreed (second labeller, own…
chore(#1524): one [Unreleased] ### Added heading; drop the duplicated #…
admarble commentedon Oct 19, 2026
Execution Verification (runner, 2026-10-19), PR #1554 @ c4f5cda
QA returned NEEDS_VERIFICATION with two gaps, CI and AC-5. The runner re-ran AC-1..AC-5 verbatim:
12,okokok(precision 0.97, recall 0.98)11Both gate mutations reproduced.
AC-5: the owner delegated the blind re-label to the runner session as a second labeller. The runner wrote its labels to a file before opening
expected.json: 8 of 8 agreed. 6 of 6 agreed on the fully blind fixtures; 1265 and 922's AC-3 labels had been seen during verification. This is disclosed in the evidence file §5.RD-1 resolves to marker-first (80% < 90%), so the producer work it gates is scheduled after the plugin freeze.