Bug: merge_approved_pr post-hook reports false positive failure #173
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/claude-custom#173
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Discovered during pal-e-platform PR #192 merge (2026-03-27).
Repo
forgejo_admin/claude-customWhat Broke
The
PostToolUse:mcp__forgejo__merge_approved_prhook emits "Merge was not successful. Do NOT run /update-docs." even when the MCP tool returns a successful merge response:{"merged": true, "method": "squash", "message": "PR #192 merged via squash"}.This causes confusion about whether the merge actually happened and blocks the /update-docs SOP flow.
Repro Steps
mcp__forgejo__merge_approved_prvia MCP — merge succeedsmerged: truein responsemcp__forgejo__review_pr— PR is confirmed closed+mergedExpected Behavior
When the merge API returns
merged: true, the post-hook should NOT report failure. It should either stay silent or emit a success message.Environment
Acceptance Criteria
merged: truein MCP responseRelated
project-pal-e-agency— hooks are agency infrastructureforgejo_admin/pal-e-platform#192— PR where false positive was observedScope Review: READY
Review note:
review-426-2026-03-27Root cause identified: all 3 PostToolUse hooks for
mcp__forgejo__merge_approved_pruse.tool_response.mergedbut MCP tool responses wrap the return value inside.tool_response.resultas a JSON string. The jq expression never findsmergedat the expected path.Blast radius — 3 hooks affected, not 1:
remind-update-docs.sh(line 20) — emits false positive "Merge was not successful" (the reported symptom)post-mcp-merge-rebase.sh(line 12) — silently skips local main fast-forwardboard-item-on-merge.sh(line 36) — silently skips auto-move to doneBefore moving to next_up:
story:dev-executelabel (traceability gap)Validation: PASS
Validation note:
validation-173-2026-03-275 checks: 5 PASS, 0 FAIL
All acceptance criteria verified against live main branch (commit
a742d5f, PR #177). All 3 merge hooks (remind-update-docs.sh, post-mcp-merge-rebase.sh, board-item-on-merge.sh) now have identical two-stage jq parsing for.tool_response.result, matching the label-on-pr.sh reference pattern. False positive eliminated; failure path still correct.