Repository navigation
Description
Tier: judgment Found: 2026-10-04, upstream research on #1302
Problem. The PR body has two roles that conflict:
- QA's evidence channel (feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939).
/qa§6i parsesSEQUANT_MUTATIONmarkers from$PR_BODY(qa/SKILL.md:2595). - An orchestrator-owned artifact (fix(run): sequant run has two PR producers — exec opens the PR itself and createPR returns it untouched, dropping the QA note, ready-gate report and summary #1247). Under
sequant run, onlybuildAutomatedPRBodymay write it. It builds the body from exec's final## Summary.
So a marker reaches QA only after a chain of four steps: exec writes the Summary, the driver returns it as output, the extractor parses it, and the orchestrator writes the body. Each step has failed in a separate incident:
- fix(run): PR body falls back to the placeholder when exec writes no "## Summary" heading, dropping exec's mutation markers and AC table #1297: no
## Summaryheading, so the body fell back to the placeholder. - fix(exec): under the orchestrator, a loop exec rewrites the PR body itself (gh api PATCH), so later sequant updates are dropped as "edited by hand" #1302: exec edited the body itself, and sequant then treated it as hand-edited.
- fix(qa): a SEQUANT_MUTATION marker whose text contains "}" parses to nothing — renderMutationMarker and the parser do not round-trip #1305: a
}in any marker field drops the marker silently. - investigation(run): the exec output handed to createPR was not exec's final message — PR #1310 got the placeholder body although exec ended with a full ## Summary #1311 (open): the driver handed
createPRtext other than exec's final message. PR fix(#1302): under sequant run, phase agents no longer edit the PR body; exec routes PR content through its final Summary #1310, the fix for fix(exec): under the orchestrator, a loop exec rewrites the PR body itself (gh api PATCH), so later sequant updates are dropped as "edited by hand" #1302, shipped with the placeholder body.
Every fix so far has patched one step. The PR body is a mutable GitHub artifact that people, phase agents and sequant can all edit, and sequant cannot tell who last wrote it (#1302 AC-3, dropped). Also, $PR_BODY is never assigned in qa/SKILL.md, so the QA agent fetches the body however it chooses.
Question. Should markers move to a channel sequant owns? Options include run state, a phase-result field the orchestrator passes to QA, or a committed file in the worktree. In that case the PR body would be a rendered copy for humans, not the source QA reads.
AC
- AC-1: Decide whether QA's mutation evidence keeps the PR body as its source of truth or moves to a sequant-owned channel, and record the decision with the reason on this issue. Evidence: the decision comment, which lists each step of the current chain and which step the decision removes.
- AC-2: If the channel moves, file the implementation issue with its producer and consumer named. If it stays, record "dropped: ". Evidence: the linked issue number or the dropped line on this issue.
- AC-3:
qa/SKILL.md§6i states how$PR_BODYis obtained, or the variable is replaced by the new channel. Evidence: a gate test scoped to §6i, mutation-verified.
Non-Goals
- Changing the
SEQUANT_MUTATIONmarker format. - Changing the standalone
/qapath, where a human-opened PR body is the only channel.
Activity
admarble commentedon Oct 6, 2026
Research note (2026-10-06): keep the PR body, close the delivery gaps
Recommendation: keep the PR body as the source of truth. Do not move the markers. This note is input for AC-1. The decision is the owner's.
The chain, and which channel each incident depended on
outputcomposeExecSummaryextracts it}drops the marker (still open: a marker-format bug)$PR_BODYqa/SKILL.md; each agent fetches its own wayA sequant-owned channel shares steps 1–3. State's
execSummaryis written from the samecomposeExecSummary(result.output)that builds the body (batch-executor.ts, theupdateExecSummarycall after exec). So #1297 and #1311 would have broken a state channel identically, and #1305 breaks any channel. Of the four incidents, a move would have prevented only #1302, which is already prevented.ADR-0004 already made this choice
ADR-0004, Option A: the owner chose "open the PR right after exec" over "teaching QA a second source (state's execSummary), which would have touched four sites in the QA skill". Those four PR-body reads still exist: the mutation record, the AC literal-diff, the settle evidence and the test-plan boxes. Moving only the markers leaves three of them, and the QA skill's no-growth cap (#1249 AC-5) makes the four-site change costlier than it was on 09-30. Standalone
/qakeeps the PR body as its only channel (a Non-Goal here), so a second source under the orchestrator would mean two code paths for one gate. If the owner wants the move anyway, the artifact is an ADR that supersedes 0004, not an issue comment.What the research did find: delivery gaps
$PR_BODY(§6i,qa/SKILL.md:2594). Fix it with one explicitgh pr view <N> --json body -q .bodyline, paid for under the cap. This is AC-3 here.parseMutationMarkersFromExecOutputfound are present. This is the bug(run): GitHubProvider.postComment ignores gh's exit status, so a failed QA verdict post is silent #1312 class (a write never confirmed).--no-prwith gate-test ACs: no body exists, so §6i readsMissingand caps the verdict. This is the only case where a non-PR channel matters. The seam already exists:promptContext(phase-executor.ts,PROMPT_CONTEXT_SENTINEL) appends orchestrator text to a phase prompt, and today only/loopuses it. Owner sub-decision: thread exec's summary to QA throughpromptContextunder--no-pr, or document that the mutation gate readsNot-Applicablewithout a PR.Proposed resolution
dropped: a sequant-owned channel shares steps 1–3 with the PR body; the move prevents only #1302, which is fixed on the producer side. File one implementation issue for gaps 1–3, with gap 3 as the open sub-decision.admarble commentedon Oct 6, 2026
Owner decision (2026-10-06)
AC-1: keep the PR body as the source of truth. ADR-0004 stands. The chain's steps:
output.composeExecSummaryextracts it.$PR_BODY.A sequant-owned channel shares steps 1–3, so moving would remove only step 4's exec-edit path (fix(exec): under the orchestrator, a loop exec rewrites the PR body itself (gh api PATCH), so later sequant updates are dropped as "edited by hand" #1302), which is already fixed on the producer side.
AC-2: dropped: a sequant-owned channel shares steps 1–3 with the PR body; the move would have prevented only fix(exec): under the orchestrator, a loop exec rewrites the PR body itself (gh api PATCH), so later sequant updates are dropped as "edited by hand" #1302, which is fixed on the producer side. The delivery gaps the research found are filed as fix(qa,run): §6i's inputs move into precheck.ts (ACs from the issue body, PR body fetched), --no-pr reads a worktree exec-summary file, and the orchestrator confirms markers landed #1341.
--no-prsub-decision: the orchestrator passes exec's composed summary to QA throughpromptContextwhen no PR exists (fix(qa,run): §6i's inputs move into precheck.ts (ACs from the issue body, PR body fetched), --no-pr reads a worktree exec-summary file, and the orchestrator confirms markers landed #1341 AC-3).AC-3 (§6i names its
$PR_BODYsource, with a gate test) moves to fix(qa,run): §6i's inputs move into precheck.ts (ACs from the issue body, PR body fetched), --no-pr reads a worktree exec-summary file, and the orchestrator confirms markers landed #1341 AC-1, which covers both sources.Closing as decided.