fix(ci): install-gate composes with existing hooks (no clobber)#43
Merged
Conversation
…tead of clobbering The first install-gate.sh set core.hooksPath=.githooks, which OVERRIDES an existing hook system — it would disable Husky hooks (4DA's CADE pre-commit + pre-push) or a custom .git/hooks pre-commit. The gate LOGIC stays in the tracked .githooks/pre-push; this installer now wires a thin DELEGATING pre-push into whatever hook dir the repo already uses (.husky / custom core.hooksPath / default .git/hooks) and CHAINS any existing pre-push, never changing which dir is active. Idempotent. Validated: on a Husky repo it appends a delegation block to .husky/pre-push and leaves core.hooksPath untouched; existing pre-commit/pre-push keep running. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LcUxYH6RAdkoH7ejrYFjSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the gate PR. The first
install-gate.shsetcore.hooksPath=.githooks, which OVERRIDES an existing hook system (Husky / custom.git/hooks) — disabling pre-commit/pre-push hooks. This makes the installer compose: it wires a thin delegating pre-push into the repo's existing hook dir and chains any existing pre-push, never changingcore.hooksPath. Idempotent. Validated on a Husky repo (4DA). 🤖 Generated with Claude Code