Skip to content

fix(#958): gate /fullsolve's PR merge behind --auto-merge, off by default - #959

Merged
admarble merged 3 commits into
mainfrom
feature/958-fix-fullsolve-phase-5-3-auto-merges-the-pr-the
Aug 24, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/958-fix-fullsolve-phase-5-3-auto-merges-the-pr-the

Conversation

@admarble

@admarble admarble commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Reconciles /fullsolve's Auto-Progression stop-list ("final summary after PR creation") with Phase 5.3's previously-unconditional gh pr merge <N> --squash — the workflow's default terminal state is now explicitly PR created + final summary posted, not merged.
  • Gates §5.3 (merge), §5.4 (post-merge verification), and the auto-merge-path lock release (§5.5) behind --auto-merge / run.autoMerge (new settings key, default false) / explicit user instruction, across all three skill mirrors.
  • Drops Bash(gh pr merge:*) from /fullsolve's default allowed-tools so the permission prompt is a second, independent gate.
  • Adds src/lib/__tests__/fullsolve-merge-gate-skill.test.ts (39 tests) gating this text, mutation-verified for AC-2/AC-3/AC-5.

Closes #958

Pre-PR AC Verification

AC Description Status Evidence
AC-1 No-flag run ends at PR + final summary, no gh pr merge executed ✅ MET Live transcript, confirmed complete: this /fullsolve 958 session ran spec → exec → QA → PR #959 creation → final summary with no --auto-merge flag and no run.autoMerge setting, and correctly did not invoke gh pr merge. Post-hoc verification: gh pr view 959 confirms state: OPEN, mergedAt: null as of this update — the PR remained unmerged through the full run.
AC-2 Auto-Progression ↔ Phase 5 body no longer contradict; opt-in documented ✅ MET fullsolve-merge-gate-skill.test.ts — merge-gate delimited span assertions, mutation-verified
AC-3 Bash(gh pr merge:*) removed from all 3 mirrors ✅ MET Frontmatter assertions in the same test file, mutation-verified; lint:skill-sync green
AC-4 --auto-merge preserves prior end-to-end behavior (5.3 order + 5.5 release) ✅ MET Live transcript, run with explicit human confirmation: §5.3 order followed exactly — gh pr merge 959 --squash (merged 9316debe), then ./scripts/cleanup-worktree.sh (worktree + local + remote branch removed), then §5.4 post-merge verification (npm run build clean, npx sequant doctor 16/18 passed, 2 pre-existing unrelated warnings), then §5.5 lock release (idempotent no-op — already released via the default-path timing before this confirmation). Issue #958 auto-closed via the PR's Closes #958.
AC-5 Lock-release contract matches new default flow ✅ MET Phase 0.3 + §5.5 text assertions, mutation-verified

Mutation Verification

Mutation-verified: AC-2 — removed terminal-state disambiguation; test failed as expected; restored.
Mutation-verified: AC-3 — reintroduced Bash(gh pr merge:*); test failed as expected; restored.
Mutation-verified: AC-5 — removed §5.5 path bifurcation; test failed as expected; restored.

QA Summary

Verdict: READY_FOR_MERGE (all 5 ACs MET — see table above; merged with explicit human confirmation)

  • Build/Lint/Full suite: ✅ clean (272 test files, 5600 passed)
  • Type safety / deleted tests / scope-size / security sub-agent checks: ✅ all Pass
  • Trust-Boundary Check: Clean — diff implements only the stated product requirement (gate the merge command), no agent-directed instruction from issue text was acted on
  • Behavior-Rule Survival Check: reviewed manually — the detector's keyword-inverse scan surfaced ~25 "survivor" hits, all pre-existing unrelated prose (--skip-pid-check, "Skip testing phase", phase-skip table rows) or this PR's own new gate text; none represent the old unconditional-release rule surviving. Status: Clean.
  • CHANGELOG: [Unreleased] entry added
  • Sibling site: merger/SKILL.md:271 has the same unconditional gh pr merge pattern — out of scope per the issue's Non-Goals/human-decisions section; follow-up issue filed as audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961 (investigation, not a same-fix copy-paste — invoking /merger is itself explicit merge consent, unlike /fullsolve's hidden-side-effect bug).

Test plan

  • npm run build — passes
  • npm run lint — passes
  • npm test — full suite passes (272 files, 5600 tests)
  • npm run lint:skill-sync / lint:skill-calls / lint-skill-gates.ts — all clean
  • Mutation verification on AC-2, AC-3, AC-5 (see markers above)
  • AC-1: this /fullsolve session is the dogfood transcript through PR creation; PR confirmed unmerged post-hoc
  • AC-4: --auto-merge dogfood run completed with explicit human confirmation — this PR's own merge is the transcript
  • Follow-up filed: audit(/merger): determine whether the unconditional gh pr merge needs a confirmation gate, following #958 #961 (/merger merge-gate audit)

Merged: 9316debe (squash) · Post-merge build + sequant doctor: ✅ clean

🤖 Generated with Claude Code

…ault

Phase 5.3 ran an unconditional `gh pr merge` immediately after PR creation,
contradicting the Auto-Progression stop-list's own "final summary after PR
creation" halt condition. Reconcile the two: the workflow's terminal state
is now explicitly PR created + final summary posted, and merge (5.3),
post-merge verification (5.4), and the auto-merge-path lock release (5.5)
run only behind --auto-merge / run.autoMerge / explicit user instruction.
Drop Bash(gh pr merge:*) from the default allowed-tools grant so the
permission prompt is a second, independent gate.
Matches the existing coverage convention for the same-shaped precedent
field, run.effortEscalation (#915) — default false, explicit-true
round-trip, and a rejected non-boolean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(fullsolve): Phase 5.3 auto-merges the PR — the skill's own stop-list says to halt at the final summary

1 participant