Skip to content

investigation(qa): mutation markers travel through a four-hop PR-body chain that has broken four ways — should QA's evidence move to a sequant-owned channel? #1316

Closed

Description

@admarble

Tier: judgment Found: 2026-10-04, upstream research on #1302

Problem. The PR body has two roles that conflict:

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:

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_BODY is obtained, or the variable is replaced by the new channel. Evidence: a gate test scoped to §6i, mutation-verified.

Non-Goals

  • Changing the SEQUANT_MUTATION marker format.
  • Changing the standalone /qa path, where a human-opened PR body is the only channel.

Graph metadata

Refs #939, #1247, #1297, #1302, #1305, #1311

Activity

  1. admarble commented on Oct 6, 2026

    @admarble
    ContributorAuthor

    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

    Step Incident PR-body-specific?
    1. Exec writes its Summary and markers #1297, no heading (fixed: markers are now carried with or without a heading) No
    2. The driver returns the text as output #1311, glued messages (fixed in #1340) No
    3. composeExecSummary extracts it #1305, a } drops the marker (still open: a marker-format bug) No
    4. The orchestrator writes the PR body #1302, exec PATCHed the body itself (fixed on the producer side) Yes
    5. QA reads $PR_BODY never assigned in qa/SKILL.md; each agent fetches its own way Yes

    A sequant-owned channel shares steps 1–3. State's execSummary is written from the same composeExecSummary(result.output) that builds the body (batch-executor.ts, the updateExecSummary call 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 /qa keeps 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

    1. QA never states how it gets $PR_BODY (§6i, qa/SKILL.md:2594). Fix it with one explicit gh pr view <N> --json body -q .body line, paid for under the cap. This is AC-3 here.
    2. A failed after-exec write is silent for QA. ADR-0004 says a failed PATCH "warns and the run keeps its PR: … only its body is stale". QA then grades a stale body with no signal. A producer-side delivery check would fix it: after writing, read the body back and confirm the markers parseMutationMarkersFromExecOutput found 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).
    3. --no-pr with gate-test ACs: no body exists, so §6i reads Missing and 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 /loop uses it. Owner sub-decision: thread exec's summary to QA through promptContext under --no-pr, or document that the mutation gate reads Not-Applicable without a PR.

    Proposed resolution

    • AC-1: keep the PR body (ADR-0004 stands).
    • AC-2: 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.
    • AC-3: covered by gap 1.
  2. admarble commented on Oct 6, 2026

    @admarble
    ContributorAuthor

    Owner decision (2026-10-06)

    Closing as decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions