Review: Bug: merge_approved_pr has no approval gate hook
Verdict: BLOCK
Template Completeness
- [x] Type — Bug
- [x] Lineage — Standalone, discovered during svelte-playground deploy
- [x] Repo — ldraney/claude-custom
- [x] What Broke — describes the missing hook
- [x] Repro Steps — 3 steps provided
- [x] Expected Behavior — describes the desired hook behavior
- [x] Environment — local (claude-custom hooks)
- [x] Acceptance Criteria — 3 criteria provided
- [x] Related — references feedback rule, SOP, and project
All template sections present. Template is complete.
Traceability
- [x] story:pm-scope label — PM scope enforcement story
- [x] arch:ci-pipeline label — CI pipeline architecture component
- [x] Forgejo issue — forgejo_admin/pal-e-platform#163, open
File Targets
- [x]
~/claude-custom/hooks/block-mcp-merge.sh— ALREADY EXISTS. Hook was added on 2026-02-24 (commit d05b103), refined on 2026-03-07 (commit fc065b8). UsespermissionDecision: "ask"to force user confirmation. - [x]
~/claude-custom/settings.jsonlines 94-101 — PreToolUse matcher onmcp__forgejo__merge_approved_pralready wired toblock-mcp-merge.sh.
CRITICAL: The bug described does not exist. All three acceptance criteria are already satisfied by the existing hook infrastructure.
Repo Placement
MISMATCH. Issue body says
Repo: ldraney/claude-custom but the Forgejo issue is filed under forgejo_admin/pal-e-platform. The fix (if one were needed) lives in claude-custom, not pal-e-platform. The issue is on the wrong repo.Dependencies
No dependencies on other board items. No blockers or blocked items identified.
Acceptance Criteria
- "Calling mcp__forgejo__merge_approved_pr triggers a PreToolUse hook" — Already true. settings.json line 94 matches this tool.
- "Hook blocks with a message requiring explicit user approval" — Already true. block-mcp-merge.sh outputs
permissionDecision: "ask"with message "MERGE GATE: About to merge PR #N on REPO. SOP requires explicit approval." - "No false blocks when user has explicitly said merge" — Already true. The "ask" decision type prompts the user; it does not hard-block. User can approve inline.
All acceptance criteria are already met by existing code.
Blast Radius
Blast radius check reveals comprehensive merge protection:
block-pr-merge.sh— PreToolUse on Bash, catchesgh pr mergeand Forgejo curl-based mergesblock-mcp-merge.sh— PreToolUse onmcp__forgejo__merge_approved_pr
Both merge vectors (Bash CLI and MCP tool) are gated. No unprotected merge paths found.
Recommendation
Close the Forgejo issue as invalid. The bug described does not exist — the hook was implemented on 2026-02-24 and is correctly wired. The issue was likely written based on stale information or a session where hooks were not loaded. If there was a real incident where the hook was bypassed, a new issue should be filed with specific repro evidence (session ID, timestamp) against
forgejo_admin/claude-custom, not pal-e-platform.