Skip to content

Commit 529c4de

Browse files
committed
wip: register Dogfood Regression Gate in REQUIRED_CONTEXTS
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
1 parent 5f00374 commit 529c4de

1 file changed

Lines changed: 60 additions & 27 deletions

File tree

‎scripts/check-required-contexts.mjs‎

Lines changed: 60 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -371,27 +371,21 @@ const UNATTRIBUTED_BATTERY = '(no battery open)';
371371
* is a property of the workflow, so the workflow is where it is read from: the
372372
* job's own step list, one grep away and never stale (#9103).
373373
*
374-
* ⛔ TOMBSTONE — `Dogfood Regression Gate` (ci.yml:dogfood-gate) and `Temporal
375-
* Conformance (live PG + MySQL)` (ci.yml:temporal-conformance), dropped by the
376-
* #22998 ruling (two-speed CI; ruling record 6120820653 on #22991): their legs
377-
* run in the FULL BATTERY only — `main`'s push, hourly and dispatch runs — so a
378-
* PR or queue build carries the fast set and these two contexts leave the
374+
* ⛔ TOMBSTONE — `Temporal Conformance (live PG + MySQL)`
375+
* (ci.yml:temporal-conformance), dropped by the
376+
* #22998 ruling (two-speed CI; ruling record 6120820653 on #22991): its leg
377+
* runs in the FULL BATTERY only — `main`'s push, hourly and dispatch runs — so a
378+
* PR or queue build carries the fast set and the context left the
379379
* required set. The order is the #9325 two-step: the registry and the
380-
* instruction surfaces drop the rows in the PR, and the maintainer removes the
381-
* two contexts from the ruleset in the same sitting as the merge; until then
382-
* `--verify-required-set` reports them in direction B (required, pinned by no
380+
* instruction surfaces drop the row in the PR, and the maintainer removes the
381+
* context from the ruleset in the same sitting as the merge; until then
382+
* `--verify-required-set` reports it in direction B (required, pinned by no
383383
* row), report-only, which is the sitting's own reminder. Prose and not a
384384
* RETIRED_CONTEXT_NAMES row, for the reason the `Build Docs` / `Console Pin
385-
* Gate` tombstone above gives: neither name is dead — both jobs still publish
386-
* these check-runs on every full-battery run, and the instruction files name
387-
* where each runs.
388-
* Since #30461 (ruling record 6663883327, letter B) the three dogfood shards
389-
* also run on `merge_group`, so a queue build publishes `Dogfood Regression
390-
* Gate` over their credentials; `Temporal Conformance` stays full-battery
391-
* only. The context stays out of this registry and of the ruleset for now: the
392-
* follow-up ruling on #30461 (A, in two steps, 6669982756) puts it back only
393-
* after a clean 24-hour reading of the queue builds, the row here landing
394-
* first and the ruleset edit after it.
385+
* Gate` tombstone above gives: the name is not dead — the job still publishes
386+
* this check-run on every full-battery run, and the instruction files name
387+
* where it runs.
388+
* Returned: `Dogfood Regression Gate` (ci.yml:dogfood-gate) left with it by #22998 and is back since #30461 (letter B 6663883327 put its shards on `merge_group`; letter A 6669982756 re-enrolled the row below).
395389
*/
396390
export const REQUIRED_CONTEXTS = [
397391
{
@@ -497,6 +491,18 @@ export const REQUIRED_CONTEXTS = [
497491
'in the same sitting as the merge (#9325)',
498492
carries: 'the Console against a real workspace backend: the allowlisted `ui/e2e/live` specs',
499493
},
494+
{
495+
workflow: 'ci.yml',
496+
job: 'dogfood-gate',
497+
context: 'Dogfood Regression Gate',
498+
authorized:
499+
'#30461 follow-up ruling 6669982756 (letter A, in two steps), maintainer 「同意」 2026-11-05T21:25Z — after the ' +
500+
'24-hour queue reading 6707277208 met the step-3 threshold (zero flakes); this row is the repo half and merges ' +
501+
'first, the ruleset entry is the maintainer\'s, the same day (#9325)',
502+
carries:
503+
'the sharded dogfood matrix, `Dogfood Regression Gate (k/3)`, read through the aggregate by check:shard-attestation, ' +
504+
'and the `Dogfood Verify CLI` leg, which its `if:` skips on merge_group and pull_request',
505+
},
500506
];
501507

502508
/**
@@ -613,9 +619,10 @@ export const INSTRUCTION_SURFACES = [
613619
// contexts moved to the full battery). Then 5→7 by #25853 (the `ui/`
614620
// import's `Lint UI` and `Build & E2E UI`), 7→8 with `Type Check UI`
615621
// once bill item 49 closed (#25856), 8→9 with the `Test UI` aggregate
616-
// (#26460), and 9→10 with `Live E2E UI` (#27154). The full set is pinned
617-
// here so the corrected sentence cannot rot back — a rename in ANY of the
618-
// ten reddens this gate instead.
622+
// (#26460), 9→10 with `Live E2E UI` (#27154), and 10→11 with `Dogfood
623+
// Regression Gate` back (#30461). The full set is pinned here so the
624+
// corrected sentence cannot rot back — a rename in ANY of the eleven
625+
// reddens this gate instead.
619626
file: 'AGENTS.md',
620627
statesTheSet: true,
621628
mustName: [
@@ -629,6 +636,7 @@ export const INSTRUCTION_SURFACES = [
629636
'Type Check UI',
630637
'Test UI',
631638
'Live E2E UI',
639+
'Dogfood Regression Gate',
632640
],
633641
},
634642
{
@@ -662,6 +670,7 @@ export const INSTRUCTION_SURFACES = [
662670
'Type Check UI',
663671
'Test UI',
664672
'Live E2E UI',
673+
'Dogfood Regression Gate',
665674
],
666675
},
667676
{
@@ -683,7 +692,7 @@ export const INSTRUCTION_SURFACES = [
683692
* of the six surfaces have one; `AGENTS.md` does not, because a repo-root FILE
684693
* has no separator to be found by — so an AGENTS.md card derived this gate not
685694
* at all, while that surface is the one carrying `mustName` for every
686-
* required context (widened 2→6 by #9677, 6→7 by #17798, 7→5 by #22998, 5→7 by #25853, 7→8, 8→9 by #26460, 9→10 by #27154). Editing the merge-queue
695+
* required context (widened 2→6 by #9677, 6→7 by #17798, 7→5 by #22998, 5→7 by #25853, 7→8, 8→9 by #26460, 9→10 by #27154, 10→11 by #30461). Editing the merge-queue
687696
* paragraph there is precisely how this gate goes red, and it was reachable
688697
* only by judgment.
689698
*
@@ -2004,6 +2013,15 @@ async function selfTest() {
20042013
renamedTestUi.problems.some((p) => p.includes("job 'test-ui-gate'") && p.includes("'Test UI'")),
20052014
'growing a suffix on the bare `Test UI` name ⇒ red, naming the aggregate job and the required context',
20062015
);
2016+
// The third (#30461): `Dogfood Regression Gate` is the bare name of
2017+
// `dogfood-gate`, back in the registry, and its shards are `… (k/3)`.
2018+
const renamedDogfood = fixture('rename Dogfood Regression Gate', 'ci.yml', (s) =>
2019+
s.replace(' name: Dogfood Regression Gate\n', ' name: Dogfood Regression Gate (aggregate)\n'),
2020+
);
2021+
assert(
2022+
renamedDogfood.problems.some((p) => p.includes("job 'dogfood-gate'") && p.includes("'Dogfood Regression Gate'")),
2023+
'growing a suffix on the bare `Dogfood Regression Gate` name ⇒ red, naming the aggregate job and the required context',
2024+
);
20072025

20082026
// ── (2) the job disappearing entirely ─────────────────────────────────────
20092027
// Re-pointed from `console-pin` to `temporal-conformance` when #9533 dropped
@@ -2169,6 +2187,20 @@ async function selfTest() {
21692187
sources['ci.yml'].includes(TEST_UI_SHARD_NAME),
21702188
'the real suffixed Test UI shard name coexists with the bare `Test UI` gate name',
21712189
);
2190+
// The third live specimen (#30461): the `dogfood` shards and their
2191+
// `Dogfood Regression Gate` aggregate, the matrix width read the same way.
2192+
const DOGFOOD_SHARD_NAME = `name: Dogfood Regression Gate (\${{ matrix.shard }}/${shardTotal(sources['ci.yml'], 'dogfood')})`;
2193+
const collidedDogfood = fixture('collide the dogfood shard name with its gate name', 'ci.yml', (s) =>
2194+
s.replace(DOGFOOD_SHARD_NAME, 'name: Dogfood Regression Gate'),
2195+
);
2196+
assert(
2197+
collidedDogfood.problems.some((p) => p.includes("job 'dogfood'") && p.includes('published by ci.yml:dogfood-gate')),
2198+
'a dogfood shard wearing the bare `Dogfood Regression Gate` context name ⇒ red',
2199+
);
2200+
assert(
2201+
sources['ci.yml'].includes(DOGFOOD_SHARD_NAME),
2202+
'the real suffixed dogfood shard name coexists with the bare `Dogfood Regression Gate` gate name',
2203+
);
21722204

21732205
// ── (8) a registry that lists one context twice ──────────────────────────
21742206
battery('(8) a registry that lists one context twice');
@@ -2798,11 +2830,12 @@ async function selfTest() {
27982830
assert(snapshot.strict === false, 'strict_required_status_checks_policy is read, not assumed');
27992831
assert(snapshot.enforcing.length === 1 && !snapshot.noEnforcingRuleset, 'one active ruleset covers the default branch');
28002832
// Direction B against the checked-in registry, derived for the same reason
2801-
// as direction A below: the 2026-08-18 reading still carries the two
2802-
// contexts #22998 dropped from the registry (`Dogfood Regression Gate`,
2803-
// `Temporal Conformance (live PG + MySQL)`), so the snapshot reports them
2804-
// as required-and-unpinned — exactly the reading the maintainer's
2805-
// settings half of that two-step clears.
2833+
// as direction A below: the 2026-08-18 reading still carries
2834+
// `Temporal Conformance (live PG + MySQL)`, which #22998 dropped from the
2835+
// registry, so the snapshot reports it as required-and-unpinned — exactly
2836+
// the reading the maintainer's settings half of that two-step clears.
2837+
// (`Dogfood Regression Gate`, dropped with it, is pinned again since
2838+
// #30461 and so no longer reads as unpinned here.)
28062839
const pinned = new Set(REQUIRED_CONTEXTS.map((e) => e.context));
28072840
const unpinnedNames = snapshot.unpinned.map((e) => e.context ?? e).sort();
28082841
assert(

0 commit comments

Comments
 (0)