The context protection is about to depend on reports from one trigger line - #805
Merged
Conversation
… line `lint` is one of the two contexts branch protection will require once #804 is acted on, and it reports on pull requests only. That is correct rather than a gap: a squash produces a commit carrying no `lint` context, which is why `check-exact-head-ci.mjs` requires ten jobs and not eleven, and it is why the context is invisible on `main`. Measured on both surfaces before writing this: c622db4 (main) gate reported lint absent #803 head commit gate reported lint reported Protection evaluates the pull request head, so both are there when it looks. The part with nothing behind it is why `lint` reaches that head at all: a bare `pull_request:` trigger in `demo-lint.yml`. Delete that line and `lint` becomes a required context that can never report on a pull request, and every pull request blocks with no failing check to explain it. That is the same failure another session nearly shipped today from the opposite direction -- requiring, on `main`, contexts from a workflow triggered only on `dev`. There the workflow could not report on the protected branch; here it would not report on the protected event. One trigger line either way, and nothing in this repository noticed. The assertion is on the parsed trigger set rather than on the file text, so a reformatting does not move it and a removal does. Record-Id: r-lintpullrequesttrigger Provenance: authored Certainty: firm Blast: local Undo: easy Ruled-out: asserting the trigger inside the release gate instead | that gate deliberately does not know about `lint`, and teaching it would blur the reason it requires ten Ruled-out: making `lint` report on pushes to main so it is visible there | it would then run on every squash for no purpose, and the release gate would have to start expecting a context it was written to do without Limit: this guards the trigger, not the job name. Renaming the `lint` job leaves the trigger intact and still breaks the required context, and nothing here catches that Verified: both surfaces read directly -- the workflow run's job list and `GET /commits/{sha}/check-runs`, which is what protection evaluates -- on a `main` commit and on a pull request head, and they differ as described. One negative control: removing the `pull_request` trigger fails the assertion, restored byte-identical CommitLore-Version: 2.0.0
CommitLore — record lintTrailers: clean — 1 commit in Limits (1)
Ruled out (2)
Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
This was referenced Aug 19, 2026
Closed
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.
Follows #803. Guards the assumption branch protection now rests on.
What was unguarded
lintis one of the two contexts protection requires, and it reports on pull requests only. That is correct rather than a gap — a squash produces a commit carrying nolintcontext, which is whycheck-exact-head-ci.mjsrequires ten jobs and not eleven.Measured on both surfaces before writing this:
Protection evaluates the pull request head, so both are there when it looks.
The part with nothing behind it is why
lintreaches that head at all: a barepull_request:trigger indemo-lint.yml. Delete that line andlintbecomes a required context that can never report on a pull request — every PR blocks, with no failing check to explain it.One trigger line, two directions
Another session nearly shipped the mirror image today: requiring, on
main, contexts from a workflow triggered only ondev. There the workflow could not report on the protected branch; here it would not report on the protected event. Same failure, opposite direction, and nothing in this repository noticed either.The assertion reads the parsed trigger set, not the file text, so reformatting does not move it and removal does.
This PR is also the enforcement evidence
Protection was tightened between #803 and this PR:
enforce_adminstrue, required contextsgate+lint, pull request required. That was verified by re-reading the settings, which is not the same as watching them refuse something. This PR is the first to run under them — ifgateandlintboth report and the merge is allowed only after they do, that is the demonstration the settings change did not have.Negative control
Removing the
pull_requesttrigger fails the assertion; restored byte-identical.Full suite 3423 passed,
tsc --noEmitclean.Limit, recorded in the commit
This guards the trigger, not the job name. Renaming the
lintjob leaves the trigger intact and still breaks the required context, and nothing here catches that.