Skip to content

chore(ci): local preflight gate + pre-push hook#17

Merged
Ghost-Frame merged 1 commit into
mainfrom
chore/preflight-ci-gate
Jul 6, 2026
Merged

chore(ci): local preflight gate + pre-push hook#17
Ghost-Frame merged 1 commit into
mainfrom
chore/preflight-ci-gate

Conversation

@Ghost-Frame

Copy link
Copy Markdown
Owner

Adds a local mirror of the CI gates so hygiene failures (fmt, clippy, audit) are caught before they reach CI -- the exact class of failure that cost round-trips on the last two PRs.

Rescued from the land-m3 branch, whose tip never reached main via the PR #11 squash. Two files:

  • scripts/preflight.sh -- runs the same gates as .github/workflows/ci.yml: cargo fmt --all --check, cargo audit (with the same three suppressed advisories), cargo clippy --workspace --all-targets -D warnings, cargo test --workspace. A green preflight predicts a green CI (minus the Docker/remote-only Postgres and mirror jobs). --fast runs just the no-compile subset (fmt + audit).
  • .githooks/pre-push -- runs preflight --fast on every push (cheap, no build) and blocks the push if it would fail CI. git push --no-verify bypasses.

Reconciled with current main: the audit ignore list is synced to the three advisories ci.yml suppresses today (the branch original only knew about one).

Enable per-clone:

git config core.hooksPath .githooks

Verified: preflight --fast passes on this tree, and the pre-push hook ran (and passed) on the push that created this branch.

Resurrected from the land-m3 branch (its content never reached main via the
PR #11 squash). scripts/preflight.sh mirrors the CI gates (fmt, clippy, test,
audit) so a green preflight predicts green CI; .githooks/pre-push runs the fast
no-compile subset (fmt + audit) on every push to catch the hygiene failures
that slipped through on earlier PRs. Audit ignore list synced to the three
advisories ci.yml currently suppresses.

Enable per-clone with: git config core.hooksPath .githooks
@Ghost-Frame
Ghost-Frame merged commit 796680a into main Jul 6, 2026
5 checks passed
@Ghost-Frame
Ghost-Frame deleted the chore/preflight-ci-gate branch July 6, 2026 16:07
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