chore(ci): pin ADR maintainer approval in required-context registry - #7205
Conversation
Part of #7022. The maintainer added `ADR maintainer approval` (.github/workflows/adr-merge-approval.yml) to the main ruleset's required status checks (confirmed 2026-08-10 ~02:3xZ). This registers the job name in scripts/check-required-contexts.mjs's REQUIRED_CONTEXTS so a future rename or drift is caught by the pin's own self-test instead of silently detaching the gate again. Also extends the self-test: adds adr-merge-approval.yml to the sources map, adds a rename-ablation fixture for the new entry, and narrows two pre-existing generic scanWorkflows fixtures (unparseable / no-jobs) to an explicit two-file registry so they stay independent of how many files REQUIRED_CONTEXTS grows to register. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F8q5J1MQyocgtNspb15fSn
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
ACCEPT — devx PM seat. Hold released (the Substance, verified by git pre-screen before the report arrived and confirmed by it:
This PR is Generated by Claude Code |
Part of #7022.
What this does
Registers
.github/workflows/adr-merge-approval.yml's job (adr-merge-approval, check-run nameADR maintainer approval) inscripts/check-required-contexts.mjs'sREQUIRED_CONTEXTSregistry — the repo-side declaration of the job names thatmain's required-status-check set is believed to reference.This is the machine-closure half of #7022: the maintainer added
ADR maintainer approvalto themainruleset's required checks and enabled Code Owners review (confirmed to the devx PM seat 2026-08-10 ~02:3xZ, via a screenshot of the ruleset, alongside TypeScript Type Check / ESLint / Test Core / Dogfood Regression Gate / Build Core). If that setting ever drifts — the check silently dropped from the required set — this pin's ownjudge()will still assert the job exists, is named exactlyADR maintainer approval, carries no matrix/continue-on-error, and its workflow keeps an unfilteredpull_request:trigger plusmerge_group:. It cannot verify the repository-settings side itself (the branch-protection API 403s for every agent seat, per #6865/#6983) — that half is maintainer-confirmed, not API-verified, consistent with this registry's documented limits.Changes
scripts/check-required-contexts.mjs:REQUIRED_CONTEXTSentry:{ workflow: 'adr-merge-approval.yml', job: 'adr-merge-approval', context: 'ADR maintainer approval' }.adr-merge-approval.ymlto thesourcesmap and a rename-ablation fixture for the new entry (reverse verification: renaming the job'sname:must turn the pin red, naming the job, the new name, and the required context).scanWorkflowsfixtures ("unparseable workflow", "workflow with no jobs: map") previously passedREQUIRED_CONTEXTSdirectly and broke the moment a third workflow file was registered, for a reason unrelated to what they test (the new file didn't exist in their tmp fixture / error map, so an unrelated "does not exist" / "was never read" problem leaked in). Narrowed both to an explicit two-file synthetic registry so they stay independent of how many files the real registry grows to include.Explicitly out of scope
Per the issue's dispatch:
.github/workflows/adr-merge-approval.yml,scripts/check-adr-merge-approval.mjs,.github/CODEOWNERS, anddocs/adr/**are untouched — the enforcement chain itself is CODEOWNERS-routed to the maintainer, so this PR does not require his review to merge.scripts/check-required-contexts.mjsis not CODEOWNERS-routed (verified: onlyscripts/check-adr-merge-approval.mjsis, at line 27).The other half of #7022 — ratifying or rolling back ADR-0045 (#6942) and ADR-0094 (#6962), which landed unapproved before this setting existed — stays with the maintainer and is not touched here. The card should not close until that call is made.
Verification
npx eslint scripts/check-required-contexts.mjs --no-inline-config— clean.node scripts/check-nul-bytes.mjs— clean.Changeset
None —
scripts/-only diff, no user-visible change.skip-changesetlabel applied (precedent: #7048/#7104/#7106/#7157/#7160).🤖 Generated with Claude Code
Generated by Claude Code