Repository navigation
Commit ec86867
fix(dispatch-gates): a migration-entry change derives the cli guidance test that reads every entry (#34893)
Fixes #34760
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:`dispatch-gates` 新增一条变更种类行:改动
`packages/spec/src/migrations/entries/**` 时,派生清单会点名 cli 的
`migrate-meta-engine-guidance` 测试命令。
- 为什么改:该测试检查每条迁移条目打印给作者的文字不带工单号,但只在 CI 的 Test Core 里跑,本地门禁清单全绿也会在 CI
才红,白费一轮。
- 风险与回滚:只动 `scripts/pm/**` 三个文件,不发布、不新增门禁或 CI 作业;回滚即 revert 本 PR。
-
先看:`scripts/pm/dispatch-gates.data.mjs`(新行与根目录常量)、`scripts/pm/dispatch-gates.mjs`(`ciSubset`
绑定与 STALE 判定)、`scripts/pm/dispatch-gates.self-test.mjs`(新测试段)。
- 两分钟验证:`node scripts/pm/dispatch-gates.mjs --commands
packages/spec/src/migrations/entries/retired-defs/17.api__CreateViewRequest.ts
2>/dev/null | grep -c migrate-meta-engine-guidance`,预期输出 `1`(main 上为
`0`)。
- 需要你做的:无,席位落地。
## What changes
- **Data** (`dispatch-gates.data.mjs`): a new `CHANGE_KIND_ROWS` row,
kind `spec-migration-entry`, naming `pnpm --filter @objectstack/cli exec
vitest run test/migrate-meta-engine-guidance.test.ts`, and
`SPEC_MIGRATION_ENTRY_ROOTS` (the `entries` directory and its subtree,
in CI's `paths:` language), plus the row's deletion criterion in the
table header. The row's `why` states the build prerequisite runnably
(`pnpm --filter '@objectstack/cli^...' build`): the cli test config does
not alias `@objectstack/spec` to source, so a stale spec dist would
answer for the edit.
- **Engine** (`dispatch-gates.mjs`): the predicate
`readBySpecMigrationEntryConsumers` (the same `triggerListCovers` reader
the ui/scripts suite row uses), and one extension of the existing CI-job
binding. The ui suite gate narrows its runner by prefix; Test Core's
runner (`set -- pnpm turbo run test`) names no package and no file, so
this gate declares `ciSubset` (the repo path of the one test file). At
load, `bindChangeKindRows` holds the name to the one spelling
`packageTestSubsetFile` reads, and that file must match `ciSubset`. At
resolve, the gate turns STALE when the Test Core job no longer runs the
package test task OR the file is gone, so a moved test cannot leave a
command that runs nothing.
- **Self-test**: a new section (specimens, controls, rendering, runnable
union, `--ran` verdict without it, STALE rendering, the load-time
refusals, and the live binding plus live file plus owning package). The
marker-line census pin moves 751 to 753 because of the two import lines.
**One named row, not the general form.** The tree does give a syntactic
signal: ten cli test files import `@objectstack/spec/migrations`. But
that import is not a reading of the entries' prose. The others drive one
conversion, a range or a write, behaviour the spec package's own tests
already reach, and one of them is nightly-tier `.e2e`, so the queue
never runs it. The guidance test is the only one that holds every
entry's printed text, which is what an entry edit changes, and it is the
test that was measured missing. A second consumer gets its own row when
its own miss is measured. This is written into the
`SPEC_MIGRATION_ENTRY_ROOTS` docblock.
No new gate, no new check script, no new CI job and no new `pnpm
check:*` (the card's ruling). `scripts/pm/**` ships nothing, so this PR
carries `skip-changeset`.
## Tests
<details><summary>Re-check (card) and controls, at head
8463c44</summary>
- `--commands
packages/spec/src/migrations/entries/retired-defs/17.api__CreateViewRequest.ts`:
73 commands, **1** naming `migrate-meta-engine-guidance`. On
`origin/main` d947a93 the count was 0 of 72. The card's own path
`entries/index.ts` does not exist, so a real file under `entries/` was
used.
- CONTROL `packages/spec/src/ui/view.zod.ts`: 0. CONTROL
`packages/spec/src/migrations/registry.ts.template`: 0. The `entries`
directory itself: 1.
</details>
<details><summary>Self-test</summary>
- `node scripts/pm/dispatch-gates.mjs --self-test --fast`: `✓
dispatch-gates self-test (fast tier): 2249 cases pass; 9 slow section(s)
deferred.`
- `pnpm check:pm-dispatch-gates` (fast tier off CI): the same verdict
line, plus `✓ check:pm-dispatch-gates --self-test: the exit contract
holds…`. The slow tier is NOT MEASURED locally (reason: off-CI default
is the fast tier, and the run is longer than the container's foreground
cap). CI runs it.
</details>
<details><summary>Ablation (one shot, committed fix first, via
scripts/ablation-replace.mjs)</summary>
- Mutation: the predicate binding `'spec-migration-entry': (path) =>
readBySpecMigrationEntryConsumers(path),` changed to
`'spec-migration-entry': () => false,`. The tool reported `anchor 1 ->
0`, and the injected text was counted at 1 on disk.
- Under the mutant: re-check count **0**, and the fast self-test
**exited 1** with 10 failing cases. Among them: `through the whole
table, …17.api__CreateViewRequest.ts derives the guidance test`, `⭐ a
run record carrying every derived command BUT the guidance test is NOT
ok, and names it unrun`, and the STALE-rendering case.
- Restore: `blob == HEAD (6c5fd05) and git diff HEAD is empty`.
</details>
<details><summary>The derived command runs as written</summary>
`pnpm --filter '@objectstack/cli^...' build && pnpm --filter
@objectstack/cli exec vitest run
test/migrate-meta-engine-guidance.test.ts` under the verify lock: `Test
Files 1 passed (1)`, `Tests 3 passed (3)`, `VERDICT command-exit 0`.
</details>
## Acceptance notes
- `--commands` on the parent directory `packages/spec/src/migrations` is
deliberately not covered by the roots, because the registry template and
generator beside `entries/` are not what the test reads. A surface given
as `packages/spec` does not derive the row either.
- While writing the matcher, `check:pnpm-filter-targets` flagged it. The
first spelling of the regex and of the refusal text read as two dead
`--filter` targets. Both were respelled in 8463c44, and the gate is
green.
## Verification
Gate union on the final head 8463c44: `dispatch-gates --commands`
derived 63 families. All 63 were run locally with exit 0.
`check:i18n-coverage` first answered exit 3 (PREREQUISITE NOT MET, cli
not built), then exit 0 after its stated build: `OK (14 config(s), 423
baselined untranslated string(s), none new)`. The `--ran` reconciliation
answered: `✓ dispatch-gates --ran: 63 derived famil(ies) accounted for —
63 run, 0 NOT-MEASURED`. `overlap-check`: `VERDICT clean exit 0`
(origin/main and one open PR sharing the data file merge cleanly). CI
families are cited from this PR's check-runs in the report.
---
_Generated by [Claude
Code](https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent aa0fde3 commit ec86867
3 files changed
Lines changed: 181 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
954 | 963 | | |
955 | 964 | | |
956 | 965 | | |
| |||
1302 | 1311 | | |
1303 | 1312 | | |
1304 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1305 | 1327 | | |
1306 | 1328 | | |
1307 | 1329 | | |
| |||
1321 | 1343 | | |
1322 | 1344 | | |
1323 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1324 | 1366 | | |
1325 | 1367 | | |
1326 | 1368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| |||
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
| 510 | + | |
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
| |||
12083 | 12085 | | |
12084 | 12086 | | |
12085 | 12087 | | |
| 12088 | + | |
| 12089 | + | |
| 12090 | + | |
| 12091 | + | |
| 12092 | + | |
| 12093 | + | |
| 12094 | + | |
| 12095 | + | |
| 12096 | + | |
| 12097 | + | |
| 12098 | + | |
| 12099 | + | |
| 12100 | + | |
| 12101 | + | |
| 12102 | + | |
| 12103 | + | |
| 12104 | + | |
| 12105 | + | |
| 12106 | + | |
| 12107 | + | |
| 12108 | + | |
| 12109 | + | |
| 12110 | + | |
| 12111 | + | |
| 12112 | + | |
| 12113 | + | |
| 12114 | + | |
| 12115 | + | |
| 12116 | + | |
| 12117 | + | |
| 12118 | + | |
| 12119 | + | |
| 12120 | + | |
| 12121 | + | |
12086 | 12122 | | |
12087 | 12123 | | |
12088 | 12124 | | |
| |||
12128 | 12164 | | |
12129 | 12165 | | |
12130 | 12166 | | |
| 12167 | + | |
12131 | 12168 | | |
12132 | 12169 | | |
12133 | 12170 | | |
| |||
12144 | 12181 | | |
12145 | 12182 | | |
12146 | 12183 | | |
| 12184 | + | |
| 12185 | + | |
12147 | 12186 | | |
12148 | | - | |
12149 | | - | |
| 12187 | + | |
| 12188 | + | |
| 12189 | + | |
12150 | 12190 | | |
12151 | 12191 | | |
12152 | | - | |
| 12192 | + | |
| 12193 | + | |
12153 | 12194 | | |
12154 | 12195 | | |
12155 | 12196 | | |
| |||
12194 | 12235 | | |
12195 | 12236 | | |
12196 | 12237 | | |
| 12238 | + | |
12197 | 12239 | | |
12198 | 12240 | | |
12199 | 12241 | | |
| |||
12204 | 12246 | | |
12205 | 12247 | | |
12206 | 12248 | | |
12207 | | - | |
| 12249 | + | |
12208 | 12250 | | |
12209 | 12251 | | |
12210 | 12252 | | |
| 12253 | + | |
| 12254 | + | |
12211 | 12255 | | |
12212 | 12256 | | |
12213 | 12257 | | |
| |||
15671 | 15715 | | |
15672 | 15716 | | |
15673 | 15717 | | |
15674 | | - | |
| 15718 | + | |
| 15719 | + | |
| 15720 | + | |
| 15721 | + | |
| 15722 | + | |
| 15723 | + | |
15675 | 15724 | | |
15676 | 15725 | | |
15677 | 15726 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
| |||
5542 | 5545 | | |
5543 | 5546 | | |
5544 | 5547 | | |
| 5548 | + | |
| 5549 | + | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + | |
| 5553 | + | |
| 5554 | + | |
| 5555 | + | |
| 5556 | + | |
| 5557 | + | |
| 5558 | + | |
| 5559 | + | |
| 5560 | + | |
| 5561 | + | |
| 5562 | + | |
| 5563 | + | |
| 5564 | + | |
| 5565 | + | |
| 5566 | + | |
| 5567 | + | |
| 5568 | + | |
| 5569 | + | |
| 5570 | + | |
| 5571 | + | |
| 5572 | + | |
| 5573 | + | |
| 5574 | + | |
| 5575 | + | |
| 5576 | + | |
| 5577 | + | |
| 5578 | + | |
| 5579 | + | |
| 5580 | + | |
| 5581 | + | |
| 5582 | + | |
| 5583 | + | |
| 5584 | + | |
| 5585 | + | |
| 5586 | + | |
| 5587 | + | |
| 5588 | + | |
| 5589 | + | |
| 5590 | + | |
| 5591 | + | |
| 5592 | + | |
| 5593 | + | |
| 5594 | + | |
| 5595 | + | |
| 5596 | + | |
| 5597 | + | |
| 5598 | + | |
| 5599 | + | |
| 5600 | + | |
| 5601 | + | |
| 5602 | + | |
| 5603 | + | |
| 5604 | + | |
| 5605 | + | |
| 5606 | + | |
| 5607 | + | |
| 5608 | + | |
| 5609 | + | |
| 5610 | + | |
| 5611 | + | |
| 5612 | + | |
| 5613 | + | |
| 5614 | + | |
| 5615 | + | |
| 5616 | + | |
| 5617 | + | |
| 5618 | + | |
| 5619 | + | |
| 5620 | + | |
| 5621 | + | |
| 5622 | + | |
| 5623 | + | |
| 5624 | + | |
| 5625 | + | |
| 5626 | + | |
| 5627 | + | |
5545 | 5628 | | |
5546 | 5629 | | |
5547 | 5630 | | |
| |||
8242 | 8325 | | |
8243 | 8326 | | |
8244 | 8327 | | |
8245 | | - | |
| 8328 | + | |
| 8329 | + | |
8246 | 8330 | | |
8247 | 8331 | | |
8248 | 8332 | | |
| |||
0 commit comments