Repository navigation
Commit e931621
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoAqVfFyhsxKuFcEP9YTBj25)_
Closes #26137 (PR B of two: PR A #26315 put the regeneration in CI; this
retires the per-package records it replaces). Tier H
(`.github/workflows/**`).
Part of objectstack#25677.
Clause-②: no
Metadata-protocol: none
## 维护者速读(草稿)
- **改了什么:** 删掉 `scripts/sdui-manifest.sources/` 下 26 个按包记录的源码摘要,以及
`check-sdui-manifest` 里比对这些摘要的第 3 项检查。清单是否新鲜,现在只由 #26315 加的 CI
步骤判定:`Build & E2E UI` 重新生成 `sdui.manifest.json` 并逐字节比较,PR
上和合并队列的合并树上都跑。lint 里的检查保留存在性、形状和 sha256 防篡改。`AGENTS.md` 里仍在讲已退役 objectui
钉的那段改为现状(行数不变)。
- **为什么改:** 摘要记录是在 CI 不能重新生成清单时的替代品。它让两个改同一个 registry 包的 ui PR
在记录文件上冲突,哪怕谁都没改清单(`i18n` 最热,12 个开着的 ui PR 里有 5 个碰它)。本 PR 自己 rebase 到
`main` 时就撞上 7 个这样的冲突,而清单一个字节都没变。CI 重新生成后,PR 只在清单真的变了时冲突。
- **哪些原来能合的现在会被拒:** 没有。仍带 `inTree.registryRecords` 的旧记录会被拒,提示重新生成。
- **哪些原来被拒的现在能合:** 只改 registry 源码、不改清单的 PR 不用再提交记录文件。清单过期仍由 `Build & E2E
UI` 拒绝,而且它看得见解析器、registry 引用的 `@objectstack` 包和两个排队 PR 合起来的效果,摘要看不见这些。
- **风险与回滚:** 只改 CI、脚本和文档,不发布任何包,清单字节不变。在本 PR 之前开的分支如果改过某个记录文件,rebase
时会遇到"修改/删除"冲突,删掉该文件即可。回滚 = revert 本 PR。
- **你要做的:** Tier H,需要 GOVERNED_APPROVERS 审批。
## 席位核对
(left for the dispatch seat)
## Why
`check-sdui-manifest` held freshness with a source digest per registry
package, recorded one line per package under
`scripts/sdui-manifest.sources/` (#26051). The digests existed because a
PR author could not afford to regenerate the manifest on every push.
They cost two things (#26137):
1. **Conflicts on records, not on the contract.** Two PRs that touched
the same registry package's `src/` conflicted on that package's record
even when neither changed `sdui.manifest.json`.
2. **A blind spot.** No digest saw `@objectstack/sdui-parser`, the
`@objectstack` packages the registry imports, or two queued PRs whose
effect on the manifest only shows together.
#26315 made CI regenerate the manifest in `Build & E2E UI` and compare
it with the committed bytes, on `pull_request` and on the merge queue's
combined tree. It is green on `main`: the push run on `4ddf6df61` passed
50 of 53 check runs with 3 skipped and none failed, and `Build & E2E UI`
ran the new step. The digests now only produce the conflicts. Rebasing
this PR onto `main` hit seven of them: `components`, `core`, `i18n`,
`plugin-detail`, `plugin-grid`, `react` and `types` had been re-recorded
since, and the manifest's bytes had not moved.
## What changes
### `scripts/check-sdui-manifest.mjs`
- **Check 3 in-tree is gone.** `registrySourceDigests`,
`readRegistryRecords`, `registryRecordPath`, `registryRecordLine`,
`REGISTRY_RECORDS` and the gate's copy of `REGISTRY_MODULES` go with it.
- **The in-tree leg keeps** the artefact's presence and shape, the
sha256 and component count against the record, and the `inTree` block
(`modulesRoot`, `objectuiWorkspaceVersion`).
- **A record that still carries `inTree.registryRecords` is RED** as a
retired layout, the same way the single-digest fields from before #26051
already are. That catches a branch cut before this PR that regenerated
with the old generator.
- **`READ_PATHS` and `ROOT_WATCH_HINTS`** drop `ui/packages/**` and the
records directory. The gate reads neither now, so a registry package
edit no longer derives it.
- **The success line** says what it checked and names the CI step for
freshness.
- **The pin mode is untouched.**
### Self-test: 29 rows → 21
The nine digest rows go with the code they tested:
- a staged edit naming one package;
- an unstaged edit;
- tests and unreached packages;
- a new workspace edge;
- a new package;
- a removed package;
- a deleted record;
- an other-artefact record;
- a record out of its one-line form.
Two rows pin the new boundary, and each was ablated to show it bites:
| Row | Ablation | Result |
|---|---|---|
| a record from the per-package layout is RED with the in-tree command |
drop `registryRecords` from the retired fields | row reds |
| a producer run whose artefact did not move leaves the record as it was
(replaces "re-records only the package whose sources moved") | stamp
today's `generatedAt` | row reds |
| same | re-read the `@object-ui/core` version instead of carrying it |
row reds |
The carry row matters more now: the record is the one shared file left,
so a producer that rewrote it on every run would make every pair of ui
PRs conflict on it again.
`SELF_TEST_BATTERY_FLOOR` 29 → 21 matches the roster. The unused
must-not-name column and the producer-list parity check (it existed only
for the digest) are removed.
### `scripts/gen-sdui-manifest-node.mjs`
- No digests, no refusal of unstaged registry bytes (that existed
because the digest read the index), no per-package records.
- It no longer imports the gate, and drops `git-env.mjs`.
- The build, the enumeration, the record's carry rule and the pin mode
are unchanged.
- The record's `//` note now names the CI step.
### The records and the record
- `scripts/sdui-manifest.sources/` (26 files) is deleted.
- `scripts/sdui-manifest.record.json` is regenerated. It loses
`inTree.registryRecords` and takes the new note.
- `sdui.manifest.json` is **byte-identical** (sha256 `1f6e1ccb925a…`,
106 components), and `generatedAt` is carried.
### Readers
- `scripts/check-changeset-no-major.mjs`: the comment, the real-build
assertion and the record-only fixture name only the shared record.
- `lint.yml` and `ci.yml`: the step comments.
- `docs/releases-maintenance.md`: the manifest section, and the cut-rc
step that said lint held freshness.
- `AGENTS.md` (the dispatch seat asked for it here): the manifest
paragraph still described the retired objectui pin. It said to run `pnpm
objectui:build`, that `scripts/check-sdui-manifest.mjs` reds until you
regenerate, and that `objectui:bump` and `objectui:refresh` print the
step, but no `objectui:*` script exists since the cutover. It now names
the in-tree command and the CI step. It is line-neutral: 5 lines stay 5,
each ≤ 118 bytes, the file stays at 1112 lines, and
`check:pm-skill-ratchet` and `check:pm-governed-prose` pass.
`cut-rc.yml` and `release.yml` name only the tracked artefact, so they
need no change.
### Widening or narrowing
**For freshness, this is a narrowing of the lint gate, covered by a
wider check that is already required.** Every case the digests refused
is a case where the committed manifest differs from what the tree
generates, or a case where it does not:
- **The manifest differs:** a registry source change that moves the
manifest, or a combination of PRs. `Build & E2E UI` refuses it on the PR
or in the queue.
- **The manifest does not differ:** a source change that does not move
it, or a new package or edge that adds no component. Refusing those was
the conflict cost, not protection.
`Build & E2E UI` runs on `ui || ui_consumers`, and the registry's
runtime closure is inside those filters (#26315's table), so no stale
manifest that the digests caught reaches `main`.
## Merge order
- **#26343** (2g PR 2) re-records `components`, `core`,
`plugin-dashboard` and `types` and deletes `sdui-parser.json` under
`scripts/sdui-manifest.sources/`. Whichever lands second rebases:
- If #26343 lands first, this PR takes modify/delete conflicts on those
records, and `git rm` resolves them.
- If this PR lands first, #26343 drops its record edits the same way.
- Its one hunk in `scripts/gen-sdui-manifest-node.mjs` (header lines
28–29) does not overlap this PR's hunks. It does not touch
`sdui.manifest.json` or the record.
- **Open branches** that changed a file under
`scripts/sdui-manifest.sources/` get a modify/delete conflict on rebase.
`git rm` the file, then re-run `node scripts/gen-sdui-manifest-node.mjs`
if the PR changes the manifest.
## Verification
Head `15f5e2777`, on `main` `77a52cfe8`. 34 files, +198 / −687, one
commit. 26 of the files are the deleted records. Tier H:
`check-governed-merges --test` exits 3 for `ci.yml`, `lint.yml` and
`AGENTS.md`, and 0 for the other five.
- **Regeneration:** on this head, `node
scripts/gen-sdui-manifest-node.mjs` rebuilt the registry after `main`
moved (467 s) and left `git status` clean. `sdui.manifest.json` was
byte-identical, and the committed record is exactly what it writes
("left unchanged … its date and version are carried").
- **`check-sdui-manifest`:** `--self-test` 21 cases behave, and the
production run is green: "present and intact (sha256 1f6e1ccb925a…, 106
components) … Not judged here: whether it is the manifest this tree
generates."
- **Ablations:** the three in the table above, each red, each restored.
- **Before the rebase**, the same change stacked on PR A (`75d1ea668`,
without the AGENTS.md paragraph) passed:
- the derived sweep, 82 of 82 exit 0, with `--ran` reconciling 82
derived, 82 run, 0 NOT-MEASURED, 0 UNRUN;
- the push battery, 2164 cases pass, 0 fail, EXIT 0.
- **On this head**, the sweep and the battery are running and will be
added here.
- **CI:** pending.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01A6SEitNngAMugGbuJHWsDS
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 756220c commit e931621
34 files changed
Lines changed: 198 additions & 687 deletions
File tree
- .github/workflows
- docs
- scripts
- sdui-manifest.sources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4148 | 4148 | | |
4149 | 4149 | | |
4150 | 4150 | | |
4151 | | - | |
4152 | | - | |
4153 | | - | |
4154 | | - | |
4155 | | - | |
4156 | | - | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
4157 | 4157 | | |
4158 | 4158 | | |
4159 | 4159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
976 | 974 | | |
977 | 975 | | |
978 | 976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
| 61 | + | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
89 | 77 | | |
90 | 78 | | |
91 | 79 | | |
92 | 80 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
| |||
234 | 228 | | |
235 | 229 | | |
236 | 230 | | |
237 | | - | |
238 | | - | |
239 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
240 | 234 | | |
241 | 235 | | |
242 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
| 1368 | + | |
| 1369 | + | |
1371 | 1370 | | |
1372 | 1371 | | |
1373 | 1372 | | |
| |||
4876 | 4875 | | |
4877 | 4876 | | |
4878 | 4877 | | |
4879 | | - | |
4880 | | - | |
| 4878 | + | |
| 4879 | + | |
4881 | 4880 | | |
4882 | 4881 | | |
4883 | 4882 | | |
| |||
4957 | 4956 | | |
4958 | 4957 | | |
4959 | 4958 | | |
4960 | | - | |
4961 | | - | |
| 4959 | + | |
4962 | 4960 | | |
4963 | 4961 | | |
4964 | 4962 | | |
4965 | 4963 | | |
4966 | | - | |
4967 | 4964 | | |
4968 | 4965 | | |
4969 | 4966 | | |
4970 | 4967 | | |
4971 | 4968 | | |
4972 | 4969 | | |
4973 | 4970 | | |
4974 | | - | |
| 4971 | + | |
4975 | 4972 | | |
4976 | 4973 | | |
4977 | 4974 | | |
| |||
0 commit comments