Add hook dispatch probes to isolate why bash-guard never fires

Registers five inert probe entries covering the 2x2 of timeout and
statusMessage on PreToolUse:Bash, plus a PostToolUse statusMessage cell.
Each probe is in its own matcher block so a dropped entry cannot take
the others with it, and logs its identity before reading stdin so a
failed dispatch stays distinguishable from a failed payload read.

The real bash-guard entry is unchanged and serves as the control.
This commit is contained in:
2026-07-20 15:15:49 -05:00
parent 391b2a3bc6
commit 0e9ccaad9f
2 changed files with 86 additions and 0 deletions
+50
View File
@@ -11,6 +11,46 @@
"statusMessage": "Checking jj/attribution policy; gating push on build + tests..."
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/probe.mjs\" P1-plain"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/probe.mjs\" P2-timeout-only",
"timeout": 600
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/probe.mjs\" P3-status-only",
"statusMessage": "probe P3 status-only"
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/probe.mjs\" P4-both",
"timeout": 600,
"statusMessage": "probe P4 both"
}
]
}
],
"PostToolUse": [
@@ -23,6 +63,16 @@
"timeout": 5
}
]
},
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/probe.mjs\" P5-post-status",
"statusMessage": "probe P5 post status"
}
]
}
]
}