Skip to content

Commit 601832b

Browse files
refactor(core): serve the unreact and personal-view doors from one own-row delete door (#29757)
<!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ873kbFcJFx4LxoFFBNwCohp)_ Fixes #29636 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:撤销表情(`DELETE /api/v1/comments/reactions/:id`)和删除个人视图(`DELETE /api/v1/personal-views/:id`)这两扇"只删自己那一行"的门,原本是两份几乎逐行相同的复制;现在共用 `@objectstack/core` 里的一扇门,两个插件各自只提供对象名、所有者列、路由和回答用词。另附三处注释/测试:系统身份跳过也放行提权的应用自动化、`manifest.ts` 的过时注释、偏好"替别人建"的 REST 对照测试。 - 为什么改:这段安全顺序(以调用者身份读行→404,核对所有者→403,再以系统身份删除并记到调用者名下)只要两份就会改一处漏一处;合一后只有一个地方要审。 - 风险与回滚:纯搬移,任何一扇门的回答都不变(下面有 17 种请求的前后逐字节对比)。回滚即 revert 本 PR。 - 先看:`packages/core/src/security/own-row-delete-routes.ts`(`removeOwnRow` 的第 5、6 步与系统删除的上下文),然后 `packages/plugins/plugin-audit/src/comment-reaction-routes.ts` 与 `packages/plugins/plugin-auth/src/personal-view-routes.ts` 的门描述。 - 两分钟验证:`pnpm --filter @objectstack/plugin-audit exec vitest run src/comment-reaction-routes.test.ts`,预期全绿,其中 "its verdict on the row" 一组钉住 404 / 403 / 200 + 归属。 - 需要你做的:无,席位落地。 ## What changes **One own-row delete door, in `@objectstack/core`.** `packages/core/src/security/own-row-delete-routes.ts` holds the sequence both doors ran, moved without change: resolve the caller through `resolveRequestExecutionContext`, refuse anonymous, a held sign-in and any query parameter, read the row as the caller (`404 RECORD_NOT_FOUND` when it cannot be read), check its owner column (`403 PERMISSION_DENIED` when it names someone else), then remove it under `{ isSystem: true, attributedUserId: caller, tenantId: caller's }` and answer `200 { id, deleted: true }` (a removal that matched nothing is `404`). It exports `registerOwnRowDeleteRoute(http, door, deps)`, `removeOwnRow(engine, door, id, context)` and `ownRowDeleteCallerResolver(sources)`, with the types `OwnRowDeleteDoor`, `OwnRowDeleteWords`, `OwnRowDeleteEngine`, `OwnRowDeleteRoutesDeps` and `OwnRowDeleteCallerSources`. **Each object supplies its part.** An `OwnRowDeleteDoor` names the route, the object, the owner column and the words its answers use: | door | route | object | owner column | words (noun / short / owner) | | :--- | :--- | :--- | :--- | :--- | | unreact (`plugin-audit`) | `/api/v1/comments/reactions/:id` | `sys_comment_reaction` | `created_by` | reaction / reaction / member | | personal view (`plugin-auth`) | `/api/v1/personal-views/:id` | `sys_personal_view` | `user_id` | personal view / view / user | The words rebuild each door's existing sentences exactly, so no refusal text moves. Each plugin keeps its route file, every name it exported (`registerCommentReactionRoutes`, `platformCallerResolver`, `removeOwnCommentReaction`, `CommentReactionEngine`, …, and the personal-view twins, now thin delegations), its route ledger and its conformance test; neither mount site (`audit-plugin.ts`, `auth-plugin.ts`) changes. **Why core.** Both plugins already depend on `@objectstack/core`, `@objectstack/types`, `@objectstack/spec` and `@objectstack/platform-objects`, so no new dependency edge is possible elsewhere. Core is the one that already holds every piece the door composes (`resolveRequestExecutionContext`, the anonymous floor, `evaluateAuthGate`, the API-key and authz-store refusals, `recordNotFoundError`) and already depends on `@objectstack/types` for the envelope writers. `@objectstack/types` could not host it without depending on core (a cycle); spec holds no runtime logic; platform-objects holds object definitions. **Ledgers that follow the move.** - `scripts/check-single-authz-resolver.mjs` `DELEGATORS`: the core door's row (`resolveRequestExecutionContext`) is added, and the two plugin rows now delegate through `ownRowDeleteCallerResolver`; the comment above the map says so. - `scripts/check-route-envelope.mjs` `MODULES`: the core door is declared at `0 / 0 / 0` (every body through `sendOk` / `sendError` / `sendServerFault`), and the two plugin rows stay at zero with their comments updated. - Tenant-audit census regenerated (`node scripts/tenant-audit-census.mjs --write`): the census reads only `packages/plugins` and `packages/services`, so the two elevated deletes, now one call in core, leave it (256 → 254 sites, 146 → 144 decidably elevated). The six hand-written figures on `content/docs/permissions/tenant-audit-census.mdx` follow (57% unchanged). **Comment items carried on the card.** - (a) Census row 26c (`content/docs/permissions/system-context.mdx`) and the `owner-fixed-rule.ts`, `personal-view-hooks.ts` and `user-preference-hooks.ts` docblocks now say the `isSystem` skip also admits app-authored automation elevated to system (a `runAs: 'system'` flow, a hook's `runAs: 'system'` api or `ctx.api.sudo()`, an action body's `ctx.api`), the family `flow-system-identity-write-refusal.ts` names; the rule reads no app-automation elevation mark. - (b) `packages/plugins/plugin-auth/src/manifest.ts`: the stale "default flag" comment on `SysPersonalView` is replaced (the default view is the reader's per-object pin), and `SysUserPreference` gets a comment naming its owner rule. - (c) The `user-preference-hooks.ts` create parenthesis is **kept and pinned**: `[member-create]` in `packages/qa/dogfood/test/user-preference-owner-fixed.dogfood.test.ts`, a member creating a preference in another member's name over REST answers `403 PERMISSION_DENIED` and stores nothing. The docblock names the pin. `.changeset/29636-own-row-delete-door.md`: `@objectstack/core`, `@objectstack/plugin-audit`, `@objectstack/plugin-auth` patch, both declaration lines. ## Why The card (should-fix S3 of contract review 6586971553, plus the comment items of record 6590198210 and S1–S3 of review 6593114814): a security-relevant sequence lived in two hand-copied files, so a fix to one, such as the 404/403 order or the attribution, would silently miss the other. Triage 6591885150 ruled it move-only: no door may answer differently afterwards. ## Tests **Measured first, on main's code.** Commit `c5ec5fbc` adds, before any move, a top-level `describe` to each door's existing shell test (`comment-reaction-routes.test.ts`, `personal-view-routes.test.ts`): a row the caller cannot read answers `404 RECORD_NOT_FOUND` with the read asked as the caller and nothing removed; a row owned by someone else answers `403 PERMISSION_DENIED` and nothing is removed; the owner's row answers `200 { id, deleted: true }`, removed under `{ isSystem: true, attributedUserId, tenantId }` (none without an organization); a row gone between read and removal answers `404`. The personal-view file also pins that the owner is judged on `user_id`, not `created_by`. On `c5ec5fbc`: plugin-audit 2 files 15/15, plugin-auth 3 files 43/43 (VERDICT command-exit 0). **The same pins after the move**, on `3f6d5b6a` with core rebuilt: plugin-audit 15/15, plugin-auth 43/43 (`personal-view-hooks.test.ts`'s engine-level door pins included), VERDICT command-exit 0. **Byte-for-byte answer comparison (one-time, not committed).** A scratch test drove each door's registered handler through 17 requests (authz store outage, resolver fault, two anonymous shapes, held sign-in, query parameter, blank and missing id, no engine, engine fault, unreadable, foreign, own with and without an organization, vanished as `0` and `false`, a `409` from the delete) and recorded status, full body, and the engine's `findOne` / `delete` arguments. Before (`c5ec5fbc`) and after (`3f6d5b6a`) are identical: unreact sha256 `350545f0…b628a6`, personal view `e7322879…65a435`, `cmp` clean for both. **Through the real stack, at the head:** `personal-view-row-scope.dogfood.test.ts` and `user-preference-owner-fixed.dogfood.test.ts` 2 files 24/24 (the new `[member-create]` included); plugin-security `comment-reaction-unreact-door.integration.test.ts` 8/8. **Package suites, at the head:** `pnpm --filter @objectstack/plugin-audit test` 68 files 1114/1114; `pnpm --filter @objectstack/plugin-auth test` 216 files 3708 passed, 10 skipped; `pnpm --filter @objectstack/core test` 132 files 2934/2934 (VERDICT command-exit 0). `pnpm typecheck` for core, plugin-audit and plugin-auth: exit 0. ## Acceptance notes - The tenant-audit census no longer lists the two elevated deletes, because `SURFACE_ROOTS` does not read `packages/core`. Nothing about the write changed (same object, same elevated, tenant-carrying context); widening the census to core is the census's own question. - `removeOwnRow` throws `removeOwnRow(OBJECT): the caller context names no user` where each copy named its own function. That error is unreachable through the door (step 2 refuses first) and reaches only the fault log of a direct caller. - The plugin route files keep their exported names as thin delegations so no import site, test or mount moves; a later card can retire them if nobody outside the package needs them. ## Verification Head `c15745df`. Every gate reading below was taken on `0cfd9309` or later; the derived family set re-derived on `c15745df` is identical (116 families), and the families reading the files changed after `0cfd9309` (the census page, row 26c) were re-run on `c15745df`. <details><summary>Derived gates</summary> - Prerequisite builds under the lock: the plugin-audit and plugin-auth closures, the dogfood and plugin-security closures (VERDICT command-exit 0, 7m19s), the client-react closure for `check:skill-examples` (VERDICT command-exit 0). - `node scripts/pm/dispatch-gates.mjs --commands`: 116 families (17 paths vs merge base `0822122fd`, +627/-529, under the 3000 human-merge threshold). Each run once with its exit captured before any pipe: 115 exit 0. - One real finding on the first pass, fixed: `check:system-context-census` exit 1, `[unresolved-path]` on row 26c's bare `flow-system-identity-write-refusal.ts`; the row now cites the full path (`c15745df`), and the gate exits 0. - Two prerequisite refusals on the first pass, re-run after the prerequisite: `check-plugin-teardown-shape.mjs --self-test` (exit 3 until its pinned fixture commit was fetched, then 0, 48 cases); `check:skill-examples` (exit 3 until the client SDK was built, then 0, 283 examples). - `pnpm check:dual-build-cjs-loads`: exit 3, PREREQUISITE NOT MET (most workspace packages unbuilt in this container). NOT MEASURED locally; CI runs it on a full build. - `dispatch-gates --ran`: 116 derived, 115 run, 1 NOT-MEASURED (dual-build, from its recorded exit 3), 0 UNRUN. - `pnpm lint` (repo-wide eslint): exit 0. - No ablation: no tested behaviour changed (the move is pinned as unchanged, and the one new pin, `[member-create]`, is a control on behaviour that already existed). </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: not touched. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. --- _Generated by [Claude Code](https://claude.ai/code/session_01JQwxbWMy2AkJ9oN4WfpecN)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 946a173 commit 601832b

17 files changed

Lines changed: 627 additions & 529 deletions
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/core': patch
3+
'@objectstack/plugin-audit': patch
4+
'@objectstack/plugin-auth': patch
5+
---
6+
7+
refactor(core): the unreact door and the personal-view delete door are served by one own-row delete door
8+
9+
Clause-②: no
10+
Metadata-protocol: none
11+
12+
A move with no change in what either door answers. `DELETE /api/v1/comments/reactions/:id` (`@objectstack/plugin-audit`) and `DELETE /api/v1/personal-views/:id` (`@objectstack/plugin-auth`) were two hand-copied spellings of one sequence: resolve the caller, refuse anonymous, a held sign-in and any query parameter, read the row as the caller (`404` when it cannot be read), check its owner column (`403` when it names someone else), then remove it as the system, attributed to the caller and inside the caller's organization. That sequence now lives once, in `@objectstack/core`:
13+
14+
- `registerOwnRowDeleteRoute(http, door, deps)` mounts the door for one object; `door` (`OwnRowDeleteDoor`) names the route, the object, the owner column and the words its answers use.
15+
- `removeOwnRow(engine, door, id, context)` is the read, the owner check and the attributed system removal on their own.
16+
- `ownRowDeleteCallerResolver(sources)` is the door's caller resolution over `resolveRequestExecutionContext`.
17+
18+
Each plugin keeps its route, its route ledger and its existing exports. Nothing to migrate.

‎content/docs/permissions/system-context.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ bugs — it is the protection or the side effect that silently does not happen.
143143
| 25 | Engine-owned / append-only write guard bypassed | plugin-security | Get: generic writes to `managedBy` engine-owned objects | `packages/plugins/plugin-security/src/system-write-guard.ts#isUserContextWrite`, `packages/plugins/plugin-security/src/system-write-guard.ts#assertEngineOwnedWriteAllowed` |
144144
| 26 | Identity write guard bypassed (ADR-0092) | plugin-auth | Get: direct writes to identity tables through the generic data path | `packages/plugins/plugin-auth/src/identity-write-guard.ts#isUserContextWrite` |
145145
| 26b | API key restore guard does not refuse | plugin-auth | Get: a write setting `revoked: false` on a `sys_api_key` row an administrator's forced password reset revoked is admitted without the platform-administrator check a user-context restore must pass; the reason is still cleared. Lose: nothing a caller reaches: no system writer restores a key, and the mint, the last-used stamp and the forced reset itself never set `revoked: false` | `packages/plugins/plugin-auth/src/api-key-restore-guard.ts#isUserContextWrite` |
146-
| 26c | **Per-user owner rule does not refuse** — a `sys_personal_view` or `sys_user_preference` update that changes `user_id` is admitted | plugin-auth | Get: a system writer can move a personal view or a preference to another owner (no shipped system writer does). Lose: nothing a caller reaches. A non-system update whose `user_id` differs from the stored owner is refused `403 PERMISSION_DENIED`, for every caller, a platform administrator included; an echo of the stored owner is no change. One shared check holds it for both objects. The rule exists because, for an organization member, `member_default`'s `'*'` update floor (`created_by == current_user.id`) applies to an update beside the object's own row scope | `packages/plugins/plugin-auth/src/owner-fixed-rule.ts#isOwnerChange` |
146+
| 26c | **Per-user owner rule does not refuse** — a `sys_personal_view` or `sys_user_preference` update that changes `user_id` is admitted | plugin-auth | Get: a system writer can move a personal view or a preference to another owner (no shipped system writer does). The system writer includes app-authored automation elevated to system (a `runAs: 'system'` flow, a hook's `runAs: 'system'` api or `ctx.api.sudo()`, an action body's `ctx.api`), the family `packages/plugins/plugin-security/src/flow-system-identity-write-refusal.ts` names, so an app's automation can move one; the rule reads no app-automation elevation mark. Lose: nothing a caller reaches. A non-system update whose `user_id` differs from the stored owner is refused `403 PERMISSION_DENIED`, for every caller, a platform administrator included; an echo of the stored owner is no change. One shared check holds it for both objects. The rule exists because, for an organization member, `member_default`'s `'*'` update floor (`created_by == current_user.id`) applies to an update beside the object's own row scope | `packages/plugins/plugin-auth/src/owner-fixed-rule.ts#isOwnerChange` |
147147
| 27 | Search-companion column **kept** in a read's rows when it was explicitly requested | objectql | Get: the internal companion column is readable. Lose: nothing for app code — this is the engine reading its own index | `stripSearchCompanionFromRead` |
148148
| 28 | Dependent-count disclosure on a blocked delete | objectql | Get: the count of blocking children. Nothing was elevated past the caller, so nothing is withheld | `dependentCountIsDisclosable` |
149149
| 29 | Reference-cleanup log attributes the write to `'system'` | objectql | Get: an honest actor label instead of `anonymous` when the context carries neither `userId` nor `actor` | `recordReferenceCheckElevation` |

‎content/docs/permissions/tenant-audit-census.mdx‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ are reported as `undecidable` rather than assumed either way.
132132

133133
The same holds twice over for the context. An options argument spelled as a
134134
literal can be read; one spelled `options`, `{ ...opts }`, or handed through a
135-
forwarding shim cannot, and **55 of the 261 sites are spelled that way**. A
135+
forwarding shim cannot, and **55 of the 259 sites are spelled that way**. A
136136
context resolved from an inline literal or a local `const` can be tested for
137137
`isSystem`; one arriving from a helper call cannot.
138138

@@ -197,10 +197,10 @@ reproduce them. Where it disagrees, it disagrees on the page:
197197

198198
| carried figure | where it survives | this census |
199199
| :--- | :--- | ---: |
200-
| 175 write call sites | quoted in the merged changeset | **261** |
200+
| 175 write call sites | quoted in the merged changeset | **259** |
201201
| 24 carrying no tenant context | quoted in the merged changeset | **2** provable and tenancy-enabled; **29** more whose options argument is unreadable |
202-
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **182 of 261** decidable, **79** undecidable |
203-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 146 decidably elevated, 0 decidably not, 107 undecidable |
202+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **182 of 259** decidable, **77** undecidable |
203+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 144 decidably elevated, 0 decidably not, 107 undecidable |
204204
| 141 and 132, two independent re-derivations | the card that filed this work | — |
205205

206206
**The differences are not reconciled, and deliberately so.** The old census's
@@ -217,11 +217,11 @@ would report a smaller number and would not say so.
217217

218218
The fourth row is the one worth flagging to anyone citing it. **The 135 / 77%
219219
figure has no surviving corroboration anywhere in the tree.** This census reads
220-
146 of 261 (56%) as decidably elevated, with 107 more whose elevation is a
220+
144 of 259 (56%) as decidably elevated, with 107 more whose elevation is a
221221
run-time fact — so the claim is neither confirmed nor refuted, and the honest
222222
answer is that a static reading cannot settle it.
223223

224-
⇒ **Cite `2 / 261`, and say what it is**: the sites whose options argument was
224+
⇒ **Cite `2 / 259`, and say what it is**: the sites whose options argument was
225225
READ and holds no tenant context, against a decidably tenancy-enabled object.
226226
That is the control's provable yield surface. ⛔ Do not cite it as "the sites
227227
without tenant context" — **29 further sites** have an options argument this
@@ -233,31 +233,31 @@ cannot read, and they are neither in nor out.
233233

234234
| what | count |
235235
| :--- | ---: |
236-
| write call sites on the application surface | **261** |
236+
| write call sites on the application surface | **259** |
237237
| …whose object name is statically decidable | 182 |
238-
| …whose object name is chosen at run time | 79 |
238+
| …whose object name is chosen at run time | 77 |
239239
| …against an object with tenancy ENABLED | 176 |
240240
| …against an object that declares tenancy off | 6 |
241-
| threading a tenant context | 198 |
241+
| threading a tenant context | 196 |
242242
| PROVABLY carrying none (options read, no context key) | **8** |
243243
| …of those, against a decidably tenancy-enabled object | **2** |
244244
| options argument UNREADABLE — may or may not carry one | 55 |
245245
| …of those, against a decidably tenancy-enabled object | 29 |
246-
| threading a decidably ELEVATED (`isSystem`) context | 146 |
246+
| threading a decidably ELEVATED (`isSystem`) context | 144 |
247247
| threading a context that is decidably NOT elevated | 0 |
248248
| threading a context whose elevation is a run-time fact | 107 |
249249

250250
| how the instrument reached the site | count |
251251
| :--- | ---: |
252-
| receiver carried a readable engine type | 199 |
252+
| receiver carried a readable engine type | 197 |
253253
| receiver erased, placed by the object NAME | 52 |
254254
| receiver erased, placed by an `object: string` PARAMETER | 5 |
255255
| receiver erased, placed by an `UNTYPED_RECEIVERS` row | 5 |
256256

257257
| object name spelled inline | 116 |
258258
| object name spelled through a `const` | 66 |
259259
| object name is an `object: string` parameter | 7 |
260-
| object name is some other run-time expression | 72 |
260+
| object name is some other run-time expression | 70 |
261261

262262
### Subtractions the census could NOT defend — enforced
263263

@@ -307,13 +307,13 @@ holds still. They are required to be HERE and to say WHEN they were true;
307307
their values are not compared. The reasoning, and the measurement behind it,
308308
are in `scripts/check-tenant-audit-census.mjs`.
309309

310-
Measured on 2026-11-02 at `187d77e7f`.
310+
Measured on 2026-11-03 at `1c86b45c5`.
311311

312312
| corpus scale (not enforced) | count |
313313
| :--- | ---: |
314-
| tracked non-test sources scanned | 854 |
315-
| engine-shaped types recognised | 101 |
314+
| tracked non-test sources scanned | 856 |
315+
| engine-shaped types recognised | 103 |
316316
| declared objects in the registry | 126 |
317-
| same-named calls subtracted as non-engine | 228 |
317+
| same-named calls subtracted as non-engine | 226 |
318318

319319
{/* END GENERATED: tenant-audit-census */}

‎docs/audits/2026-08-tenant-audit-write-call-sites.counts.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ silent, and `node scripts/tenant-audit-census.mjs --write` is the resolution.
3333

3434
| Measure | Value |
3535
|---|---:|
36-
| Write call sites | 261 |
36+
| Write call sites | 259 |
3737
| Object name statically decidable | 182 |
38-
| Object name chosen at run time | 79 |
38+
| Object name chosen at run time | 77 |
3939
| Against a tenancy-enabled object | 176 |
4040
| Against an object declaring tenancy off | 6 |
41-
| Threading a tenant context | 198 |
41+
| Threading a tenant context | 196 |
4242
| Provably carrying none | 8 |
4343
| …and decidably tenancy-enabled | 2 |
4444
| Options argument unreadable | 55 |
4545
| …and decidably tenancy-enabled | 29 |
46-
| Threading a decidably elevated context | 146 |
46+
| Threading a decidably elevated context | 144 |
4747
| Threading a decidably non-elevated context | 0 |
4848
| Threading a context of undecidable elevation | 107 |
4949

@@ -90,14 +90,14 @@ holds still. They are required to be HERE and to say WHEN they were true;
9090
their values are not compared. The reasoning, and the measurement behind it,
9191
are in `scripts/check-tenant-audit-census.mjs`.
9292

93-
Measured on 2026-11-02 at `187d77e7f`.
93+
Measured on 2026-11-03 at `1c86b45c5`.
9494

9595
| corpus scale (not enforced) | count |
9696
| :--- | ---: |
97-
| tracked non-test sources scanned | 854 |
98-
| engine-shaped types recognised | 101 |
97+
| tracked non-test sources scanned | 856 |
98+
| engine-shaped types recognised | 103 |
9999
| declared objects in the registry | 126 |
100-
| same-named calls subtracted as non-engine | 228 |
100+
| same-named calls subtracted as non-engine | 226 |
101101

102102
## Every site
103103

@@ -120,7 +120,6 @@ Measured on 2026-11-02 at `187d77e7f`.
120120
| `packages/plugins/plugin-audit/src/activity-changed-fields-backfill.ts` | `update` | `sys_activity` | enabled | elevated | 1 |
121121
| `packages/plugins/plugin-audit/src/auth-event-audit.ts` | `insert` | `sys_audit_log` | enabled | options unreadable | 1 |
122122
| `packages/plugins/plugin-audit/src/comment-parent-pair-backfill.ts` | `update` | `sys_comment` | enabled | elevated | 1 |
123-
| `packages/plugins/plugin-audit/src/comment-reaction-routes.ts` | `delete` | `COMMENT_REACTION_OBJECT` | undecidable | elevated | 1 |
124123
| `packages/plugins/plugin-audit/src/mail-log-body-migration.ts` | `update` | `object` | undecidable | elevated | 1 |
125124
| `packages/plugins/plugin-audit/src/mail-log-body-migration.ts` | `update` | `object` | undecidable | options unreadable | 1 |
126125
| `packages/plugins/plugin-audit/src/read-audit.ts` | `insert` | `sys_audit_log` | enabled | options unreadable | 1 |
@@ -166,7 +165,6 @@ Measured on 2026-11-02 at `187d77e7f`.
166165
| `packages/plugins/plugin-auth/src/organization-delete.ts` | `delete` | `sys_team` | enabled | elevated | 1 |
167166
| `packages/plugins/plugin-auth/src/organization-delete.ts` | `delete` | `sys_team_member` | enabled | elevated | 1 |
168167
| `packages/plugins/plugin-auth/src/organization-delete.ts` | `delete` | `sys_user_permission_set` | enabled | elevated | 1 |
169-
| `packages/plugins/plugin-auth/src/personal-view-routes.ts` | `delete` | `PERSONAL_VIEW_OBJECT` | undecidable | elevated | 1 |
170168
| `packages/plugins/plugin-auth/src/reconcile-membership.ts` | `insert` | `sys_member` | enabled | context, elevation undecidable | 1 |
171169
| `packages/plugins/plugin-auth/src/scim-connection-service.ts` | `insert` | `sys_scim_connection_credential` | enabled | PROVABLY NONE | 1 |
172170
| `packages/plugins/plugin-auth/src/session-tombstone.ts` | `update` | `objectName` | undecidable | options unreadable | 1 |

‎packages/core/src/security/index.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,20 @@ export {
201201
type RequestAdmission,
202202
} from './request-execution-context.js';
203203

204+
// The ONE own-row delete door (`DELETE <route>` removes one row, only the
205+
// caller's own): read as the caller, check the owner column, remove as the
206+
// system attributed to the caller. Each object supplies its door descriptor.
207+
export {
208+
ownRowDeleteCallerResolver,
209+
registerOwnRowDeleteRoute,
210+
removeOwnRow,
211+
type OwnRowDeleteCallerSources,
212+
type OwnRowDeleteDoor,
213+
type OwnRowDeleteEngine,
214+
type OwnRowDeleteRoutesDeps,
215+
type OwnRowDeleteWords,
216+
} from './own-row-delete-routes.js';
217+
204218
// [commit 6a180e42d] The LOUD failure an unreachable permission store raises, and the
205219
// brand predicate a fail-closed `catch` uses to re-raise it instead of
206220
// degrading an outage into a capability denial. Ruled 2026-08-30.

0 commit comments

Comments
 (0)