Skip to content

audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961

Closed

Description

@admarble

Motivation

#958 fixed /fullsolve's Phase 5.3, which ran an unconditional gh pr merge <N> --squash immediately after PR creation despite the skill's own Auto-Progression stop-list saying to halt at "final summary after PR creation." That issue explicitly flagged /merger/SKILL.md:271 (gh pr merge <PR_NUMBER> --squash, also unconditional, also with Bash(gh pr:*) broadly allowlisted) as a sibling site and left "whether /merger gets the same gate" as an explicit human decision, deferred to a follow-up rather than resolved in #958's scope (see #958's "Human decisions required" and /spec's Open Question 1).

Why this needs investigation, not a copy-paste fix

/merger's risk profile is genuinely different from /fullsolve's pre-#958 behavior, and the same fix may not apply as-is:

  • /fullsolve's bug: merging was a hidden side effect — the skill's own stop-list said to halt at PR creation, but the prose immediately below contradicted it and merged anyway. The user invoking /fullsolve <issue> never asked for a merge.
  • /merger's design: its entire stated purpose (SKILL.md ## Purpose) is "handles post-QA integration of completed worktrees" — invoking /merger <issue-numbers> is the explicit user instruction to merge, analogous to how sequant merge is explicitly human-triggered (per fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958's own Non-Goals, which excluded sequant merge/sequant merge --watch from that fix for the same reason).

So gating /merger behind an --auto-merge flag the way #958 gated /fullsolve may not be the right fix at all — it could break /merger's core function. This issue is to investigate and determine the right treatment, which might be:

  1. No change needed (invoking /merger already constitutes consent), OR
  2. A narrower confirmation step for specific sub-cases (e.g., merging issues the user didn't explicitly list, or a batch that expanded via dependency resolution), OR
  3. Something else entirely.

Proposal

  • Audit /merger/SKILL.md (all 3 mirrors) for any place where it merges something beyond what the user's /merger <issue-numbers> invocation explicitly named (e.g., dependency-order-driven merges of issues not in the original arg list, or integration-branch merges the user didn't request).
  • Determine whether /merger's gh pr merge sites need a gate, and if so, design one that doesn't defeat the skill's purpose.
  • Same audit for /release's merge-adjacent behavior if in scope (see fix(skills): /merger and /release mutate the main checkout without participating in the checkout lock #911, which found /merger and /release both mutate the main checkout without the checkout lock — a related but distinct class of gap).

Non-Goals

Context

Originated from #958's Non-Goals: "No general tightening of the bare Bash allowed-tools grant across all skills — separate issue if wanted." Related: #911 (checkout lock), #817-#819 (human merge gate research).

Activity

  1. added
    bug
    on Aug 24, 2026
  2. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    Spec: Plan for #961

    Complexity: Standard (3 ACs, ~4 directories)

    AC Quality Check

    • ⚠️ The three proposal checkboxes are not in AC-N: format — extractAcceptanceCriteria finds 0 ACs, so downstream /exec//qa have nothing machine-readable to verify against. Formalized ACs below (single-line, per the line-anchored parser); consider copying them into the issue body.
    • ⚠️ AC-2 ("design one that doesn't defeat the skill's purpose") and AC-3 ("if in scope") are open-ended — resolved below as explicit decision points rather than left vague.

    Scope Assessment

    Non-Goals: present in issue body ✅ (no /fullsolve changes, no sequant merge changes).

    Metric Value Status
    Feature count 1 (audit + possible narrow rule) ✅
    AC items 3 ✅
    Directory spread 3 mirrored skill dirs + docs ✅ (mirrors count as one logical site)

    Verdict: ✅ SCOPE_OK

    Acceptance Criteria (formalized)

    • AC-1: Audit report posted on this issue enumerating every merge/close/push site in /merger (all 3 mirrors: .claude/skills/, templates/skills/, skills/) with a per-site verdict on whether it can act beyond the issues named in the /merger <issue-numbers> invocation. — Verification: Manual (audit artifact). Scenario: Given the 3 mirrors → When each gh pr merge/gh pr create/branch-mutation site is enumerated → Then each has file:line + in/out-of-named-set verdict.
    • AC-2: Decision recorded (and implemented if needed) on gating /merger's gh pr merge — one of the issue's three outcomes, with rationale tied to AC-1 evidence. — Verification: Manual (decision record); if SKILL.md edits land, gate test scoped to the new section + mutation-verified marker in the PR body (per CLAUDE.md testing rule).
    • AC-3: /release merge-adjacent audit recorded: confirm it has no gh pr merge sites and that its git push origin main sites are core-purpose + lock-protected, or file a follow-up. — Verification: Manual (audit note).

    Pre-Audit Findings (context gathering already surfaced these)

    1. /merger has exactly one gh pr merge site — SKILL.md:271, clean-merge path — identical across all 3 mirrors (verified in sync). The integration-branch path only runs gh pr create; the integration PR is left for a human.
    2. Consent analysis supports the issue's framing: unlike pre-fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958 /fullsolve (merge as hidden side effect contradicting its own stop-list), merging the named issues is /merger's stated purpose. An --auto-merge-style gate on the main path would defeat the skill.
    3. Two out-of-named-set ambiguities found (the class AC-1 targets):
      • Dependency Detection: "If dependencies found, enforce merge order" — silent on whether an unmerged dependency outside the arg list may be pulled in, or should halt.
      • Stacked PR Detection (feat(cli): --stacked flag — set chain-mode PR base to predecessor branch #605): covers out-of-order requests within the arg list ("Continue anyway? (y/N)" — a confirmation already exists there), but is silent on a mid-stack PR whose predecessor wasn't named — "merge in manifest order" language could induce merging an unnamed predecessor.
    4. /release: no gh pr merge; two git push origin main sites (Steps 6–7), both core to releasing, and fix(skills): /merger and /release mutate the main checkout without participating in the checkout lock #911's checkout-lock fix already landed there. Expected AC-3 verdict: no change.

    Implementation Plan

    Phase 1 — Audit + decision record (exec):

    1. Finalize the AC-1 audit table (sites above + a sweep for gh pr close / git push in /merger) and post it on this issue.
    2. Record the AC-2 decision. Recommended: outcome 2 (narrow rule), not a flag gate — add a short "Named-Set Boundary" rule to /merger/SKILL.md: never merge or close a PR whose issue is not in the invocation's arg list; on an unmerged out-of-set dependency or stack predecessor, halt and report (offering the widened command for the user to run) instead of widening. Amend the Dependency Detection and Stacked PR sections to reference it.
    3. Record the AC-3 /release verdict (expected: no change needed).

    Phase 2 — Apply (if recommendation confirmed):
    4. Edit /merger/SKILL.md in all 3 mirrors, keeping them byte-identical.
    5. Add a gate test asserting the Named-Set Boundary section (scoped to a delimited region, not whole-file), mutation-verify it, and record the Mutation-verified: marker in the PR body.

    Design Review

    1. Where does this logic belong? In /merger/SKILL.md prose (all 3 mirrors) — it's an LLM-interpreted behavior rule; no runtime TS duplicates it (sequant merge is out of scope per Non-Goals).
    2. Simplest correct approach? A boundary rule + halt-and-report, ~15 lines. Rejected: --auto-merge flag (defeats purpose), interactive y/N prompts on every merge (breaks batch use; stacked-PR section already has a targeted one).
    3. Existing pattern? fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958's merge-gate delimited section (<!-- BEGIN: merge-gate (#958) -->) — reuse the BEGIN/END-marker style for the gate test's scoped region.
    4. Senior-reviewer challenge? "Isn't outcome 1 (no change) enough?" — the two silent out-of-set ambiguities in §Dependency Detection and §Stacked PR are exactly where an agent 'helpfully' merges something the user never named; closing them is cheap and doesn't touch the core path.

    Open Questions

    1. Treatment choice (the human decision fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958 deferred). Recommendation: outcome 2, scoped to the Named-Set Boundary rule above. Impact if wrong: outcome 1 leaves the two ambiguities as latent unconsented-merge paths; a full flag gate breaks /merger's core function.
    2. Sibling observation (surfacing, not scope-widening): /merger's regression gate (Step 7) says "merge is blocked," but the gh pr merge calls in Step 5 have already landed by then — the gate is post-hoc wording over an already-executed side effect. Recommendation: file as a separate follow-up issue; out of audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961's consent-gate scope.

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Audit/decision deliverable with at most a small mirrored prose edit + one gate test; bug label, no unit/integration-verified ACs → skip testgen; no UI → skip test.

  3. added
    planned
    on Aug 26, 2026
  4. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    Exec: Implementation complete

    PR: #967

    Pre-PR AC Verification

    AC Description Status Evidence
    AC-1 Audit report enumerating every merge/close/push site in /merger ✅ Implemented See PR body table; only 2 mutating sites exist (gh pr merge line 271, gh pr create line 315), identical across 3 mirrors
    AC-2 Decision recorded and implemented (Named-Set Boundary rule) ✅ Implemented merger/SKILL.md (3 mirrors) + gate test merger-named-set-boundary-skill.test.ts, mutation-verified
    AC-3 /release merge-adjacent audit ✅ Implemented No gh pr merge in /release; git push origin main sites are lock-protected since #911. No change needed.

    Files changed

    • .claude/skills/merger/SKILL.md, skills/merger/SKILL.md, templates/skills/merger/SKILL.md — added Named-Set Boundary rule, amended Dependency Detection + Stacked PR Detection
    • src/lib/__tests__/merger-named-set-boundary-skill.test.ts — new gate test (mutation-verified)

    Checks

    • npm run build ✅
    • npm run lint ✅
    • npm run lint:skill-sync ✅ 44/44 synced
    • npx vitest run (merger gate tests) ✅ 33/33
    • npm test (full suite): 5689 passed, 3 pre-existing failures unrelated to this change (batch-executor.test.ts feat(tui): enrich nowLine with per-file / log-tail activity #543, prompt-wait.test.ts relay flake) — not touched by this PR

    Quality Plan Alignment

    N/A — spec's Recommended Workflow was exec → qa with quality loop disabled; no derived ACs or quality plan checklist beyond the 3 formalized ACs above.

    Pre-PR Confidence Check

    • Weakest part: The Named-Set Boundary rule is prose-only guidance for an LLM-interpreted skill, not enforced by runtime code — a future edit could silently drift from it without the gate test catching intent, only text presence.
    • Coverage gaps: None for the changed surface — the gate test covers the new rule text and its references in both amended sections, mutation-verified.

    Next steps

    Ready for /qa.

  5. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #961

    Reviewed: PR #967 (feature/961-audit-merger-determine-whether-the-unconditional-g @ 2cf3dc39), Standard QA (diff = 222 lines changed, above the 100-line small-diff threshold).

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Audit report posted on this issue enumerating every merge/close/push site in /merger (3 mirrors) with per-site verdict MET The enumerated table (6 rows: gh pr merge line 271, gh pr create line 315, absence of gh pr close/git push origin main, plus the two out-of-named-set ambiguities in Dependency Detection and Stacked PR Detection) was posted to PR #967's body, not directly on issue #961 — the exec comment on the issue only linked to it. Reproduced verbatim below to literally satisfy "posted on this issue" as of this review.
    AC-2 Original Decision recorded and implemented (Named-Set Boundary rule), gate-test scoped + mutation-verified marker in PR body MET (see Mutation Verification gate below — floors overall verdict) Rule text verified present in merger/SKILL.md (all 3 mirrors, byte-identical); Dependency Detection and Stacked PR Detection sections correctly amended to defer to it. Gate test merger-named-set-boundary-skill.test.ts (9 tests) passes and correctly targets the delimited region. However, the SEQUANT_MUTATION marker in PR #967's body is misclassified by classifyMutationMarker as test_not_in_diff — see Mutation Verification.
    AC-3 Original /release merge-adjacent audit recorded (no gh pr merge, git push origin main core-purpose + lock-protected, or follow-up filed) MET Confirmed via direct grep: zero gh pr merge sites in /release; both git push origin main sites (Step 6, tag-recovery block) are checkout-lock-protected since #911 (ace4a9be). No follow-up needed — correctly concluded "no change."

    Coverage: 3/3 AC items MET on substance; 1 gate (Mutation Verification) fails independently and floors the verdict — see below.

    AC-1 audit table (reproduced here to satisfy "posted on this issue"):

    Site File:line In/out of named-set risk
    gh pr merge <PR_NUMBER> --squash merger/SKILL.md:271 (clean-merge path) Bounded — runs per-issue inside the loop over the named set
    gh pr create --title "feat: Integrate ..." merger/SKILL.md:315 (integration-branch path) Creates a new integration PR; never merges, left for a human
    gh pr close none found No actual close command anywhere; only prose in the example report
    git push origin main none found /merger never pushes to main directly
    Dependency Detection ("enforce merge order") merger/SKILL.md (pre-fix) ⚠️ Was silent on an unmerged dependency outside the named set — now closed by the Named-Set Boundary rule
    Stacked PR Detection (#605) step 3 ("Continue anyway? (y/N)") merger/SKILL.md (pre-fix) ⚠️ Confirmation covered reordering within the named set only; silent on an unnamed stack predecessor — now closed

    Quality Plan Verification

    N/A — No Feature Quality Planning section found in issue comments (confirmed via grep -i "Feature Quality Planning" on the spec comment).


    Precheck Findings

    Section Status Surfaced
    Fixtures not_applicable No motivating-example payload in issue body
    Sibling-grep not_applicable No source-file declarations changed (docs/skill prose + one new test file)
    AC literal-diff pass PR body ACs (AC-1, AC-2, AC-3) match; issueACs empty because #961's formalized ACs live in the /spec comment, not the issue body itself — expected for this issue's structure, not a gap

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    typecheck SUCCESS pass ✅ MET
    build (22.x) IN_PROGRESS pending ⏳ PENDING
    Hooks Validation SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET
    Plugin Structure Validation SUCCESS pass ✅ MET
    node-floor-guard SUCCESS pass ✅ MET
    Setup Directory Creation SUCCESS pass ✅ MET
    validate-plugin SUCCESS pass ✅ MET
    tautology-advisory SUCCESS pass ✅ MET

    CI Summary: 8 passed, 1 pending, 0 failed. Diff is not markdown-only (includes a new .test.ts file), so the markdown-only relaxation does not apply — build (22.x) is a gating pending check. This does not change the final verdict below (already floored by Mutation Verification), but would independently route to NEEDS_VERIFICATION once code-level gates are resolved.


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 4 OK
    Lines added +213 -
    Lines deleted -9 -

    Cache Status

    N/A — manual/sub-agent review used for this pass, not the quality-checks.sh caching pipeline.


    Build Verification

    N/A — npm run build passed clean.


    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    .claude/skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    templates/skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    src/lib/__tests__/merger-named-set-boundary-skill.test.ts Optional (test file) N/A (is the test) -

    Coverage: 3/3 changed non-test files have a corresponding gate test. No critical-path (auth/payment/security/admin) files touched.


    Code Review

    Strengths:

    Issues:

    Suggestions:

    • None beyond the required fixes above — the rule design itself is sound and appropriately minimal (~15 lines, matching the spec's own size estimate).

    Skill Command Verification

    Skill files changed: 3 (mirrors of one logical change)

    No new commands were introduced by this diff — the added prose only references the pre-existing gh pr merge/gh pr create commands (unchanged, already in production use). No new JSON fields or CLI syntax to verify.

    Verification Status: Passed (no new commands to verify)


    Skill Change Review

    • Command verified: No new commands introduced; existing gh pr merge/gh pr create unchanged.
    • Fields verified: N/A — no new JSON field usage.
    • Patterns complete: The rule covers both silent-widen paths identified in the audit (Dependency Detection, Stacked PR Detection); no other /merger control-flow path merges outside the loop over the named set.
    • Dependencies explicit: No new tool dependencies (still assumes gh CLI, unchanged from the rest of the skill).

    Smoke Test

    Test Command Result Notes
    Happy path npx vitest run src/lib/__tests__/merger-named-set-boundary-skill.test.ts ✅ 9/9 pass against the real (unmutated) file
    Edge case Mutate "Named-Set Boundary" phrase in skills/merger/SKILL.md, re-run same test ✅ Exactly 2/9 tests failed (the two section-reference checks for the mutated root) — precise, not over- or under-triggering
    Error handling Restore mutation, re-run ✅ 9/9 pass again; git status clean after restore

    Smoke Test Status: Complete


    Manual Test ACs

    N/A by mechanical detection (the spec's **Verification:** Manual (audit artifact) / Manual (decision record) phrasing doesn't match the Manual Test/corpus check/N samples keyword patterns §7 step 3a scans for). However, these ACs' declared manual-verification intent was satisfied directly in this QA pass: I independently re-derived the audit table (AC-1), re-read and confirmed the decision rationale against the audit evidence (AC-2), and independently confirmed the /release grep findings (AC-3) — see AC Coverage table above.


    CLI Registration Verification

    N/A — no RunOptions/CLI option interface files modified.


    Behavior-Rule Survival Check

    AC Triggered? Survivors Status
    AC-2 No (ran detectBehaviorRule against the literal AC-2 text — did not trigger the heuristic) — N/A

    Status: N/A


    Declared-Evidence Execution

    N/A — no AC in the spec comment uses the literal Evidence: clause format (splitEvidenceClause requires the token Evidence:; this spec used — Verification: Manual (...) instead, which the parser does not treat as a declared runnable-command clause).


    Mutation Verification

    AC Gate Test? Marker Status
    AC-2 Yes (introduces merger-named-set-boundary-skill.test.ts, a fixture/section-presence gate test per CLAUDE.md) src/lib/__tests__/merger-named-set-boundary-skill.test.ts — 2 of 9 tests (...) Failed — classifyMutationMarker returns test_not_in_diff: the failedTest field has no > separator, so the whole prose string is read as the file path and matches nothing in the diff's test files. Confirmed by running classifyMutationMarker directly against the PR body and the diff's test file list.
    AC-1, AC-3 No (audit/decision-record ACs, not gate tests) — N/A

    Status: Failed

    Note: The underlying mutation-verification work is genuine — I independently reran the mutate → 2 tests fail → restore → 9 tests pass sequence and got the same result the PR body claims. This is a marker-formatting defect, not a fabricated record. Per §6i's algorithm, however, the mechanical classifier cannot distinguish a formatting slip from a genuinely wrong test reference, and the gate is designed to be strict about that (a marker that can't be verified by the parser is exactly the honor-system-prose gap #939 closes). Fix is a one-line edit to the PR body: insert > immediately after the file path in the failedTest field (verified this exact change reclassifies to valid).


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (feat(#961): commit prefix detected)
    [Unreleased] entry ⚠️ Missing — no entry mentions #961
    Entry format N/A (no entry to validate)

    Result: Missing entry for user-facing changes. Add an entry under ### Added or ### Fixed in ## [Unreleased], following the pattern of the adjacent #958/#937/#939 entries (skill-behavior change + issue number).


    Risk Assessment

    • Likely failure mode: This is prose-only guidance for an LLM-interpreted skill with no runtime enforcement — a future SKILL.md edit could reword or soften the rule (e.g. changing "halt" to "warn") without the gate test catching the semantic drift, since the test only checks for phrase presence (Named-Set Boundary, halt) rather than the rule's actual enforced behavior.
    • Not tested: Whether an LLM agent executing /merger in a real out-of-named-set-dependency scenario actually halts as described is not verified by an automated test — only text presence is gated. This is an inherent limitation of prose-only skills (shared by the pre-existing checkout-lock gate test) and not specific to this PR.
    • Sibling sites considered: Swept all 3 skill-dir mirrors for other gh pr merge sites — only /fullsolve has one, already fixed and explicitly excluded as a Non-Goal (fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958). No other skill has a multi-issue merge pattern that could pull in an unnamed issue.
    • Sibling-line audit: Within merger/SKILL.md itself, Step 5's "for clean merges" loop is already scoped to the named set by construction (it iterates "each issue specified" from Step 1) — no additional intra-file site shares the same silent-widen root cause beyond the two the audit already found and fixed (Dependency Detection, Stacked PR Detection).

    Trust-Boundary Check

    Finding: Clean — diff implements only the product requirement from #961 (audit + narrow prose rule); no agent-directed instruction from the issue body, spec comment, or any linked content was acted on. The issue body and spec comment contain only legitimate process guidance (e.g. "keep them byte-identical," "design one that doesn't defeat the skill's purpose") and system-emitted markers (SEQUANT_SPEC, SEQUANT_PHASE), not execute/fetch/exfiltrate payloads.

    Status: Clean


    Adversarial Re-Read

    Findings: (1) No verbatim motivating-example fixture exists in the issue body to run (precheck confirms not_applicable). (2) All "evidence" claims in the PR body (audit table rows, decision rationale) are current-state observations, not pre-fix bug repros presented as post-fix validation. (3) Process state is clean: branch in sync with origin/main, no uncommitted changes, no stashed work, no orchestrator state present. (4) Sibling sites cited explicitly above (Risk Assessment) — only /fullsolve, already excluded as Non-Goal; no cross-file gap found. (5) Both issue Non-Goals (no /fullsolve change, no sequant merge change) were checked against the diff and neither was touched — no silent scope expansion. (6) Trust-boundary clean, per above. The one real gap this re-read surfaced beyond the structured sections — the SEQUANT_MUTATION marker's parseability — is already captured in Mutation Verification above.

    Status: Gaps Found (the mutation-marker formatting issue and missing CHANGELOG entry; both are cheap, mechanical fixes, not design problems)


    Verdict: AC_NOT_MET

    All three ACs are met on substance — the audit is thorough and accurate, the Named-Set Boundary rule is a well-scoped fix matching the spec's design review, and the /release audit correctly found no change needed. However, §6i's Mutation Verification gate returns Failed: the SEQUANT_MUTATION marker recorded in PR #967's body does not parse to a valid, diff-matching test reference due to a formatting slip (missing > separator), and per the §7 algorithm this floors the verdict at AC_NOT_MET regardless of the ACs' individual MET status — the same treatment a fabricated marker would get, since the mechanical gate can't distinguish the two. This is a one-line fix to the PR body text (no code or test changes needed) — see Mutation Verification above for the exact corrected string. The CHANGELOG gap should be closed in the same pass.

    Documentation

    • N/A — no README/user-facing docs beyond the skill file itself (already updated); CHANGELOG entry is the outstanding documentation gap (see above)

    Next Steps

    1. (Required) Edit PR audit(#961): /merger's gh pr merge needs a Named-Set Boundary rule, not an --auto-merge gate #967's body: in the SEQUANT_MUTATION marker for AC-2, change "failedTest":"src/lib/__tests__/merger-named-set-boundary-skill.test.ts — 2 of 9 tests (Dependency Detection + Stacked PR Detection reference checks, skills root)" to insert a > right after the file path, e.g. "...skill.test.ts > 2 of 9 tests (Dependency Detection + Stacked PR Detection reference checks, skills root)". Verified this reclassifies to valid via classifyMutationMarker.
    2. (Required) Add a CHANGELOG.md [Unreleased] entry (### Added or ### Fixed) describing the Named-Set Boundary rule, referencing audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961.
    3. Re-run /qa 961 once both are fixed and CI's build (22.x) completes.

    Structured Gap Findings

  6. added
    needs-work
    on Aug 26, 2026
  7. added a commit that references this issue on Aug 26, 2026
  8. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    Loop Iteration 1/3

    Issues from Previous Phase (QA verdict: AC_NOT_MET)

    1. (test_gap, fix_now) PR audit(#961): /merger's gh pr merge needs a Named-Set Boundary rule, not an --auto-merge gate #967's SEQUANT_MUTATION marker for AC-2 had a failedTest field with no > separator, so classifyMutationMarker misread the whole prose string as the file path and returned test_not_in_diff for a test genuinely present in the diff.
    2. (requirement_gap, fix_now) CHANGELOG.md's [Unreleased] section had no entry for audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961 despite the feat(#961): commit prefix.

    (The third finding, AC-1's audit table being reproduced only in the QA comment rather than posted separately, was marked recommendedAction: document and excluded per the loop's "Excluded Finding Classes" filter — not actionable by a code change.)

    Fixes Applied

    Re-validation Results

    • Build: ✅ npm run build clean
    • Lint: ✅ npm run lint clean (0 errors)
    • Tests: ✅ 33/33 passed (merger-named-set-boundary-skill.test.ts 9/9, merger-checkout-lock-skill.test.ts 24/24 regression check)
    • Mutation marker: ✅ re-parsed via parseMutationMarkers/classifyMutationMarker against the corrected PR body — "classification":"valid"
    • CHANGELOG: ✅ [Unreleased] section now contains an entry mentioning #961
    • No-Diff Guard: ✅ HEAD advanced 2cf3dc39 → baa43d54 (real commit, not a no-op)
    • CI: a fresh run kicked off on push (baa43d54) — several checks back to pending/IN_PROGRESS as of this comment; not a regression, just the normal re-run for the new commit

    Status

    FIXED — both fix_now findings from the QA pass are resolved and independently re-verified against the same mechanical checks that flagged them. Recommend a fresh /qa 961 once CI on baa43d54 completes, for the authoritative verdict.

  9. removed
    needs-work
    on Aug 26, 2026
  10. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    Exec: Skipped (already implemented)

    Implementation for #961 was already completed in a prior /exec pass and subsequently fixed via /loop after QA found AC_NOT_MET. Re-verified current state rather than re-implementing:

    • Branch feature/961-audit-merger-determine-whether-the-unconditional-g clean, in sync with origin.
    • Commits: 2cf3dc39 (Named-Set Boundary rule + gate test), baa43d54 (CHANGELOG fix).
    • PR audit(#961): /merger's gh pr merge needs a Named-Set Boundary rule, not an --auto-merge gate #967 open, MERGEABLE.
    • CI: 8/9 checks passing, build (22.x) still in progress.
    • Both QA-identified gaps (malformed SEQUANT_MUTATION marker, missing CHANGELOG entry) were fixed in the /loop iteration and independently re-verified.

    Note: the original /exec pass never posted the exec:completed phase marker (a bookkeeping gap, not a functional one) — posting it now so phase-detection reflects reality.

    Next Steps

    Run /qa 961 for a fresh verdict now that both required fixes are in place.

  11. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #961

    Reviewed: PR #967 (feature/961-audit-merger-determine-whether-the-unconditional-g @ baa43d54), Standard QA (diff = 224 lines changed, above the 100-line small-diff threshold). This is a re-run — the prior QA pass at 2cf3dc39 returned AC_NOT_MET (malformed SEQUANT_MUTATION marker + missing CHANGELOG entry); both were fixed via /loop and are independently re-verified below.

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Audit report posted on this issue enumerating every merge/close/push site in /merger (3 mirrors) with per-site verdict MET Full enumerated table (6 rows) reproduced in the prior QA comment on this issue, satisfying "posted on this issue." Re-verified: only gh pr merge (line 271) and gh pr create (line 315) are mutating sites; no gh pr close/git push origin main anywhere in /merger.
    AC-2 Original Decision recorded and implemented (Named-Set Boundary rule), gate-test scoped + mutation-verified marker in PR body MET Rule present in merger/SKILL.md (3 mirrors, byte-identical). Dependency Detection and Stacked PR Detection correctly amended. Gate test passes 9/9. SEQUANT_MUTATION marker re-parsed via classifyMutationMarker against the current diff's test files → "classification":"valid" (previously test_not_in_diff due to a missing > separator; fixed in the /loop pass).
    AC-3 Original /release merge-adjacent audit recorded (no gh pr merge, git push origin main core-purpose + lock-protected, or follow-up filed) MET Re-confirmed: zero gh pr merge sites in /release; both git push origin main sites are checkout-lock-protected since #911. No follow-up needed.

    Coverage: 3/3 AC items MET.


    Quality Plan Verification

    N/A — No Feature Quality Planning section found in issue comments.


    Precheck Findings

    Section Status Surfaced
    Fixtures not_applicable No motivating-example payload in issue body
    Sibling-grep not_applicable No source-file declarations changed (docs/skill prose + one new test file)
    AC literal-diff pass PR body ACs (AC-1, AC-2, AC-3) present; issueACs empty because #961's formalized ACs live in the /spec comment, not the issue body — expected, not a gap

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    build (22.x) IN_PROGRESS pending ⏳ PENDING
    Plugin Structure Validation SUCCESS pass ✅ MET
    node-floor-guard SUCCESS pass ✅ MET
    Hooks Validation SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET
    Setup Directory Creation SUCCESS pass ✅ MET
    typecheck SUCCESS pass ✅ MET
    validate-plugin SUCCESS pass ✅ MET
    tautology-advisory SUCCESS pass ✅ MET

    CI Summary: 8 passed, 1 pending, 0 failed. Diff is not markdown-only (includes CHANGELOG.md and a .test.ts file), so the markdown-only relaxation does not apply — build (22.x) is a gating pending check.


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 5 OK
    Lines added +215 -
    Lines deleted -9 -

    Cache Status

    N/A — manual/sub-agent review used for this pass, not the quality-checks.sh caching pipeline.


    Build Verification

    N/A — npm run build passed clean.


    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    .claude/skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    templates/skills/merger/SKILL.md Optional (skill prose) ✅ Yes merger-named-set-boundary-skill.test.ts
    CHANGELOG.md Optional (docs) N/A -
    src/lib/__tests__/merger-named-set-boundary-skill.test.ts Optional (test file) N/A (is the test) -

    Coverage: 3/3 changed non-doc files have a corresponding gate test. No critical-path files touched.


    Code Review

    Strengths:

    • Both gaps from the prior QA pass were fixed correctly and precisely — the mutation marker fix (> insertion) is exactly the minimal change verified in the prior review, and the CHANGELOG entry follows the established format (bold summary, issue number, verb-led).
    • Re-derivation of every substantive claim (audit table, decision rationale, /release grep) independently reproduces the same results as the prior pass — no regression from the fix commits.
    • gh api ... -X PATCH -F body=@file was correctly used to work around the known gh pr edit --body-file Projects-classic GraphQL error (a real repo-specific gotcha, handled correctly).

    Issues:

    • None found in this pass.

    Suggestions:

    • None — the rule design remains sound and appropriately minimal.

    Skill Command Verification

    Skill files changed: 3 (mirrors of one logical change)

    No new commands introduced; prose only references the pre-existing, previously-verified gh pr merge/gh pr create commands.

    Verification Status: Passed


    Skill Change Review

    • Command verified: No new commands introduced.
    • Fields verified: N/A.
    • Patterns complete: Rule covers both silent-widen paths (Dependency Detection, Stacked PR Detection).
    • Dependencies explicit: No new tool dependencies.

    Smoke Test

    Test Command Result Notes
    Happy path npx vitest run src/lib/__tests__/merger-named-set-boundary-skill.test.ts ✅ 9/9 pass
    Edge case Mutate "Named-Set Boundary" phrase, re-run ✅ (verified in prior pass) 2/9 fail as expected
    Error handling Restore mutation ✅ (verified in prior pass) 9/9 pass again

    Smoke Test Status: Complete


    Manual Test ACs

    N/A — spec's **Verification:** Manual (audit artifact/decision record) phrasing doesn't match the mechanical detection pattern, but the underlying artifacts were independently re-verified in the AC Coverage table above.


    CLI Registration Verification

    N/A — no RunOptions/CLI option interface files modified.


    Behavior-Rule Survival Check

    AC Triggered? Survivors Status
    AC-2 No (detectBehaviorRule against literal AC-2 text does not trigger) — N/A

    Status: N/A


    Declared-Evidence Execution

    N/A — no AC uses the literal Evidence: clause format (spec used — Verification: Manual (...) instead).


    Mutation Verification

    AC Gate Test? Marker Status
    AC-2 Yes src/lib/__tests__/merger-named-set-boundary-skill.test.ts > 2 of 9 tests (...) Verified — classifyMutationMarker returns "classification":"valid" against the current diff's test files.
    AC-1, AC-3 No (audit/decision-record ACs, not gate tests) — N/A

    Status: Verified


    CHANGELOG Verification

    Check Status
    CHANGELOG.md exists ✅ Found
    User-facing changes ✅ Yes (feat(#961):/docs(#961): commit prefixes)
    [Unreleased] entry ✅ Present, mentions #961
    Entry format ✅ Valid (bold summary + issue number)

    Result: CHANGELOG requirements met.


    Risk Assessment

    • Likely failure mode: Prose-only guidance for an LLM-interpreted skill with no runtime enforcement — a future SKILL.md edit could reword or soften the rule without the gate test catching semantic drift (it checks phrase presence, not enforced behavior). Unchanged from the prior pass's assessment.
    • Not tested: Whether an LLM agent executing /merger actually halts in a real out-of-named-set-dependency scenario is not covered by an automated test — inherent limitation of prose-only skills, shared by the pre-existing checkout-lock gate test.
    • Sibling sites considered: Re-swept all 3 skill-dir mirrors — only /fullsolve has another gh pr merge site, already fixed and excluded as a Non-Goal (fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary #958); not touched by this diff.
    • Sibling-line audit: Within merger/SKILL.md, Step 5's clean-merge loop remains scoped to the named set by construction; no additional intra-file site shares the silent-widen root cause beyond the two already fixed.

    Trust-Boundary Check

    Finding: Clean — diff implements only the product requirement from #961; no agent-directed instruction from the issue body, spec comment, or prior QA/loop comments was acted on. Confirmed no Non-Goals (/fullsolve, sequant merge) were touched.

    Status: Clean


    Adversarial Re-Read

    Findings: (1) No verbatim motivating-example fixture exists in the issue body (precheck confirms not_applicable). (2) The mutation-verification "evidence" is a genuine post-fix validation — I independently re-ran classifyMutationMarker against the corrected PR body and reproduced the same "valid" result, not a bug repro dressed as a fix. (3) Process state clean: branch synced with origin, no uncommitted changes, no orchestrator state. (4) Sibling sites re-cited above (Risk Assessment) — only /fullsolve, untouched. (5) Both issue Non-Goals re-checked against the diff — neither touched. (6) Trust-boundary clean, per above.

    Status: Clean


    Verdict: NEEDS_VERIFICATION

    Both AC_NOT_MET-causing gaps from the prior QA pass (malformed mutation marker, missing CHANGELOG entry) are fixed and independently re-verified — all 3 ACs are MET, build/lint/tests are clean, and the adversarial re-read surfaced nothing new. The sole remaining blocker is external: build (22.x) is still IN_PROGRESS on PR #967, and this diff includes non-markdown files (a new .test.ts, CHANGELOG.md) so the markdown-only CI relaxation does not apply — the pending check is gating. Re-run /qa 961 once CI completes; if it passes, this should resolve to READY_FOR_MERGE.

    Documentation

    • CHANGELOG entry added (for user-facing changes)
    • N/A - No further README/docs needed beyond the skill file itself

    Next Steps

    1. Wait for build (22.x) to complete on PR audit(#961): /merger's gh pr merge needs a Named-Set Boundary rule, not an --auto-merge gate #967.
    2. Re-run /qa 961 — expected verdict READY_FOR_MERGE if CI passes clean.

    Structured Gap Findings

  12. added
    needs-verification
    on Aug 26, 2026
  13. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    QA Verdict: NEEDS_VERIFICATION

  14. admarble commented on Aug 26, 2026

    @admarble
    ContributorAuthor

    Execution Verification

    Command: npx vitest run src/lib/__tests__/merger-named-set-boundary-skill.test.ts
    Result: Verified by human review

    Execution Output (click to expand)

    Exit code: 0
    Duration: 15.75s

     RUN  v4.1.10
     Test Files  1 passed (1)
          Tests  9 passed (9)
       Start at  23:10:43
       Duration  15.75s
    

    Also ran npm run lint:skill-sync: exit 0, 44 synced, 0 diverged, 0 missing.

    CI on PR #967: all 9 checks pass (gh pr checks 967), including build (22.x) — the sole IN_PROGRESS check that floored the last /qa pass's verdict to NEEDS_VERIFICATION. That was the only remaining blocker; it has since resolved to pass.

    Human Confirmation:

    CI is green, the mutation-verified gate test passes independently (9/9), and no outstanding QA gaps remain. Ready for merge.


    Verified by /verify command

  15. added a commit that references this issue on Aug 26, 2026
  16. added 2 commits that reference this issue on Sep 9, 2026
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

    bugneeds-verificationplanned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions