Repository navigation
Commit 93b4acb
fix(scripts): dispatch-gates says a path-scheduled full-battery job does not run on the PR or in the merge queue (#24272)
Fixes #24073
Clause-②: no
## What
`dispatch-gates` now says, on the row a reader reads, that a
path-scheduled CI job whose `if:` carries ci.yml's full-battery clause
does not run on this PR or in the merge queue, and that its first run on
the change is `main`'s push battery after the merge.
Scope is ruling 6243472660 (on #24171), letter B, term 2: the card's
"Done when" items 1 and 2 only. Item 3 (a local command for the dogfood
files) would be a new derived row and stays frozen. It is not in this
PR.
## Why (measured at `a422f04f`)
The job `if:` reader already stripped the full-battery clause (`&&
github.event_name != 'pull_request' && github.event_name !=
'merge_group'`) as the expression's last conjunct, so the job's filter
population could still be read. The fact the clause carries was then
dropped. `jobFilterPopulation` returned `{ paths, outputs, dropped }`,
the job-filtered row was `{ workflow, job, outputs, hits, dropped, steps
}`, and neither renderer had a field to read. `dispatch-gates.data.mjs`
is not on this path, so it is unchanged.
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack packages/runtime/src/route-ledger.ts`, the
path PR #24009 changed:
```text
before (a422f04), stderr:
+ 5 CI job(s) are scheduled BY YOUR PATHS and run 34 step(s) no family above names — NOT above. ...
⊘ NOT MEASURED — [ci.yml · Dogfood Regression Gate (${{ matrix.shard }}/3)] 5 step(s): Get pnpm store directory · Install dependencies · Build the dogfood package's dependency closure · Snapshot the working tree before the dogfood tests · Boot example apps and exercise real user flows
⊘ NOT MEASURED — [ci.yml · Dogfood Verify CLI] 3 step(s): Get pnpm store directory · Install dependencies · Verify example apps via the `objectstack verify` CLI
after (004ba7b), stderr:
⊘ NOT MEASURED — [ci.yml · Dogfood Regression Gate (${{ matrix.shard }}/3)] ⛔ does NOT run on this PR or in the merge queue: its `if:` excludes the pull_request and merge_group events, so its first run on this change is `main`'s push battery, AFTER the merge — 5 step(s): Get pnpm store directory · Install dependencies · Build the dogfood package's dependency closure · Snapshot the working tree before the dogfood tests · Boot example apps and exercise real user flows
⊘ NOT MEASURED — [ci.yml · Dogfood Verify CLI] ⛔ does NOT run on this PR or in the merge queue: its `if:` excludes the pull_request and merge_group events, so its first run on this change is `main`'s push battery, AFTER the merge — 3 step(s): Get pnpm store directory · Install dependencies · Verify example apps via the `objectstack verify` CLI
```
The Temporal Conformance row carries the same clause, because its `if:`
does. The Test Core and Build Core rows are unchanged, because theirs do
not. stdout (the 49 commands) is byte-identical before and after
(diffed).
## Change
- `jobIfReading(ifExpression)` returns `{ refs, fullBatteryOnly }`.
`jobFilterOutputRefs` is that reading with the second half dropped: same
refusals, same refs.
- `jobFilterPopulation`, `jobFilterPopulations` and `jobFilteredSteps`
carry `fullBatteryOnly` onto each job row. `--json` gets it too, under
`jobFilteredSteps.jobs`.
- `fullBatteryOnlyClause(row)` renders the one sentence from the flag,
never from a job name. `jobFilteredNotMeasuredLine(row)` is the
`--commands` / `--json` stderr row, pulled out of the inline template so
the pin reads the line a dispatch is built from. The clause goes right
after the job name, ahead of the step list. The plain rendering appends
it to the row's own line.
- The plain rendering's header said "YOUR path puts this job on the PR".
It now says the path schedules the job, on this PR unless its row says
it does NOT.
No new gate, derived row, ratchet, `--tier` mandate or constant.
## Pin
The cases are in `scripts/pm/dispatch-gates.self-test.mjs`, fast tier,
in the existing sections:
- In the full-battery `if:` section, `jobIfReading` returns
`fullBatteryOnly: true` for the stripped clause and `false` for the live
spelling without it.
- In the path-scheduled-jobs section, LIVE on ci.yml for
`packages/runtime/src/route-ledger.ts`, four checks run for each of
Dogfood Regression Gate and Dogfood Verify CLI:
- the row carries `fullBatteryOnly: true`;
- the `--commands` line says "does NOT run on this PR or in the merge
queue", ahead of the step list;
- the plain row line says it too;
- in place, the same row with the field stripped renders the statement
in neither line.
- Negative control: Build Core, scheduled by the same path and run on
the PR, carries `false` and no statement.
## Verification at `004ba7b4` (`git rev-parse --short HEAD`)
- `pnpm check:pm-dispatch-gates` (fast tier), exit 0, 396.9 s: `✓
dispatch-gates self-test (fast tier): 1913 cases pass; 6 slow section(s)
deferred.`
- Both tiers, `node scripts/pm/dispatch-gates.mjs --self-test`: exit 0,
`✓ dispatch-gates self-test: 2173 cases pass.` (fast 1913 case(s) in
406.7 s, slow 260 case(s) in 1201.5 s). The slow tier is the one CI runs
only on `main`'s push and hourly runs.
- One-time ablation of the producer, using `node
scripts/ablation-replace.mjs` in wrap mode:
- The anchor `const fullBatteryOnly = eventFree !== expr;` was replaced
by `const fullBatteryOnly = false;`. Anchor count went x1 to x0, and the
blob went `b2836327f780` to `cf8939035532`.
- Fast tier result: `✗ dispatch-gates self-test (fast tier): 7 of 1913
case(s) failed.` These are exactly the 7 predicted: the `jobIfReading`
true case, plus three per dogfood job (the flag, the `--commands` line,
the plain line). The in-place ablation cases and the Build Core control
stayed green.
- Restore proven: blob == HEAD (`b2836327f780`) and `git diff HEAD` is
empty.
- `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` with no paths derives 32 commands; the
change set is the two files vs merge base `a422f04fe`. All 32 ran with
exit 0, each code captured before any pipe. `--ran` printed `✓
dispatch-gates --ran: 32 derived famil(ies) accounted for — 32 run, 0
NOT-MEASURED (a DERIVED zero — all 32 recorded an exit code and none of
them is 3).` The same three-path derivation at `a422f04f` gives the
identical set of 32.
## Acceptance notes
- Console Pin Gate's `if:` carries the same clause, so its row (for
`.objectui-sha`) gets the statement from the same flag. No text is
written per job.
- A check family derived through a full-battery job's filter, such as
the console-pin families for `.objectui-sha`, keeps its matched-row
provenance "CI job filter for 'Console Pin Gate' in ci.yml" with no
WHEN. That family is on stdout as a local command the dev runs, so the
dev never has to infer that the PR covers it. Not touched here, which
keeps this PR inside the term 2 scope. No carrier.
- `dispatch-gates.self-test.mjs` has no named-battery roster to register
against. Adding one would be a new constant under the freeze, so the
cases sit in the existing sections.
- `skip-changeset`: `scripts/pm/**` publishes nothing.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QBcLjVCmcWbZEk6qhYMib2)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 53ef752 commit 93b4acb
2 files changed
Lines changed: 155 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1190 | 1199 | | |
1191 | 1200 | | |
1192 | 1201 | | |
| |||
1201 | 1210 | | |
1202 | 1211 | | |
1203 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1204 | 1226 | | |
1205 | 1227 | | |
1206 | 1228 | | |
1207 | 1229 | | |
1208 | 1230 | | |
1209 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1210 | 1234 | | |
1211 | 1235 | | |
1212 | 1236 | | |
| |||
1227 | 1251 | | |
1228 | 1252 | | |
1229 | 1253 | | |
1230 | | - | |
| 1254 | + | |
1231 | 1255 | | |
1232 | 1256 | | |
1233 | 1257 | | |
| |||
1426 | 1450 | | |
1427 | 1451 | | |
1428 | 1452 | | |
1429 | | - | |
1430 | | - | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1431 | 1457 | | |
1432 | 1458 | | |
1433 | | - | |
1434 | | - | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1435 | 1462 | | |
1436 | 1463 | | |
1437 | 1464 | | |
| |||
1450 | 1477 | | |
1451 | 1478 | | |
1452 | 1479 | | |
1453 | | - | |
| 1480 | + | |
1454 | 1481 | | |
1455 | 1482 | | |
1456 | 1483 | | |
1457 | 1484 | | |
1458 | | - | |
| 1485 | + | |
1459 | 1486 | | |
1460 | 1487 | | |
1461 | 1488 | | |
| |||
2811 | 2838 | | |
2812 | 2839 | | |
2813 | 2840 | | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
2814 | 2848 | | |
2815 | 2849 | | |
2816 | 2850 | | |
| |||
2896 | 2930 | | |
2897 | 2931 | | |
2898 | 2932 | | |
2899 | | - | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
2900 | 2937 | | |
2901 | 2938 | | |
2902 | 2939 | | |
| |||
11460 | 11497 | | |
11461 | 11498 | | |
11462 | 11499 | | |
| 11500 | + | |
| 11501 | + | |
| 11502 | + | |
| 11503 | + | |
| 11504 | + | |
| 11505 | + | |
| 11506 | + | |
| 11507 | + | |
| 11508 | + | |
| 11509 | + | |
| 11510 | + | |
| 11511 | + | |
| 11512 | + | |
| 11513 | + | |
| 11514 | + | |
| 11515 | + | |
| 11516 | + | |
| 11517 | + | |
| 11518 | + | |
| 11519 | + | |
| 11520 | + | |
| 11521 | + | |
| 11522 | + | |
| 11523 | + | |
| 11524 | + | |
| 11525 | + | |
| 11526 | + | |
| 11527 | + | |
| 11528 | + | |
| 11529 | + | |
| 11530 | + | |
11463 | 11531 | | |
11464 | 11532 | | |
11465 | 11533 | | |
| |||
11502 | 11570 | | |
11503 | 11571 | | |
11504 | 11572 | | |
11505 | | - | |
11506 | | - | |
| 11573 | + | |
| 11574 | + | |
| 11575 | + | |
11507 | 11576 | | |
11508 | 11577 | | |
11509 | 11578 | | |
| |||
11516 | 11585 | | |
11517 | 11586 | | |
11518 | 11587 | | |
| 11588 | + | |
11519 | 11589 | | |
11520 | | - | |
| 11590 | + | |
| 11591 | + | |
11521 | 11592 | | |
11522 | 11593 | | |
11523 | 11594 | | |
| |||
14346 | 14417 | | |
14347 | 14418 | | |
14348 | 14419 | | |
14349 | | - | |
14350 | | - | |
14351 | | - | |
14352 | | - | |
14353 | | - | |
14354 | | - | |
| 14420 | + | |
14355 | 14421 | | |
14356 | 14422 | | |
14357 | 14423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
5670 | 5673 | | |
5671 | 5674 | | |
5672 | 5675 | | |
| 5676 | + | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
| 5680 | + | |
| 5681 | + | |
| 5682 | + | |
| 5683 | + | |
| 5684 | + | |
| 5685 | + | |
| 5686 | + | |
5673 | 5687 | | |
5674 | 5688 | | |
5675 | 5689 | | |
| |||
11928 | 11942 | | |
11929 | 11943 | | |
11930 | 11944 | | |
| 11945 | + | |
| 11946 | + | |
| 11947 | + | |
| 11948 | + | |
| 11949 | + | |
| 11950 | + | |
| 11951 | + | |
| 11952 | + | |
| 11953 | + | |
| 11954 | + | |
| 11955 | + | |
| 11956 | + | |
| 11957 | + | |
| 11958 | + | |
| 11959 | + | |
| 11960 | + | |
| 11961 | + | |
| 11962 | + | |
| 11963 | + | |
| 11964 | + | |
| 11965 | + | |
| 11966 | + | |
| 11967 | + | |
| 11968 | + | |
| 11969 | + | |
| 11970 | + | |
| 11971 | + | |
| 11972 | + | |
| 11973 | + | |
| 11974 | + | |
| 11975 | + | |
| 11976 | + | |
| 11977 | + | |
| 11978 | + | |
| 11979 | + | |
| 11980 | + | |
| 11981 | + | |
| 11982 | + | |
| 11983 | + | |
| 11984 | + | |
| 11985 | + | |
| 11986 | + | |
| 11987 | + | |
| 11988 | + | |
| 11989 | + | |
| 11990 | + | |
| 11991 | + | |
| 11992 | + | |
| 11993 | + | |
| 11994 | + | |
| 11995 | + | |
| 11996 | + | |
| 11997 | + | |
| 11998 | + | |
| 11999 | + | |
| 12000 | + | |
| 12001 | + | |
11931 | 12002 | | |
11932 | 12003 | | |
11933 | 12004 | | |
| |||
0 commit comments