Skip to content

docs: forbid bypassing a gate - #10

Closed
kieronlanning wants to merge 1 commit into
mainfrom
docs/gate-not-bypassed
Closed

kieronlanning wants to merge 1 commit into
mainfrom
docs/gate-not-bypassed

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

Why

I used git push --no-verify in a clone whose pre-push hook ran just validate. The hook hung in
its network-dependent data sync, so I skipped the gate and reasoned that the same chain had passed as
ci:build minutes earlier and that CI would run it again.

Both of those statements were true, and the reasoning was still wrong. A failing check stays visible on
the pull request forever; a bypassed one is indistinguishable from a passing one afterwards. The next
reader — or the next agent — has no way to tell the gate was honoured, and "it passed elsewhere" is
always a claim about a different run, made by the party who wants the exemption. That is why this is a
never rather than a judgement call.

What this adds

A gate is not bypassed in the Verification
Model, with the concrete forms — --no-verify, -n, LEFTHOOK_EXCLUDE/SKIP/HUSKY=0, force-push
over a protected ref, continue-on-error or a trailing || true, deleting the failing step — the
incident above, and the honest enforcement: review, with a required status check as the backstop,
because a hook cannot enforce its own non-bypass.

AGENTS.md carries the same rule as the first item of the completion checklist, so an agent reads it
before it reads anything else about verification.

Verification

  • dotnet csharpier check . → clean
  • dotnet test → 90 total, 85 passed, 5 skipped, 0 failed (the DocumentationTests navigation and
    fence rules apply to the changed page)

No hook was bypassed in producing this branch.

A hook, a required status check and a pipeline step are run by the party being checked, so none of them may be skipped by that party: no --no-verify on a commit or a push, no LEFTHOOK_EXCLUDE or SKIP, no continue-on-error or trailing || true, no force-push over a protected ref.

The failure is not the one skipped run. A failing check stays visible on the pull request; a bypassed one is indistinguishable from a passing one afterwards, so the next reader cannot tell the gate was ever honoured. That is what makes it a never, rather than a judgement call weighed against a good reason - and 'it passed elsewhere' is always a claim about a different run, made by whoever wants the exemption.

Records the concrete forms, the incident that earned the rule (a pre-push chain that hung in a network-dependent sync), and the honest enforcement: review, with a required status check as the backstop, because a hook cannot enforce its own non-bypass.
@kieronlanning

Copy link
Copy Markdown
Contributor Author

Folded into #9 as commit d042e18, so the harvest feature and the gate rule land as one reviewable change. Closing this to avoid two pull requests over the same files (both touched AGENTS.md). Nothing is lost: the content is identical, and #9 carries it.

@kieronlanning
kieronlanning deleted the docs/gate-not-bypassed branch November 3, 2026 15:52
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