* fix(#1772): read full multi-line command in graphify-update hook Gate 2 The PostToolUse hook joined tool_name + newline + tool_input.command and extracted the command with sed -n '2p' — line 2 only. Agent runtimes (Claude Code's Bash tool among them) routinely emit HEAD-advancing commits as multi-line scripts ('cd /path', then 'git add', then 'git commit …'), so line 2 is the 'cd', Gate 2's *"git commit"* match failed, and the rebuild silently no-op'd on real commits despite graphify.auto_update: true. Capture line 2 through EOF (sed -n '2,$p') so the case glob sees the full multi-line command string. Single-line behavior is unchanged (the match only widens); non-HEAD-advancing multi-line commands still no-op cleanly. Regression tests cover multi-line commit/merge/pull dispatch plus a multi-line no-op no-regression guard. * docs(#1772): add changeset fragment for graphify-update multi-line fix * test(#1772): regenerate golden-install-parity fixtures for hook change gsd-graphify-update.sh ships to 9 graphify-aware runtimes; widening the sed range (2p -> 2,$p) shifts its shipped hash. Recapture the 9 affected fixtures via UPDATE_GOLDEN=1 — each changes exactly one line (the hook hash).
900 B
type, pr
| type | pr |
|---|---|
| Fixed | 1815 |
gsd-graphify-update.sh now reads the full multi-line command in Gate 2 (#1772) — the PostToolUse auto-update hook joined tool_name + \n + tool_input.command and extracted the command with sed -n '2p' (line 2 only). Agent runtimes (Claude Code's Bash tool among them) routinely emit HEAD-advancing commits as multi-line scripts (cd /path, then git add, then git commit …), so line 2 was the cd, Gate 2's *"git commit"* match failed, and the rebuild silently no-op'd on real commits even with graphify.auto_update: true. The failure was invisible in manual probes because a single-line git commit -m x passes line 2 verbatim. The hook now captures line 2 through EOF (sed -n '2,$p') so the case glob sees the full command string; single-line behavior is unchanged and multi-line commands without a HEAD-advancing op still no-op cleanly.