Repository navigation
fix(ci): refuse the push when git status fails; reword the gate rules - #17
Merged
Merged
Conversation
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.
What changed
.githooks/pre-pushreadsgit status --porcelainon its own line, soset -erefuses the push when status fails.scripts/test-pre-pushadds 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-pushon 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.