fix: handle empty staged files in pre-commit hook#95
Conversation
athena-omt
left a comment
There was a problem hiding this comment.
Reviewed current head 0addaae locally. The empty-array guard correctly preserves hook behavior, and the new clean-feature-branch regression covers the failure path. Targeted smoke test and typecheck passed. Branch is current with main and mergeable, but Claude and Cloudflare check suites remain queued; deferring approval until CI settles.
Keep strict-mode hook execution working for metadata-only commits with no staged paths. Signed-off-by: John McChesney TenEyck Jr <59268465+jmcte@users.noreply.github.com>
0addaae to
9ae56f9
Compare
|
Rebase evidence for current head
The commit identity and ancestry were corrected; the reviewed two-file patch is unchanged. |
athena-omt
left a comment
There was a problem hiding this comment.
Approved. Reviewed current head 9ae56f9 locally. The generated pre-commit hook now safely handles an empty staged-file array under strict Bash mode, and the regression smoke test exercises the generated hook in a clean feature-branch repository. Local TypeScript check and smoke suite passed (12/12); latest CI Gate succeeded. No inline review threads were present.
Summary
set -u.Governing Issue
Closes #109.
Validation
TMPDIR=/tmp npm run check(23 test files, 194 tests passed)npm run buildbash scripts/ci/check-action-pins.sh(42 pins passed)git diff --check origin/main...HEADautoreviewreported no accepted/actionable findings; rebased patch retains stable patch-ide3edfd4aeee202498289c2bebca2054ac119432c.CI Gate.Bootstrap Governance
Material change: no
Merge Automation
Notes
Current head:
9ae56f973d32c49cf12f4f51c48c176fe039a678.The previous head
0addaae10a44cce10fff99651631a882b774cf7fand rebased head carry the same stable patch-id. The rebase changes only ancestry and commit identity; behavior remains the previously reviewed two-file fix.