Skip to content

fix(ci): refuse the push when git status fails; reword the gate rules - #17

Merged
thatsrue merged 1 commit into
mainfrom
fix/hook-status-and-rules
Nov 7, 2026
Merged

thatsrue merged 1 commit into
mainfrom
fix/hook-status-and-rules

Conversation

@thatsrue

@thatsrue thatsrue commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • .githooks/pre-push reads git status --porcelain on its own line, so set -e refuses the push when status fails. scripts/test-pre-push adds an "unreadable index" case.
  • docs/repo-standards.md, Commands: an empty, unknown or failed diff runs every step, and Markdown a check reads isn't doc-only. The missing-tool rule now says what it protects: every test the full check needs runs, missing test prerequisites fail, test dependencies are provisioned (not live services), and a suite that can't run every push is a named opt-in.

Why

The hook passed a push whose tree it couldn't read. An adversarial review of the gate setup found it, along with two route gaps: yesteryear treats an empty diff as doc-only, and so-sketchy's agent Markdown feeds checks. The rule reword follows the same review. The owner approved it on 2026-11-06.

Closes #16

How you checked it

  • scripts/check: 0 (shellcheck ok, hook test 11 of 11 ok).

  • scripts/test-pre-push on the old hook: 1, failing only "unreadable index" (rc=0, check ran).

  • This branch pushed through its own new hook: 0.

  • A bug fix comes with a test that fails without it

  • Docs match how it works now

  • No secrets or private information

Change class: a hook fix (it refuses a push it used to allow) and docs. Repos re-copy the hook afterward.

@thatsrue
thatsrue merged commit 15b29c1 into main Nov 7, 2026
1 check passed
@thatsrue
thatsrue deleted the fix/hook-status-and-rules branch November 7, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Pre-push hook treats a failed git status as a clean tree

1 participant