Uh oh!
There was an error while loading. Please reload this page.
fix(ci): check-required-contexts guards types: against dropped defaults - #8394
Merged
Merged
Conversation
…ults Extends assertion 7 (the pull_request trigger guard) to also require that, when a required-context workflow's pull_request trigger names `types:`, the list is a superset of GitHub's default [opened, synchronize, reopened]. Naming any `types:` replaces that default set rather than extending it, so a hand-restated list that drops one produces the identical permanent-pending wedge the existing `paths:` guard exists to catch, through a different key on the same trigger. adr-merge-approval.yml (since #8302) is the only required-context workflow naming types: today, and its list already restates all three defaults, so the pin stays green on main as-is. Self-test gains fixtures proving all three directions named in the triage scope: dropping a default (or two) from adr-merge-approval.yml's list names the omission and goes red; a workflow with no types: key at all stays green; a strict superset (an extra activity beyond the defaults) stays green. Fixes#8304
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
qq9340100
marked this pull request as ready for review
August 13, 2026 11:17
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#8304
What changed
Extends
scripts/check-required-contexts.mjsassertion 7 (thepull_request:trigger guard, previouslypaths:/paths-ignore:only): if a required-context workflow'spull_request:trigger namestypes:at all, the list must now be a superset of GitHub's default[opened, synchronize, reopened].Naming any
types:REPLACES that default set rather than extending it, so a hand-restated list that drops one of the three produces the identical permanent-pending wedge the existingpaths:guard exists to catch — through a different key on the same trigger.adr-merge-approval.yml(since #8302) is the only required-context workflow namingtypes:today, and its list already restates all three defaults, so the pin stays green onmainas-is — this is a new guard on a live-since-#8302 exposure, not a fix to a broken gate.Mutation-test coverage (per the triage scope's lane rule)
--self-testgains fixtures proving all three required directions:reopened(oropened+synchronize) fromadr-merge-approval.yml's hand-restatedtypes:list ⇒ red, naming the dropped default(s)pull_request:trigger with notypes:key at all ⇒ green (GitHub's own defaults apply; nothing was replaced)types:list that is a strict superset of the three defaults (an extra activity beyond them) ⇒ greenNot decided here
The issue's suggested-shape section also raises whether
ready_for_reviewbelongs in the required floor. Per the triage comment, that question is explicitly not this card's scope — recorded here as a one-line remark for whoever picks it up next, not a ruling: a draft PR already getsopened/synchronizeruns so the context exists, which is why its absence is not a defect today, but that reasoning has never been pinned anywhere machine-checked.Verification
node scripts/check-required-contexts.mjs --self-test→ green, 52 assertions (was ~44 before this change; the exact prior count wasn't printed, so compare by the new fixtures listed above, not a delta)node scripts/check-required-contexts.mjs→ green, 9 required contexts pinned across 3 workflows (unchanged set)pnpm eslint scripts/check-required-contexts.mjs→ cleanpnpm check:nul-bytes→ cleannode scripts/pm/dispatch-gates.mjs scripts/check-required-contexts.mjs→ no path-named family for this file; nothing beyond the prompt's named set appliesScope
File surface:
scripts/check-required-contexts.mjsonly, as declared for this card. Scripts-only change — no user-visible behavior —skip-changesetlabel will be applied.Generated by Claude Code