Bug: post-merge hook false alarm on successful squash merge #189
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#189
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
Recurrence of #173 (fixed in PR #177, validated same day). Original fix added two-stage jq parsing but symptom has returned — likely the actual PostToolUse stdin JSON shape no longer matches either parsing path.
Repo
forgejo_admin/claude-customWhat Broke
After merging PR #226 via
mcp__forgejo__merge_approved_pr, thePostToolUsehook fired with:But the API returned
{"merged": true, "method": "squash"}and the commit landed onorigin/main(verified viagit fetch + git log). The hook produced a false negative, suppressing the/update-docsreminder that should have fired.Repro Steps
comment_on_prwith VERDICT: APPROVEDmcp__forgejo__merge_approved_pr(owner, repo, pr_number)merged: trueExpected Behavior
Hook should detect the successful merge and fire the
/update-docsreminder instead of the error message.Environment
remind-update-docs.sh(PostToolUse onmcp__forgejo__merge_approved_pr)post-mcp-merge-rebase.sh(PostToolUse onmcp__forgejo__merge_approved_pr)board-item-on-merge.sh(PostToolUse onmcp__forgejo__merge_approved_pr)remind-update-docs.sh:21-24,post-mcp-merge-rebase.sh:13-16,board-item-on-merge.sh:37-40Acceptance Criteria
/tmp/hook-debug.jsonbefore attempting any fixmerged:truefrom PostToolUse stdinRelated
project-pal-e-agencyforgejo_admin/pal-e-api #226— the merge that triggered thisScope Review: NEEDS_REFINEMENT
Review note:
review-505-2026-03-27Regression of #173 -- fix is present in code (two-stage jq parsing) but symptom returned. Likely the actual PostToolUse stdin JSON shape doesn't match either parsing path.
board-item-on-merge.shas third affected hook (currently missing from Environment)remind-update-docs.sh:21-24,post-mcp-merge-rebase.sh:13-16,board-item-on-merge.sh:37-40All 5 refinements from
review-505-2026-03-27applied:board-item-on-merge.shadded as third affected hookReady for re-review.
Scope Review: READY
Review note:
review-505-2026-03-28Ticket is well-scoped with accurate file targets (all 3 line ranges verified), complete traceability triangle, debug-first AC ordering, and clear lineage to #173. Single-repo, single-pattern fix across 3 files — no decomposition needed. Ready for
next_up.