Skip to content

Pre-commit hook does not auto-install on fresh clones (contributors silently skip the gate) #954

@joelteply

Description

@joelteply

Problem

A fresh clone of continuum doesn't have `.git/hooks/pre-commit` wired up. `CLAUDE.md` says the precommit hook is sacred and must pass (TS compile + ESLint baseline + Rust clippy + perl-fork-wait test timeouts), but a new contributor running `git commit` after `git clone` silently skips the entire gate.

The setup script (`src/scripts/setup-git-hooks.sh`) exists and works — it just doesn't run automatically on contributor onboarding.

Caught how

bigmama-wsl noticed during 2026-04-23 PR session: their fresh checkout on bigmama-1 had no pre-commit hook installed despite multiple edits + commits during the session. They worked around with per-command `git -c` flags but flagged the gap.

Fix direction

Wire `setup-git-hooks.sh` into a place that ALWAYS runs on contributor entry:

  1. `postinstall` script in `src/package.json` — runs after `npm install` (fresh clone always does this before first commit attempt)
  2. Or a top-level `postinstall` in the root `package.json`
  3. Or `bootstrap.sh` in repo root (currently exists?) auto-runs hook setup

Also document in `CONTRIBUTING.md` (does this exist?) so users know what's auto-installed on their behalf.

Carl/contributor impact

Every fresh-checkout contributor's first commit silently bypasses the very gate that's supposed to keep `main` clean. That's not a guard — that's the illusion of one.

Owner

Open — small task, ~5 line postinstall hook + audit of which package.json owns it. Good first issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions