Repository navigation
Commit 66949b7
Part of #15204
Clause-②: no (narrowing): it retires four declared objects with their
data and REST routes, Setup object pages and exports. It adds no export
and widens no accept set; the one widening of the early build (a new
metadata-protocol export) is D's landed captureUninstallDeclared now.
C3 stage 8, the code half (S8), card #23056. It lands after S8-T
(#22962, the test half) and D (#22900). #15204 stays open: 7a/7b (dead
modules, #22975), 8-post (residue), C7b (#22937 / #15211, the id-to-name
rewrite and the column drop) and the docs sweep follow.
## What this changes
The four security-catalog row objects (`sys_position`,
`sys_permission_set`, `sys_position_permission_set`, `sys_capability`)
are no longer registered (ADR-0131 D3). Their data and REST routes go,
and so do their Setup object pages. Tables and rows stay for the
organization-ownership migration (ADR-0131 D10).
- **E1 (ruling 6110777865, E1 → A):** the `permission` mutation
projector and its reconcile, the `sys_permission_set` and `sys_position`
data-door write-throughs and the row-only position backfill are no
longer registered. A metadata-door save reaches the catalog through the
door's own registry write-through. S8-T's
`permission-metadata-door-reaches-catalog.dogfood.test.ts` pins this.
The modules stay for 7a/7b to delete.
- **The walled catalog data-door refusal (ADR-0131 D3)** is unregistered
with the write-throughs. It landed after this stage was first built and
guards only the three retired objects.
- On a `group` or `isolated` deployment, a data-door write on those
names now answers `404 OBJECT_NOT_FOUND`
(`protocol.assertObjectRegistered`) for every caller. S8-T's
`wall-catalog-refusal` dogfood pins this.
- The walled refusal at `/meta`, at the clone door and at the
`/packages` doors is unchanged.
- `walled-catalog-data-door.test.ts` pinned the registration and is
deleted with it. The module `walled-catalog-data-door.ts` stays, unwired
(no longer registered), for 7a/7b to delete.
- **E3 (E3 → A):** `sys_user_permission_set.permission_set_id` is now
`Field.text` (maxLength 255) and keeps B2's `hidden`. The column, its
ids and both indexes stay the same.
- **E6 (seat amendment 6116546399):** the first-admin promotion reads no
catalog row. An unscoped grant that names no set and carries a legacy id
still withholds the promotion. Both pins hold: S8-T's fresh-boot golden
and `grant-readers-unnamed-grant`.
- **Uninstall cleanup, on D's landed form:** `cleanupPackagePermissions`
keeps D's signature (`declared: { permission }`, captured by
`captureUninstallDeclared` in both uninstall doors) and drops the row
legs: the catalog-row read, the position-binding delete and the by-id
grant leg. It revokes by the declared names alone. The by-id leg is
C7b's.
- **Carried items:**
- Setup nav entries open `/apps/setup/metadata/TYPE?scope=environment`.
- These drop the four names: the grants-cache watched set,
plugin-sharing `bypassObjects`, the organization_admin and showcase
object-permission entries, `SystemObjectName.POSITION` /
`PERMISSION_SET`, the platform-object name lists and the tenancy entry.
- The lint `capability-reference-unknown` seed-row source goes.
- Refusal prose names the clone door instead of the `sys_permission_set`
data route.
- Settings and spec help text are updated, and `isRowActive` is deleted.
- The published plugin-security README stops naming the retired objects.
- **Regenerated:**
- plugin-security translations and the platform-objects form bundles;
- spec reference docs;
- the tenancy and tenant-audit censuses;
- the keyed-text-bounds `MEASURED` record.
- The platform-checklist item
`access-security.packaged-permission-set-lifecycle` is retired.
- The ADR-0087 semantic entry is `catalog-row-objects-retired`.
## Reconciliation with D (#22900, `c8a9783eca`)
This branch was first built on an early D (`fcaedfdaa1`). The `main`
merge resolves it as main plus this stage's own commit (`dbae752f6e`
against its first parent), replayed three-way, so no line of the early D
that the landed D dropped survives.
- D's `captureUninstallDeclared` / `UninstallDeclared { permission }`
supersedes this stage's earlier `declaredCatalogItemsOf` /
`UninstalledCatalogItem`. As a result this diff does not touch
`packages/metadata-protocol/src/protocol.ts` or its index, nor
cloud-connection's install-local door or vitest config.
- The cleanup registration in `security-plugin.ts` is D's. The
`resolveCbpRelation` region is untouched.
## Verification
Branch head `016d329a36`: main `150da61aa5` (S8-T #22962 landed) plus
this diff, 70 files, +325 / −3275. All heavy runs went through
`os-verify-lock`; times are shared-box readings.
- **Whole repo:** `turbo run build` (74 of 74) and `turbo run typecheck`
(147 of 147) are green. `pnpm --filter @objectstack/spec
check:generated` reports all 14 artifacts current. The tenant-audit and
platform-object tenancy censuses and `check-i18n-bundles` are in sync.
- **Suites on the final head:**
- plugin-security: 186 files, 3833 tests;
- lint: 138 files, 6665 tests;
- metadata-protocol: 233 files, 28284 tests;
- spec: 662 files, 20114 tests;
- dogfood, focused: `anonymous-door-sweep`,
`permission-metadata-door-reaches-catalog` and `wall-catalog-refusal`, 3
files, 41 tests.
- **Earlier heads of this branch.** Every one already carried this stage
and S8-T's tests; each differs from the final head only by later `main`
commits and S8-T's own test-file revisions.
- `e3d00e12ee` (S8-T `9d9bdd96b2` merged):
- service-settings: 43 files, 788 tests;
- plugin-approvals: 73 files, 1035 tests;
- plugin-hono-server: 29 files, 336 tests;
- cloud-connection: 44 files, 540 tests;
- verify: 38 files, 301 tests;
- client: 51 files, 653 tests;
- organizations: 13 files, 160 tests;
- app-crm: 6 files, 46 tests;
- app-showcase: 33 files, 409 tests;
- 4 focused plugin-security files (builtin-positions, the fresh-boot
golden, grant-readers-unnamed-grant, cleanup-package-permissions), 71
tests;
- the 2 plugin-auth grant-reader files, 9 tests.
- `857bdb7ecc`:
- dogfood, full: 253 files plus 1 skipped, 2079 tests;
- plugin-auth: 136 files, 2780 tests.
- `34f4f777c4`: cli unit, 285 files, 4283 tests.
- `31933c0ccf`:
- core: 95 files, 2397 tests;
- platform-objects: 70 files, 1091 tests;
- plugin-sharing: 41 files, 1007 tests;
- objectql: 409 files, 7998 tests;
- rest: 275 files, 5761 tests;
- runtime: 363 files, 5174 tests.
- **Premise (6110777865):** a metadata-door `permission` save reaches
the catalog with the projector unwired.
`permission-metadata-door-reaches-catalog.dogfood.test.ts` passes its
precondition and its create, edit and delete cases on the combined tree,
and no live caller of the projector, either write-through, the backfill
or the walled door remains.
- **Gates:** the list derived three-dot against `origin/main` (143
families), unioned with the dispatch's lead list, ran on `016d329a36`.
That is 145 commands, with `check:pm-dispatch-gates` run detached, and
`dispatch-gates --ran` reconciles 143 of 143. 144 exit 0.
- The one exit 1 is `check:platform-checklist`: 8 `ABSENT SYMBOL` /
anchor-floor findings in `access-security.json`,
`attachments-storage.json` and `search.json`.
- All 8 are identical on `main` `150da61aa5` (`node
scripts/check-platform-checklist.mjs`, compared line for line). The gate
is kept out of per-PR CI.
- **Not run locally:** `pnpm lint` (the repo-wide scan is CI's).
## Acceptance notes
- Out of scope here, and carried elsewhere:
- 7a/7b (#22975): the unwired `permission-set-projection.ts`,
`position-write-through.ts`, `position-environment-backfill.ts`,
`walled-catalog-data-door.ts` (and its ADR anchor) and the
`writesExecutedByDataDoor` WeakSet. They are no longer registered, but
`catalog-reference-report.ts`,
`packaged-permission-set-overlay-detection.ts` and
`position-environment-backfill.ts` still import helpers from them, so
7a/7b re-home `POSITION_OBJECT`, `metadataDoorAcceptsPositionName`,
`tryFind` and `ProjectionLogger` first.
- 8-post: comment and description residue, the per-object gates in
`security-plugin.ts` and `delegated-admin-gate.ts`, and
`SYSTEM_ROW_PROVENANCE`.
- C7b: the CLI organization-ownership inventory, `auto-org-admin-grant`
`resolvePermissionSetIdsForName`, the grant-name backfill and the by-id
uninstall leg.
- The docs sweep: the hand-written `content/docs` pages and ADRs that
name the objects, including `system-context.mdx` row 55b's data-door
clause.
- `18.0.0-next.0`'s CHANGELOG entry for the walled refusal names a
data-door `403` on the three objects. That is true of `next.0`, and this
diff's changeset records the move to `404` for the next release. The
ADR-0087 entry `walled-catalog-tenant-writes-retired` promised that
data-door `403` in its `surface` and `acceptanceCriteria` for the v18
upgrade guide. This diff corrects both clauses (`d9f53a69e5`), so the
guide states the `404` after stage 8.
- `lint/src/validate-capability-references.seed-row.test.ts` pins new
behaviour that cannot pass on `main` before this lands, so it rides here
rather than in S8-T.
- The objectui pin `1fb1ced362` has the `metadata/:type` catalog route
with `?scope=environment`. It imports none of the removed exports
(`SystemObjectName.POSITION` / `PERMISSION_SET`,
`SysPositionDetailPage`, `isRowActive`); its `sys_permission_set` string
checks become dead branches, not build breaks.
## 维护者速读(草稿)
**改了什么**
- 岗位、权限集、权限集-岗位绑定、能力这四张“目录行对象”不再注册。对应的数据接口、REST 路由和 Setup
里的对象页面随之下线。数据表和行都保留,留给之后的组织归属迁移处理。
- 权限集保存后不再写行镜像,由元数据门直接写入安全目录。两个数据门回写、一次性岗位补数,以及多租户下数据门那一半的目录写入拒绝都已摘除。
- 首位平台管理员的提升不再读取目录行。
- 卸载包时只按包声明的权限集名称撤销授权,不再读写目录行。
**为什么改**
- ADR-0131 D3
规定岗位、权限集、能力只有一个归宿,就是安全目录(环境注册表)。行对象只是镜像,没有任何授权逻辑读取它,留着只会形成“声明了但不兑现”的第二套入口,AI
和人都容易写错地方。
- 这是 C3 第 8 阶段,前置的 D(#22900)和测试半边 S8-T(#22962)先落地。
**风险与代价(含回滚)**
- 破坏性变更:直接调用 `/api/v1/data/sys_permission_set` 等四个对象接口的客户端会收到
404。changeset 写明了 FROM → TO 迁移:改用
`/api/v1/meta/permission|position|capability` 和克隆接口。
- 多租户隔离部署下,目录写入的拒绝仍在 `/meta`、克隆门和包门生效。数据门那一半随对象一起消失,统一答 404。
- 不删表、不删数据:改的是代码、测试、生成物、一份 v18 迁移条目,以及 ADR-0086 的一行锚点。回滚就是 revert 本
PR,无数据迁移需要回退。
- 规模:70 余个文件,删除为主(对象定义、生成的翻译,以及随门一起删除的一份测试),超过 3000 行;另外改了 ADR-0086
的一行锚点,`docs/adr/**` 属受管路径。按规模和路径都属 Tier H。
**席位意见**
**你要做的**
- 本 PR 超过 3000 行,且碰了受管路径 `docs/adr/**`,需要你批准后由席位落地。批准前席位会附上合约复核结论。
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 99e944d commit 66949b7
75 files changed
Lines changed: 456 additions & 3352 deletions
File tree
- .changeset
- content/docs
- permissions
- references
- security
- system
- docs
- adr
- audits
- qa/platform-checklist
- areas
- examples/app-showcase
- src
- security
- packages
- cli/src/utils
- core/src/security
- lint/src
- metadata-protocol/src
- objectql/src/tenancy
- platform-objects/src
- apps/translations
- pages
- plugins
- plugin-security
- scripts
- src
- objects
- translations
- plugin-sharing/src
- services/service-settings/src
- manifests
- translations
- spec/src
- migrations/entries/semantic
- security
- system
- constants
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| 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 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2560 | 2560 | | |
2561 | 2561 | | |
2562 | 2562 | | |
2563 | | - | |
2564 | | - | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
2565 | 2566 | | |
2566 | 2567 | | |
2567 | 2568 | | |
| |||
2646 | 2647 | | |
2647 | 2648 | | |
2648 | 2649 | | |
2649 | | - | |
| 2650 | + | |
2650 | 2651 | | |
2651 | 2652 | | |
2652 | 2653 | | |
| |||
2656 | 2657 | | |
2657 | 2658 | | |
2658 | 2659 | | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
2659 | 2666 | | |
2660 | 2667 | | |
2661 | 2668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 202 | | |
223 | 203 | | |
224 | 204 | | |
| |||
0 commit comments