Repository navigation
Commit 55f845a
feat(pm): dispatch-gates derives the ui/scripts/__tests__ suite for diffs under ui source, ui apps, skills/objectui and ui/scripts (#26383)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DF9skmntVkpgbtnjpLwPvPW)_
## What
`scripts/pm/dispatch-gates.mjs` now derives `pnpm --dir ui exec vitest
run scripts/` (the whole `ui/scripts/__tests__` suite) for any diff
touching one of the card's four roots: `ui/packages/**/src`,
`ui/apps/**`, `skills/objectui/**` or `ui/scripts/**`. Before this,
those 180 files (178 that run, 2 skipped) ran only in CI's 16 `Test UI`
shards and no derived family named them.
## How (the tool's own convention, no parallel mechanism)
- **A change-kind row.** A new row in `CHANGE_KIND_ROWS`
(`scripts/pm/dispatch-gates.data.mjs`) with predicate
`ui-scripts-suite-input`, bound in `CHANGE_KIND_PREDICATES`. The roots
are data (`UI_SCRIPTS_SUITE_ROOTS`). They are matched in CI's own
`paths:` language through the existing `triggerListCovers`, so a
directory surface counts the way it counts for a workflow trigger.
- **Bound to the CI job it stands in for.** Every other gate in that
table resolves by name against a discovered `check:*` family. This suite
has no such family: the only step that runs it is `Test UI`'s vitest
line, which carries a shard and the affected-test selector's filter
list, and `.github/**` is out of scope here. So the gate declares
`ciJob: 'Test UI'` and `ciRunner: 'pnpm --dir ui exec vitest run'`.
- `ciJobRunsRunner` resolves the gate against the same `workflowEntries`
the discovery reads. If the job is renamed or the runner is respelled,
the gate renders STALE, which is the same rot report a renamed family
gets.
- `bindChangeKindRows` refuses a half-declared binding at load.
- The census guard in the self-test reds when the live workflows stop
running it.
- **It reaches every output.** Through `kindGroups` the gate is in
`--commands`, `--json`, the human convention block, the `--residue` kind
list and `--ran` (`commandsFor` → `runReconciliation`). Nothing moves in
the family partition: the residue still places 326 of 326.
- **The `why` names its prerequisite.** The suite needs the seven
`@objectstack` packages `Test UI` builds first. Unbuilt, 16 files go red
on a missing dist import (measured below). So the line prints the job's
own turbo build command.
## Measured first
All measured on a 4-vCPU cloud container at base `6390fe52`.
| Reading | Result |
|---|---|
| Suite, packages unbuilt | 16 files failed / 162 passed, 231 s (missing
`@objectstack/spec` dist and similar) |
| Seven packages built (job's turbo command) | 274 s cold |
| Suite, built — run 1 | **178 passed, 2 skipped, 284 s** |
| Suite, built — run 2 | **178 passed, 2 skipped, 286 s** |
Vitest reports ~270 s of the run as module import.
Reach of the 180 files, from a static scan of each file plus the helpers
it imports relatively. This is a source scan, not a runtime trace.
| Root | Files that read it (file + helpers) | File alone |
|---|---|---|
| `ui/packages/**/src` | 165 | 128 |
| `ui/apps/**` | 141 | 66 |
| `skills/objectui/**` | 16 | 8 |
| `ui/scripts/**` | 170 | 140 |
**Decision: the whole suite, not an affected subset.** On this container
it is about five minutes, not the card's "about a minute". It still
replaces a ~25-minute CI round trip. A subset map would have to model
what each file reads off the tree: 165 of the 180 read package source
and 141 the apps. That map is exactly the second list that goes stale,
and it would save minutes, not a round trip. The deletion criterion and
the stated blind spot sit with the row's docblock.
## Self-test pins (fast tier, in-process)
- A diff under each of the four roots derives the suite, both in the
rendered convention block (anchored on the delimiter) and in the
runnable union.
- `packages/core/src/x.ts`, `ui/packages/core/package.json`,
`skills/objectstack/SKILL.md` and `scripts/pm/dispatch-gates.mjs` derive
neither.
- A run record that carries every derived command except the suite is
not ok, and names the suite unrun. The control with it is ok.
- An unresolved binding renders STALE, naming the job and the runner.
- `ciJobRunsRunner` resolves on a fixture job, fails on a renamed job
and on a respelled runner, and resolves against the live workflows.
- A half-declared binding refuses at load.
- One existing pin moved. The `inherited-population` marker line census
reads `dispatch-gates.mjs:738` instead of `:736`, because the data
import and its re-export each gained one name. It carries a comment like
its neighbours.
`node scripts/pm/dispatch-gates.mjs --self-test --fast`, detached:
**1935 cases pass**. The full battery result is in the gate run below.
## End to end on PR #26274 head 1ef5c48
The head is reachable. Merge base `2409c9c8`, 57 changed files.
- `--commands` over those 57 files: 66 commands. Against the base tool
(same tree, `6390fe52`) the only difference is the added line `pnpm
--dir ui exec vitest run scripts/`.
- I ran that command in a worktree at `1ef5c482`, after the
seven-package build: **4 files failed, 174 passed**. It reproduces all
three reds the card measured:
- `check-skill-examples.test.ts`: `json: 69 marked, floor 70` (the
MARKED_FLOOR).
- `turbo-build-inputs.test.ts`: `@object-ui/console`'s build reads
`packages/sdui-parser/src/retired-visibility-dialects.ts`, which turbo's
build inputs do not declare.
- `check-doc-expression-carriage.test.ts`: 10 failures on the carriage
fixtures.
- The fourth, `check-hand-rolled-comment-mask.test.ts › exits 0 as a
process`, was a 15 s timeout while the dispatch-gates self-test ran on
the same 4 cores. It passed in both clean runs on main. I read it as
container load, not that head's.
## No narrowing
`--commands` from this branch vs main's tool on the same tree, sorted
and diffed:
| Paths | main | this branch | Difference |
|---|---|---|---|
| `packages/core/src/index.ts` | 49 | 49 | none |
| `scripts/pm/dispatch-gates.mjs` | 30 | 30 | none |
| `ui/scripts/check-skill-examples.mjs` | 12 | 13 | + the suite |
| `skills/objectui/SKILL.md` | 34 | 35 | + the suite |
| `ui/apps/console/package.json` + a spec file | 85 | 86 | + the suite |
| #26274's 57 files | 65 | 66 | + the suite |
No line was removed in any set.
## Local gates for this diff
`node scripts/pm/dispatch-gates.mjs --commands` (no paths, from git,
merge base `6390fe52`) derives 30 families for this diff. All 30 ran,
each recorded as `CMD :: exit N`, and **all 30 exited 0**. `pnpm
check:pm-dispatch-gates` is the fast tier, 1935 cases in 377 s.
`node scripts/pm/dispatch-gates.mjs --ran ran.list` reports: `30 derived
famil(ies) accounted for — 30 run, 0 NOT-MEASURED (a DERIVED zero)`,
exit 0.
The slow tier (`--self-test` without `--fast`) runs on `main`'s push and
schedule only. Its local reading is reported on the card.
## Out of scope, noted for the seat
- `dispatch-gates.mjs`'s `pnpm` recognizer reads `pnpm [--filter X]
[run] check:*`, never `pnpm --dir ui run check:*`. So the 38 distinct
`check:*` scripts that `Lint UI` / `Build & E2E UI` invoke that way in
`ci.yml` are discovered as no family at all.
- Those jobs' `if:` is `ui_tree != 'false' && ui != 'false'`, which
`jobIfReading` refuses as an intersection. So they appear in neither the
job-filtered tail nor the always-runs tail.
- That is a reproducible under-derivation for every ui card, and it is
not fixed here. It needs its own card (recognizer +
`&&`-of-filter-outputs reading).
## Governance
- Changed paths: `scripts/pm/dispatch-gates.mjs`,
`scripts/pm/dispatch-gates.data.mjs`,
`scripts/pm/dispatch-gates.self-test.mjs`.
- No `.github/**`, `AGENTS.md`, `.claude/**` or `skills/**` file is
touched, and no governed text quotes the change-kind list.
- `check-governed-merges --test` on these paths: 0 hits.
- The data module's header says "A new gate family under a kind is one
row here, still only on the maintainer's words". This row comes from
card #26318, which was dispatched under the maintainer's standing devx
grant. Flagged so the seat can judge whether that suffices.
- Changeset: none. This is a private root script, so the PR carries
`skip-changeset`.
Clause-②: no
Metadata-protocol: none
Fixes #26318
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01AYg1gtz1tWt66GpPnTo1QF
---
_Generated by [Claude
Code](https://claude.ai/code/session_01AYg1gtz1tWt66GpPnTo1QF)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent bb60b86 commit 55f845a
3 files changed
Lines changed: 217 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
903 | 911 | | |
904 | 912 | | |
905 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
906 | 949 | | |
907 | 950 | | |
908 | 951 | | |
| |||
1013 | 1056 | | |
1014 | 1057 | | |
1015 | 1058 | | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1016 | 1071 | | |
1017 | 1072 | | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1018 | 1090 | | |
1019 | 1091 | | |
1020 | 1092 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| |||
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| 495 | + | |
494 | 496 | | |
495 | 497 | | |
496 | 498 | | |
| |||
11043 | 11045 | | |
11044 | 11046 | | |
11045 | 11047 | | |
| 11048 | + | |
| 11049 | + | |
| 11050 | + | |
| 11051 | + | |
| 11052 | + | |
| 11053 | + | |
| 11054 | + | |
| 11055 | + | |
| 11056 | + | |
| 11057 | + | |
| 11058 | + | |
| 11059 | + | |
| 11060 | + | |
| 11061 | + | |
| 11062 | + | |
| 11063 | + | |
| 11064 | + | |
| 11065 | + | |
| 11066 | + | |
| 11067 | + | |
| 11068 | + | |
| 11069 | + | |
| 11070 | + | |
| 11071 | + | |
| 11072 | + | |
| 11073 | + | |
| 11074 | + | |
| 11075 | + | |
| 11076 | + | |
| 11077 | + | |
| 11078 | + | |
| 11079 | + | |
| 11080 | + | |
| 11081 | + | |
| 11082 | + | |
| 11083 | + | |
| 11084 | + | |
| 11085 | + | |
| 11086 | + | |
11046 | 11087 | | |
11047 | 11088 | | |
11048 | 11089 | | |
| |||
11058 | 11099 | | |
11059 | 11100 | | |
11060 | 11101 | | |
| 11102 | + | |
11061 | 11103 | | |
11062 | 11104 | | |
11063 | 11105 | | |
| |||
11069 | 11111 | | |
11070 | 11112 | | |
11071 | 11113 | | |
| 11114 | + | |
| 11115 | + | |
| 11116 | + | |
| 11117 | + | |
| 11118 | + | |
| 11119 | + | |
| 11120 | + | |
| 11121 | + | |
| 11122 | + | |
| 11123 | + | |
| 11124 | + | |
11072 | 11125 | | |
11073 | 11126 | | |
11074 | 11127 | | |
| |||
11103 | 11156 | | |
11104 | 11157 | | |
11105 | 11158 | | |
11106 | | - | |
| 11159 | + | |
| 11160 | + | |
| 11161 | + | |
| 11162 | + | |
| 11163 | + | |
| 11164 | + | |
| 11165 | + | |
| 11166 | + | |
11107 | 11167 | | |
11108 | 11168 | | |
11109 | 11169 | | |
| |||
11113 | 11173 | | |
11114 | 11174 | | |
11115 | 11175 | | |
11116 | | - | |
| 11176 | + | |
11117 | 11177 | | |
11118 | 11178 | | |
11119 | 11179 | | |
11120 | | - | |
| 11180 | + | |
| 11181 | + | |
| 11182 | + | |
11121 | 11183 | | |
11122 | 11184 | | |
11123 | 11185 | | |
| |||
14545 | 14607 | | |
14546 | 14608 | | |
14547 | 14609 | | |
14548 | | - | |
| 14610 | + | |
| 14611 | + | |
14549 | 14612 | | |
14550 | 14613 | | |
14551 | 14614 | | |
| |||
0 commit comments