Skip to content

feat(#1525): 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 - #1619

Merged
admarble merged 6 commits into
mainfrom
feature/1525-feat-run-one-producer-for-per-ac-status-parse-the-
Oct 28, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1525-feat-run-one-producer-for-per-ac-status-parse-the-

Conversation

@admarble

@admarble admarble commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

I implemented #1525 and pushed it to feature/1525-feat-run-one-producer-for-per-ac-status-parse-the- (commit b6a47f6). This run is orchestrated, so I opened no PR: the orchestrator opens it from this summary.

After every QA phase, sequant run now reads a status for each AC from the QA output. It writes each status to state.json through StateManager.updateACStatus, which had no caller before. It also puts the same list in the run log's issue entry as an optional acs[]. An AC the parser cannot read is written unknown.

Two departures from the AC text, which QA should check:

Decisions the spec left to the owner. No owner answer was available in this run, so I followed the spec's recommendations:

  • OQ-1: shipped now, under RD-B.
  • OQ-2: when a tracked issue has no AC record, the record is first created from the issue body (one extra gh issue view, on QA phases only). Without this, most runs would write nothing.
  • OQ-3: I filed no issue for the SEQUANT_AC marker. That is the owner's call.

Pre-PR AC Verification

AC Status Evidence
AC-1 ✅ Met, with the reading above npx vitest run src/lib/workflow/ac-status.test.ts -t "fixture" → 13 passed, 0 failed (12 fixtures, plus a case where an AC id absent from the comment yields unknown)
AC-2 ✅ Met npx vitest run src/lib/workflow/ac-status.integration.test.ts → 6 passed. Real StateManager on a temp dir with no fs mock. Cases: statuses and notes are written; an extra id is ignored and counted; a read-only dir increments suppressed.byScope.state; a missing record is created, then written; an untracked issue is a no-op; a QA phase run through runIssueWithLogging fills both state.json and the run log's acs[]
AC-3 ✅ Met the grep returns 1 (the call is in ac-status.ts)
AC-4 ✅ Met grep -c 'acs' returns 1; version: z.literal(1) count is 1
AC-5 ✅ Met the grep returns 0
AC-6 ✅ Met no changes under plugin/, .claude/skills/ or templates/skills/; the only new test files are the two named

Mutation-verified: AC-1 — flipped one label in expected.json; only the 943 fixture case failed (1 failed, 12 passed); restored, and 17 of 17 pass. The marker above parses with parseMutationMarkers.

Files changed

  • src/lib/workflow/ac-status.ts (new): the parser, moved from scripts/qa/, plus parseAcRows, leadingIdsInBody and recordAcStatuses.
    • The row text goes in notes. The declared evidence clause is left as it is.
    • It never throws; each failed write is counted with noteSuppressed("state", …).
  • batch-executor.ts: one guarded call (phase === "qa" && result.output), placed before the phase result is logged.
  • state-schema.ts: unknown added to ACStatusSchema; an optional unknown count in the summary.
  • run-log-schema.ts and log-writer.ts: an optional acs[] on IssueLogSchema and a setAcStatuses set

Fixes #1525

Follow-ups

  • Pre-release CLIs and the pinned MCP server reject a state.json containing an unknown AC status until the release ships — dropped: documented in CHANGELOG, inherent to the issue's unknown-is-a-status requirement

🤖 Generated by sequant run

Runner notes (appended after the last QA pass)

Final head: c6381c7eb (b6a47f6 exec; 87635f3 runner fix; 80ba97d merge of origin/main at ec15551 and ba5510b; 36cf2a0 and c6381c7 test tightening; a3f5722 merge of origin/main at 4b8da6c, docs only). The summary above is exec's text at b6a47f6 and is cut at the 4,000-character limit (#1582); the items it lists as open were decided by the owner on 2026-10-28:

Gates on c6381c7eb: AC-1 13 passed (4 skipped are the parser-coverage script's own cases), AC-2 6 passed, AC-3 1, AC-4 1 and 1, AC-5 0, AC-6 0; freeze grep 0; no session links in the diff or the commits; mutation for AC-1 reproduced on this head twice (943 AC-3 flipped → exactly the 943 case failed; 922 AC-3 label edited → exactly the 922 case failed on the label check; restored each time, 13 pass); branch 0 behind main; CI test and canary green on 36cf2a0 and a3f5722, green on c6381c7. QA passes: QA 1 AC_MET_BUT_NOT_A_PLUS 6/6 at b6a47f6; QA 2 NEEDS_VERIFICATION 6/6 at 87635f3 (CI had not run: GitHub marked the PR conflicting until the run merged origin/main); QA 3 AC_MET_BUT_NOT_A_PLUS 6/6 at 80ba97d (the pinned-label gap above); QA 4 AC_MET_BUT_NOT_A_PLUS 6/6 at a3f5722 (the label pin and the OQ-3 state, both resolved above); QA 5 READY_FOR_MERGE 6/6 at c6381c7 (its one note, older CLIs and the 2.20.0 MCP pin reject a state.json carrying unknown until a release ships, is in the CHANGELOG and inherent to "unknown is a status").

…ite the record through updateACStatus, carry acs[] in the run log

unknown is a status.

Entire-Checkpoint: 598e67315a71
… does not declare — warn with the count instead of discarding the producer's ignored[]

QA 1 found recordLoopPhaseOutcome discarding the ignored array the producer returns, so "ignored and counted" (AC-2) was true inside the producer and invisible outside it. The hook now destructures ignored and warns through env.warn (not log, which is a no-op in parallel mode, #1342; not noteSuppressed, which is the dropped-error count of #1504 and an undeclared id is not an error).

No test is added for the hook: AC-6 forbids test lines beyond ac-status.test.ts and ac-status.integration.test.ts, the hook lives in batch-executor.ts, and the integration case already pins ignored equal to ["AC-9"].

Entire-Checkpoint: a23fe3b11460
…ES label in expected.json still differs from the pinned parse

QA 3 edited 922 AC-3 from met to unknown in expected.json and the suite stayed green: the overlay replaced the label, so a pinned miss "disappearing" on the fixture side was invisible. The case now asserts, for each pinned id, that expected.json has a label and that it differs from the pinned parse reading. Mutation-verified: the same edit now fails exactly the 922 case ("label equals the pinned parse"); restored, 17 of 17 pass.

Entire-Checkpoint: 52fddde906a7
… parse reading, so any edit to a pinned label fails its fixture case

QA 4 edited 922 AC-3 from met to not_met and the suite stayed green: 36cf2a0 only checked that the label differs from the parse. Each entry now carries { label, reads }; the case asserts the label equals the pinned label and the parse equals the pinned reading. Mutation-verified: 922 AC-3 met to not_met fails exactly the 922 case ("pinned label moved"); 943 AC-3 not_met to met (the recorded marker) still fails exactly the 943 case; restored each time, 26 of 26 across ac-status.test.ts and ac-status-parse-coverage.test.ts.

Entire-Checkpoint: afd4b79069f4
@admarble
admarble merged commit 31c6f8b into main Oct 28, 2026
9 of 10 checks passed
@admarble
admarble deleted the feature/1525-feat-run-one-producer-for-per-ac-status-parse-the- branch October 28, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant