Skip to content

fix(ci): check-required-contexts guards types: against dropped defaults - #8394

Merged
qq9340100 merged 1 commit into
mainfrom
claude/issue-8304-types-superset-assertion
Aug 13, 2026
Merged

fix(ci): check-required-contexts guards types: against dropped defaults#8394
qq9340100 merged 1 commit into
mainfrom
claude/issue-8304-types-superset-assertion

Conversation

@qq9340100

Copy link
Copy Markdown
Collaborator

Fixes#8304

What changed

Extends scripts/check-required-contexts.mjs assertion 7 (the pull_request: trigger guard, previously paths: / paths-ignore: only): if a required-context workflow's pull_request: trigger names types: 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 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 — 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-test gains fixtures proving all three required directions:

  • removing reopened (or opened+synchronize) from adr-merge-approval.yml's hand-restated types: list ⇒ red, naming the dropped default(s)
  • a pull_request: trigger with no types: key at all ⇒ green (GitHub's own defaults apply; nothing was replaced)
  • a types: list that is a strict superset of the three defaults (an extra activity beyond them) ⇒ green

Not decided here

The issue's suggested-shape section also raises whether ready_for_review belongs 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 gets opened/synchronize runs 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 → clean
  • pnpm check:nul-bytes → clean
  • node scripts/pm/dispatch-gates.mjs scripts/check-required-contexts.mjs → no path-named family for this file; nothing beyond the prompt's named set applies

Scope

File surface: scripts/check-required-contexts.mjs only, as declared for this card. Scripts-only change — no user-visible behavior — skip-changeset label will be applied.


Generated by Claude Code

…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
@vercel

vercelBot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
objectstackIgnoredIgnoredAug 13, 2026 10:58am

Request Review

@qq9340100qq9340100 added skip-changeset PR has no user-facing published change; bypasses the changeset gate and removed size/s labels Aug 13, 2026 — with Claude
@qq9340100
qq9340100 marked this pull request as ready for review August 13, 2026 11:17
@qq9340100
qq9340100 added this pull request to the merge queueAug 13, 2026
Merged via the queue into main with commit 611a03aAug 13, 2026
27 checks passed
@qq9340100
qq9340100 deleted the claude/issue-8304-types-superset-assertion branch August 13, 2026 11:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@qq9340100@claude