Repository navigation
Commit d0512c2
refactor(core)!: retire RegisteredAction and deepFreeze from the @object-ui/core entry (#31348)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XH4WSrD2AHNZsG3WQ5eREZa)_
Part of #25921
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none (neither name appears under `skills/**` or
`content/docs/**`)
## 维护者速读
- 改了什么:`@object-ui/core` 的根入口不再导出 `RegisteredAction` 和 `deepFreeze`
两个名字;这是 #25921 的第 15 批。两者仍留在各自模块里,包内代码照常使用。
- 为什么改:两个仓库里没有任何代码从包入口引用它们;包外仅有的同名文字都是别处自己声明的同名接口或函数(一个 dogfood
测试的接口、四个测试里的本地 `deepFreeze` 函数和沙箱源码文本)。
- 风险与回滚:只把两行 `export *` 改成具名列表,无声明删除、无模块移动;外部 npm 宿主若从入口 import
这两个名字会编译失败(未实测,changeset 写了 BREAKING 与替代写法)。`!` patch,回滚即 revert 本 PR。
- 先看:`ui/packages/core/src/index.ts`(freeze-schema
具名列表)、`ui/packages/core/src/actions/index.ts`(ActionEngine
具名列表)、`.changeset/25921-core-homonym-only-exports.md`。
- 两分钟验证:`node scripts/check-adr-0087-registration.mjs --base
origin/main`,预期两个名字都 `verified … (export, ui/packages/core/src/…)`、退出 0。
- 需要你做的:无,席位落地。
## What changes
Batch 15 as named in the seat's amendment 6716057610 on claim 6716004841
(census `/mnt/project-files/pm-orders/ui/25921-b15-census.md`,
`origin/main` `604a2b3b`, hotcrm `6961ab1`). After this batch the
`@object-ui/core` entry holds no other name retirable under the card's
rules.
- **`ui/packages/core/src/actions/index.ts`** (unpublished sub-barrel
that `src/index.ts` star-exports): `export * from './ActionEngine.js'`
becomes a named list (`ActionEngine`, `ACTION_LOCATIONS`,
`ActionLocation`, `ShortcutBinding`) without `RegisteredAction`, which
stays in the module as the type of `ActionEngine`'s private registry.
- **`ui/packages/core/src/index.ts`**: `export * from
'./utils/freeze-schema.js'` becomes a named list of the module's other
seven exports (`SYSTEM_VIEW_MARKER`, `defineSystemView`, `isSystemView`,
`cloneAsOverride`, `DeepReadonly`, `DeepMutable`, `SystemView`) without
`deepFreeze`, which stays in the module for `defineSystemView`.
- **Changeset** `.changeset/25921-core-homonym-only-exports.md`: `!`
patch, BREAKING, FROM/TO for each name, `runtime-export-retired` ×2
(FROM spans 1:1), both declaration lines.
No declaration is deleted and no module moves.
## Tests
- Census (`rg -o -w -F` over both trees, then each outside hit read by
hand): `RegisteredAction`'s only outside hit is
`packages/qa/dogfood/test/organization-rename-door.dogfood.test.ts`,
which declares its own `interface RegisteredAction`. `deepFreeze`'s
outside hits are four local `function deepFreeze` declarations (in
`packages/spec`, `plugin-security` and two `service-analytics` tests)
and `var deepFreeze` inside the sandbox source text of
`packages/runtime/src/sandbox/quickjs-runner.ts`. None imports
`@object-ui/core`. hotcrm: 0 for both. Positive controls, `git grep -l
-w -F NAME origin/main -- . ':!ui/packages/core'` (files):
`ActionEngine` 65, `defineSystemView` 5.
- Rule 3: the emitted-declaration walk from every kept export reaches
neither name (a private member's type does not reach the `.d.ts`).
Neither is in the core README, which teaches `defineSystemView`,
`cloneAsOverride` and `isSystemView` (all kept). Core's only JS export
is `.`.
- Reverse probe of the entry (TypeScript checker export list of
`src/index.ts`): 476 names before, 474 after; exactly `RegisteredAction`
and `deepFreeze` gone, none added. Built `dist/index.js` imported at
runtime: `deepFreeze` is not a key; `defineSystemView`, `isSystemView`,
`cloneAsOverride`, `SYSTEM_VIEW_MARKER`, `ActionEngine` and
`ACTION_LOCATIONS` are.
- `pnpm --filter '@object-ui/core...' build && pnpm --filter
@object-ui/core run type-check` under the lock: `VERDICT command-exit
0`.
- `pnpm --dir ui exec vitest run --maxWorkers=2 packages/core/` → Test
Files 233 passed (233), Tests 4376 passed | 27 skipped (4403).
- No test was added or removed, and there is no ablation: this only
stops re-exporting two names and changes no tested behaviour.
## Acceptance notes
- Three more names the batch 14 census counted as homonym-only stay on
the card, because each outside hit is prose about core's own function,
and prose counts as a consumer: `hasConflictingColumnIdentity` (a JSDoc
in a `plugin-detail` test), `evaluatePlainCondition` (the v18 18.3
release note) and `meetsContrastLevel` (a 2026-06 audit under a
`core/theme/ThemeEngine.ts` heading).
- After this batch the seat records `@object-ui/core` as exhausted under
the card's current rules (amendment 6716057610).
## Verification
<details><summary>Derived gates on HEAD dddbca3 (30/30, all exit 0,
--ran reconciled)</summary>
`node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--ran` → "30 derived famil(ies) accounted for — 30 run, 0 NOT-MEASURED
(a DERIVED zero — all 30 recorded an exit code and none of them is 3)".
- `node scripts/check-adr-0087-registration.mjs --base origin/main` exit
0: `verified: @object-ui/core#RegisteredAction (export,
ui/packages/core/src/actions/ActionEngine.ts),
@object-ui/core#deepFreeze (export,
ui/packages/core/src/utils/freeze-schema.ts)`; `--self-test` exit 0
- `node scripts/check-changeset-no-major.mjs --base origin/main` exit 0
- `node scripts/check-empty-changeset.mjs --base origin/main` exit 0;
`--self-test` exit 0
- `node scripts/check-closing-keyword-parity.mjs` exit 0; `--self-test`
exit 0
- `node scripts/check-comment-mask-corpus.mjs`,
`check-sdui-manifest.mjs` (+ `--self-test`), `ci/snapshot-next.mjs
--self-test`, `pm/release-rehearsal-clone.mjs --self-test`,
`release-pending-publish.mjs --self-test`: exit 0
- `pnpm --dir ui exec vitest run scripts/` → Test Files 170 passed | 2
skipped (172), Tests 4996 passed | 2 skipped (4998). A first run without
`@objectstack/client` built locally answered exit 1 in
`unit-registry-absence-collision.test.ts` ("Failed to resolve entry for
package @objectstack/client" for 37 app-shell modules); after building
that package's closure the same command answered exit 0.
- `pnpm --filter @objectstack/spec run check:duration-unit-keys`, `pnpm
check:changeset-gate-self-tests`, `check:closed-ceremony-text`,
`check:dispatcher-error-vocabulary`, `check:driver-memory-census`,
`check:gitlink-declared`, `check:nul-bytes`, `check:published-files`,
`check:refd-timer-probe`, `check:registry-log-declared`,
`check:rest-log-spy-declared`, `check:skill-identifier-liveness`,
`check:test-source-alias`, `check:tier-file-adoption`,
`check:undeclared-dep-imports`, `check:watch-hint-literal`: exit 0
Outside the derivation: `pnpm check:changeset-fixed` exit 0; `node
scripts/check-platform-checklist.mjs --changed-from origin/main` exit 0
(no anchored file); `pnpm --dir ui check:new-line-citations` exit 0 (0
new citations); `pnpm check:published-readme-exports` not run locally
(needs every published package built; CI runs it).
</details>
<details><summary>Full dogfood battery on HEAD dddbca3</summary>
`bash scripts/pm/os-verify-lock.sh -c "pnpm --workspace-concurrency=2
--filter '@objectstack/dogfood^...' build && pnpm --filter
@objectstack/dogfood test"` → `os-verify-lock: VERDICT command-exit 0`
(held 38m15s) · Test Files 435 passed | 3 skipped (438) · Tests 3610
passed | 41 skipped (3651) · no failure.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5nqfeFSXxNcgTAEjp3)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5nqfeFSXxNcgTAEjp3
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9a63ecb commit d0512c2
3 files changed
Lines changed: 45 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
189 | 200 | | |
190 | 201 | | |
191 | 202 | | |
| |||
0 commit comments