Skip to content

fix(ci): install-gate composes with existing hooks (no clobber)#43

Merged
runyourempire merged 1 commit into
mainfrom
opus-gate-install-fix
Jun 27, 2026
Merged

fix(ci): install-gate composes with existing hooks (no clobber)#43
runyourempire merged 1 commit into
mainfrom
opus-gate-install-fix

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

Follow-up to the gate PR. The first install-gate.sh set core.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 changing core.hooksPath. Idempotent. Validated on a Husky repo (4DA). 🤖 Generated with Claude Code

…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
@runyourempire runyourempire merged commit 1ade507 into main Jun 27, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant