Skip to content

Commit 990341a

Browse files
feat(plugin-security): the boot writes no sys_position row — delete the built-in and declared position seeders and the everyone baseline junction writer (ADR-0131 D2, #15204 stage 6a) (#22793)
Part of #15204 (ADR-0131 cutover, stage 6a). This PR deletes the built-in and declared position seeders and the `everyone` baseline junction writer. The card stays open for the remaining stages. Clause-②: no **Size:** 36 files, +443 / −2,045 (2,488 changed lines) against `main` at `b7cd1af9df`. That is under the 3,000 line. **Landing:** this PR stays a draft until stage 5 (C9) lands, per order correction 3 of the stage-0 record on #15204. Setup's position pickers still read rows, so on a fresh database they would list no built-in position. ## What is deleted - `plugin-security/src/bootstrap-builtin-positions.ts` (`bootstrapBuiltinRoles`, 166 lines) - `plugin-security/src/bootstrap-declared-positions.ts` (`bootstrapDeclaredPositions`, 391 lines), with its test file (410 lines) - In `security-plugin.ts`: - the `seedCatalogPositions`, `seedCatalogBuiltins` and `bindBaselineToEveryone` closures; - their calls in the boot sweep and in the organization-creation hook; - the two imports, and the `resolveOwnOrganizationRow` / `seedCtx` imports that only they used. - `seedCatalogForOrganization` now runs the one catalog step left (the permission-set seeder, which 6b-2 retires). - `isBuiltinPositionName` in `builtin-positions.ts`. Its only caller was the deleted declared-positions seeder's exclusion. `per-organization-catalog.ts` is untouched: 6a never imported it directly, and 6c retires it. `bootstrap-platform-admin.ts` imported nothing from the deleted modules (measured: no import, two comments only), so there is no seam with 6b-2. ## Why no grant moves Since stage 1 the resolver reads position definitions: - `everyone`'s baseline is the anchor's declared `permissionSets`. `declareEveryoneBaseline` registers it at `kernel:ready`. - The set list is `this.baselinePermissionSets`, which is the app's default set composed with `member_default`. - It is filtered by `describeHighPrivilegeBits` against the same declared-capability context `bindBaselineToEveryone` used. So the junction rows this PR stops writing granted nothing. Measured: - `builtin-positions.boot.test.ts` boots the real plugin over SQLite in 3 postures × 4 variants, including a new **existing database** variant that holds the rows the retired seeders wrote. - Every principal's grant envelope equals the unchanged golden: platform admin, organization admin, member and agent, fresh and existing. - **Zero-write census:** no `sys_position` row and no ledger write in any variant. An existing database keeps exactly the rows it had. - **Positive control:** one organization-authored create reads back as exactly one row. - `security-plugin.test.ts`: the `everyone` definition names the app set when its token is declared, and does not when the token is undeclared or names a platform capability. No junction row is written for either token. - dogfood `declared-position-provenance`: a real showcase boot writes no position row, and a cold boot of an existing database re-stamps, refreshes and adds nothing. - The resolver's batch-equivalence golden (`resolve-authz-context.batch-equivalence.golden.json`) is not touched. ## Tests Every test that imported a deleted module or pinned a deleted row: | file | disposition | |:--|:--| | `bootstrap-declared-positions.test.ts` | deleted with its module | | `audience-anchors.test.ts` | 3 seeding cases deleted; predicate cases kept | | `bootstrap-seed-round-trips.test.ts` | 5 position cases deleted; permission-set cases kept | | `builtin-positions.boot.test.ts` | rewritten: zero-row census + ledger with a positive control; new existing-database variant; grant golden unchanged; built-in-row refusals read on the existing database; the door-authored-rows case deleted | | `builtin-positions.test.ts` | `isBuiltinPositionName` case deleted with the function | | `catalog-reference-report.test.ts` | precondition rewritten: the built-in copies are staged as existing-database rows | | `objects/reserved-identity-names.test.ts` | platform-seed case rewritten as a direct `platform`-provenance write; the exemption stays until stage 8 retires the object | | `per-organization-catalog.test.ts` | rewritten onto the permission-set seeder; case 1 adds the zero-position census; case 6 stages the `everyone` rows | | `security-plugin.test.ts` | the #18535 junction cases rewritten onto the definition; a no-junction-row case added | | `seed-write-refusal.test.ts` | 8 seeder-driven cases deleted; the redaction canary (#8682) rewritten at the accumulator | | dogfood `showcase-declarative-rbac-seeding` | positions read through the security catalog; the re-seed case deleted | | dogfood `declared-position-provenance` | rewritten: the gate legs run on staged existing-database rows; the fresh boot writes no row; a cold boot re-stamps, refreshes and adds nothing | | dogfood `me-apps-and-everyone-baseline`, `showcase-d7-default-profile` | the baseline is read off the `everyone` definition; no row is written | | dogfood `showcase-invoice-seed-isolation` | the position route rides the `contributor` declaration; no row or junction row is written | | dogfood `showcase-permission-zoo` | the junction-gate cases stage the row an existing database holds | | dogfood `position-held-name-setup-create` | the precondition expects no seeded row | ## Docs and ledgers - Docs: `authorization.mdx` (the declared-positions bullet and the lifecycle row), `positions.mdx`, `permission-metadata.mdx`, `system-context.mdx` (rows 11b and 23b), and `tenant-audit-census.mdx`. The census is regenerated (238 → 233 write sites: the 5 deleted writes) and its prose figures are updated. - Code comments: TSDoc that named the seeders in `builtin-positions.ts`, `reserved-identity-names.ts`, `position-catalog-refusal.ts`, `suggested-audience-bindings.ts` and `bootstrap-platform-admin.ts`. - Ledgers: `engine-double-contract.baseline.json`, `engine-double-contract.pinned.json` and `objectql-double-limit.baseline.json` drop the doubles that went with the deleted cases. - Not touched: `content/docs/releases/` and any `packages/spec/src` path. 6b-1c, now on `main`, already rewrote `high-privilege.ts`'s sentence naming `bindBaselineToEveryone`. ## Open question for the seat: the audience-binding suggestion confirm _Settled: the seat answered A in 6106681412 (no change in 6a). The confirm went to decision card #22801, ruled A (6108478638), and stage U2 builds it._ Measured on a real showcase boot of this head, with the app default CLI-wired: - `showcase_member_default` is a **pending** `everyone` suggestion. - The database holds no `everyone` row and no junction row. - `confirmAudienceBindingSuggestion` needs the `everyone` row, so a confirm on a fresh database answers `SuggestionStateError` ("not seeded yet"). On `main`, by reading the code (this before-leg was NOT MEASURED in that wiring): - the boot's junction row made the reconcile record the suggestion as `confirmed` (observed); - a confirm of any other pending suggestion wrote a junction row that grants nothing. In the default wiring both trees measured `pending`. This is the suggestion-confirm path that release-cut condition (d) of the stage-1 ACCEPT already holds out of every release. No fix is built here (only delete; U2 belongs to its own stage). The report on #15204 carries the options. ## Acceptance notes - Four test comments still describe rows the retired seeder wrote: `driver-sql` `sql-driver-sys-position-organization-unique.test.ts:310`, `bootstrap-platform-admin-seeded-provenance.test.ts:204`, `objects/sys-position.organization-unique.test.ts:44` and `suggested-audience-bindings-install-path.test.ts:139`. Each reads as history of an existing database's rows. Not edited. - Retired modules are not edited, so their comments still name the deleted seeders: `objects/sys-position.object.ts` (stage 8), `seed-name-lookup.ts` (7a), `bootstrap-declared-permissions.ts` (6b-2) and `position-write-through.ts` (7b). - `scripts/measure-position-name-fold-census.mjs` still models `bindBaselineToEveryone` as a junction producer. It is a measurement instrument whose question (name-fold vs junction) ADR-0131 retires. Carrier: none. ## Gates Derived with `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at head `ac2d982b` (merge base `b7cd1af9df`). Each command was run with its exit code recorded, and the record was reconciled with `--ran`: **105 derived, 104 run, 1 NOT MEASURED, 0 unrun**. - 104 commands exited 0. - **NOT MEASURED:** `check-plugin-teardown-shape --self-test` exited 3. A shallow clone cannot reach its pinned fixture commit, as on the sibling stages. Suites on the merged head `ac2d982b`, each after a dependency-closure build (plugin-auth and the example apps were measured at `68ba543e` and not re-run on `ac2d982b`; CI runs them): | package | files | tests | |:--|--:|:--| | `@objectstack/plugin-security` (typecheck + suite) | 197 | 4,005 passed, 45 skipped | | `@objectstack/plugin-auth` | 136 | 2,769 passed, 10 skipped | | `@objectstack/runtime` | 352 | 5,789 passed, 19 skipped | | `@objectstack/dogfood` | 246 (+1 skipped) | 1,994 passed, 9 skipped | | example apps: showcase / crm / todo / embed-objectql | 33 / 6 / 7 / 1 | 409 / 46 / 238 / 2 passed | Before-leg of the deletion: with the deletion in place and only the five importing test files fixed, the full plugin-security suite was red, with 22 failures in 3 files (the boot census, the catalog report's built-in precondition, and the #18535 junction cases). The first dogfood run was red too, with 15 failures in 6 files. Every one of them pinned a row the deleted seeders wrote. CI was not awaited. _Seat edits at landing round 1 (`ac2d982b`, a merge of `main` `b7cd1af9df` plus the census regeneration): the size base, the census figures, the gate head and the suite rows above, from the dev's report 6108751935. Lines 1–2 are unchanged._ --- _Generated by [Claude Code](https://claude.ai/code/session_01YLbobfnaoKFrxZcQZT8rYP)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent efcbac7 commit 990341a

36 files changed

Lines changed: 443 additions & 2045 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@objectstack/plugin-security': minor
3+
---
4+
5+
feat(plugin-security): the boot no longer writes `sys_position` rows — the built-in and declared position seeders and the `everyone` baseline junction writer are deleted
6+
7+
Clause-②: no
8+
9+
`SecurityPlugin` no longer seeds a `sys_position` row for the six built-in positions (`platform_admin`, `org_owner`, `org_admin`, `org_member`, `everyone`, `guest`) or for a position a stack declares, and no longer writes a `sys_position_permission_set` row binding the baseline sets to `everyone`. Positions are served by the security catalog (ADR-0131 D2): the built-ins are this plugin's declarations, a stack's positions are registry items, and `everyone`'s baseline — the app's default set and `member_default`, minus any set the high-privilege check refuses — is that anchor's declared `permissionSets`. `GET /api/v1/meta/position` lists all of them, and assigning a declared position needs no row.
10+
11+
No authorization decision changes: since the resolver reads position definitions, no grant reads a `sys_position` or `sys_position_permission_set` row, and a fresh database and an existing one grant every principal the same. On a database that was already seeded, the existing rows stay as they are; they are no longer refreshed at boot.
12+
13+
FROM → TO:
14+
15+
- FROM reading the built-in or declared positions from `sys_position` → TO the security catalog read (`createSecurityCatalogReader`) or `GET /api/v1/meta/position`.
16+
- FROM the `everyone` → baseline `sys_position_permission_set` rows → TO the `everyone` definition's `permissionSets`.

‎content/docs/permissions/authorization.mdx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,11 @@ package (metadata); subject bindings and env-specific values stay as config.**
164164
env-admin-only construct.
165165
- This is what makes package **uninstall** well-defined (drop the package's
166166
own sets) and the objectui Access matrix scopable to `{ packageId }`.
167-
- Declared positions and sharing rules seed the same way
168-
(`bootstrapDeclaredPositions`, ADR-0057 D6) — a declarable-but-never-seeded
169-
array is exactly the inert-metadata smell ADR-0078 prohibits.
167+
- Declared sharing rules seed the same way (ADR-0057 D6) — a
168+
declarable-but-never-seeded array is exactly the inert-metadata smell
169+
ADR-0078 prohibits. Declared positions need no row at all: the security
170+
catalog serves them from the registry, and no boot step writes a
171+
`sys_position` row (ADR-0131 D2).
170172

171173
### Package capability declaration (ADR-0066 D1)
172174

@@ -272,7 +274,7 @@ one of two doors, each writing only what it owns:
272274

273275
| Stage | What holds today | Owned by |
274276
|---|---|---|
275-
| 1 · Package development | Zod-validated authoring; positions / sharingRules / permissions seeded at boot with provenance | ADR-0057 D6, ADR-0086 D5, ADR-0049/0078 gates |
277+
| 1 · Package development | Zod-validated authoring; sharingRules / permissions seeded at boot with provenance; positions served from the registry, with no row (ADR-0131 D2) | ADR-0057 D6, ADR-0086 D5, ADR-0131 D2, ADR-0049/0078 gates |
276278
| 2 · Distribution / install / upgrade / uninstall | Install-consent scopes (ADR-0025 — consent ≠ RBAC grants); namespaced, collision-free composition; provenance axis makes uninstall well-defined | ADR-0025/0028/0048/0086 |
277279
| 3 · Environment composition / assignment | Platform-owned assignment records (`sys_user_position` etc.); anti-escalation; union semantics | ADR-0057 D4 |
278280
| 4 · Runtime enforcement | The six-gate chain above; each enforced primitive holds a row naming its enforcement site — the matrix file is the authority on the count and on which rows CI can check | ADR-0056 D10 matrix |

‎content/docs/permissions/permission-metadata.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ The built-in context variables available in RLS `using`/`check` clauses include
220220
(ADR-0068). `positions` is a **string array** — the canonical assignment field
221221
(D3 reserves the word "role"; there is no `current_user.roles`) — so test
222222
membership with CEL: `'org_admin' in current_user.positions` or
223-
`current_user.positions.exists(p, p == 'sales_manager')`. The framework-seeded
223+
`current_user.positions.exists(p, p == 'sales_manager')`. The framework-declared
224224
built-in position names are `platform_admin`, `org_owner`, `org_admin`, and
225225
`org_member`; `everyone`/`guest` are the implicit audience anchors (ADR-0090 D9).
226226
(`current_user.isPlatformAdmin` is the `PLATFORM_ADMIN` standing of

‎content/docs/permissions/positions.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ including holders of plain CRUD on the table — is denied.
8080
## Built-in identity positions (ADR-0068)
8181

8282
`current_user.positions` is a string array — the only canonical field (there
83-
is no singular `current_user.position` at runtime). Framework-seeded names:
83+
is no singular `current_user.position` at runtime). The built-in names are
84+
declared by the platform — served by the security catalog, with no
85+
`sys_position` row (ADR-0131 D2):
8486

8587
| Position | Meaning |
8688
|:---|:---|

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ that silently does not happen.
109109
| 9b | The master-detail write check the `security` service serves (`checkControlledByParentWrite`, ADR-0055) answers `allow` | plugin-security | Get: `allow` for any record, with no master judged — the write path's own first exit, so a gate composing it admits exactly what the record's own system-context update would. Lose: nothing a caller reaches today: its two consumers, the `sys_attachment` and `sys_comment` parent gates, return before they ask for a system session | `packages/plugins/plugin-security/src/security-plugin.ts#checkControlledByParentWrite` |
110110
| 10 | Anonymous-deny treats the caller as authenticated | core | Get: passes the 401 seam with no `userId` | `packages/core/src/security/anonymous-deny.ts#shouldDenyAnonymous` |
111111
| 11 | Permission-set projection middleware skipped | plugin-security | Lose: projection of permission-set-derived columns | `packages/plugins/plugin-security/src/permission-set-projection.ts#createPermissionSetWriteThrough` |
112-
| 11b | Position write-through skipped — a `sys_position` write is not mirrored into the environment ledger | plugin-security | Get: the seeders and the package door write rows for definitions that already have their home, untouched. Lose: a system-written row has no environment definition, so the security catalog read does not resolve it until a data-door edit, or the one-time row-only position backfill, gives it one | `packages/plugins/plugin-security/src/position-write-through.ts#createPositionWriteThrough` |
112+
| 11b | Position write-through skipped — a `sys_position` write is not mirrored into the environment ledger | plugin-security | Get: the package door writes rows for definitions that already have their home, untouched (no boot seeder writes a `sys_position` row, ADR-0131 D2). Lose: a system-written row has no environment definition, so the security catalog read does not resolve it until a data-door edit, or the one-time row-only position backfill, gives it one | `packages/plugins/plugin-security/src/position-write-through.ts#createPositionWriteThrough` |
113113
| 12 | Session-resolution middleware skipped | plugin-auth | Get: no session lookup attempted | `packages/plugins/plugin-auth/src/auth-plugin.ts#start` |
114114
| 13 | Per-request performance timings disclosed | observability | Get: timing headers a normal caller cannot pull | `packages/observability/src/perf-timing.ts#isPerfDisclosurePrincipal` |
115115
| 15 | MCP stdio bridge skips the object API-exposure gate | mcp | Get: the bridge reaches objects whose `apiEnabled` / `apiMethods` would refuse an external caller | `packages/mcp/src/stdio-data-bridge.ts#enforceApiExposure` |
@@ -128,7 +128,7 @@ that silently does not happen.
128128
| 21b | **`readonly` strip bypassed — the write PREVIEW (`ObjectQL.validate`)** | objectql | Same as 19–21, in the preview: it runs the write's caller-write strips under the write's own gate, so a system preview reports no `readonly` drop and judges the value a system write would store. The `computed` strip of a `formula` value is NOT gated here or on either write verb — no driver has a column for it, so it runs for every caller | `packages/objectql/src/engine.ts#validate` |
129129
| 22 | Strict-drop refusal never fires | objectql | Lose: a caller that opted into loud refusal gets **silence** — strict refuses exactly what the strip would have taken, and the strip took nothing. One exception: a `formula` value, which the `computed` strip takes from every caller, so strict still refuses it | `packages/objectql/src/engine.ts#insert`, `packages/objectql/src/readonly-strict-errors.ts#READONLY_CLASS_REASONS` |
130130
| 23 | **Referential-integrity check skipped** | objectql | Get: writes proceed against unreachable/unresolvable targets. Lose: an `isSystem` caller can write a **dangling reference** | `packages/objectql/src/engine.ts#assertReferencesResolve` |
131-
| 23b | **Position-catalog check skipped** — a `sys_user_position` write whose `position` names no position in the security catalog is not refused | plugin-security | Get: a system writer can store an assignment naming no position — the seed loader writes `stack.data` from `AppPlugin.start()`, before `kernel:ready` seeds the declared position catalog, so a refusal there would fail every authored assignment seed on a fresh boot. Lose: such a row grants nothing and nothing says so. A non-system insert, or a non-system update that changes `position`, is refused `400 VALIDATION_FAILED` / `reference_not_found` instead when the security catalog holds no position of that name: the environment registry (ADR-0131 D3), one per deployment, which takes no organization, so a name only a `sys_position` row carries — any organization's — is refused like one nobody carries. It is the same stand-down as the engine's referential-integrity check for a lookup column | `packages/plugins/plugin-security/src/position-catalog-refusal.ts#assertPositionNamesCatalogRow` |
131+
| 23b | **Position-catalog check skipped** — a `sys_user_position` write whose `position` names no position in the security catalog is not refused | plugin-security | Get: a system writer can store an assignment naming no position — the seed loader writes `stack.data` from `AppPlugin.start()` under a system context, as invitation acceptance and the platform's own bootstraps do. Lose: such a row grants nothing and nothing says so. A non-system insert, or a non-system update that changes `position`, is refused `400 VALIDATION_FAILED` / `reference_not_found` instead when the security catalog holds no position of that name: the environment registry (ADR-0131 D3), one per deployment, which takes no organization, so a name only a `sys_position` row carries — any organization's — is refused like one nobody carries. It is the same stand-down as the engine's referential-integrity check for a lookup column | `packages/plugins/plugin-security/src/position-catalog-refusal.ts#assertPositionNamesCatalogRow` |
132132
| 23c | **Grant-name check relaxed for an unresolvable id** — a `sys_user_permission_set` write that supplies `permission_set` beside a `permission_set_id` naming no set the writer's context reaches keeps the supplied name | plugin-security | Get: a system writer can store a grant naming a set whose row does not exist yet — seed replay and boot provisioning may write the grant before the set row, the ordering the engine's referential-integrity check also stands down for. Lose: such a row's name is unchecked until a backfill names it. Everything else is judged for every caller, system included: the name is derived from the id on every write that carries one, and a supplied name that names any other set is refused `400 VALIDATION_FAILED` / `invalid_value`; a non-system caller's name beside an unresolvable id is refused the same way, read as `{ ...context, isSystem: true }` through the hook's `ctx.api.sudo()`, never a bare `{ isSystem: true }` (ADR-0131 D4) | `packages/plugins/plugin-security/src/grant-permission-set-name.ts#settle` |
133133
| 23d | **Grant-holder membership check skipped** — a `sys_user_position` or `sys_user_permission_set` write naming a user with no `sys_member` row in the row's organization is not refused | plugin-security | Get: a system writer can store such a grant — invitation acceptance writes the membership and its placement together, and seed replay, the organization-admin reconcile and the platform bootstraps write grants as the system. Lose: such a row takes effect once its user is admitted to the organization. A non-system insert, or a non-system update that moves `user_id` or `organization_id`, is refused `400 VALIDATION_FAILED` / `reference_not_found` at `user_id` instead, for every caller, a platform administrator included; the membership is read as `{ isSystem: true, tenantId }` with `tenantId` the row's own organization, never another one. A row stored with no organization is a global grant and is not judged | `packages/plugins/plugin-security/src/grant-holder-membership-refusal.ts#onInsert`, `#onUpdate` |
134134
| 24 | Tenant-audit warning silenced; `bypassTenantAudit` threaded to the driver | objectql | Get: unscoped system writes stop warning. Lose: the signal that would flag a genuine user-path scoping bug | `packages/objectql/src/engine.ts#buildDriverOptions` |

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ what moved this page's population from 225 to 227; nothing about the two sites
8383
changed, only whether this instrument could see them.
8484

8585
**The expensive failure direction is a keyword.** Sites whose receiver the author
86-
typed `any` have no type to read, and there are 50 of them — just over a fifth
86+
typed `any` have no type to read, and there are 46 of them — just under a fifth
8787
of the population, concentrated in exactly the seed and bootstrap paths this
8888
control exists for. Scoring an unreadable receiver as "not an engine" would have
8989
dropped every one of them silently, with a clean exit and a smaller number that
@@ -122,7 +122,7 @@ are reported as `undecidable` rather than assumed either way.
122122

123123
The same holds twice over for the context. An options argument spelled as a
124124
literal can be read; one spelled `options`, `{ ...opts }`, or handed through a
125-
forwarding shim cannot, and **53 of the 238 sites are spelled that way**. A
125+
forwarding shim cannot, and **53 of the 233 sites are spelled that way**. A
126126
context resolved from an inline literal or a local `const` can be tested for
127127
`isSystem`; one arriving from a helper call cannot.
128128

@@ -187,10 +187,10 @@ reproduce them. Where it disagrees, it disagrees on the page:
187187

188188
| carried figure | where it survives | this census |
189189
| :--- | :--- | ---: |
190-
| 175 write call sites | quoted in the merged changeset | **238** |
190+
| 175 write call sites | quoted in the merged changeset | **233** |
191191
| 24 carrying no tenant context | quoted in the merged changeset | **2** provable and tenancy-enabled; **32** more whose options argument is unreadable |
192-
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **159 of 238** decidable, **79** undecidable |
193-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 126 decidably elevated, 0 decidably not, 104 undecidable |
192+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **158 of 233** decidable, **75** undecidable |
193+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 126 decidably elevated, 0 decidably not, 99 undecidable |
194194
| 141 and 132, two independent re-derivations | the card that filed this work | — |
195195

196196
**The differences are not reconciled, and deliberately so.** The old census's
@@ -200,18 +200,18 @@ be stated is what this instrument counts, which is written above and re-runnable
200200
at any commit.
201201

202202
Two structural facts do plausibly widen this reading against any hand or regex
203-
one, and both are counted in the generated tables below: the 50 sites reached
203+
one, and both are counted in the generated tables below: the 46 sites reached
204204
through an erased (`any`) receiver, and the 53 that name their object through a
205205
`const` rather than inline. An instrument that read either the way a person does
206206
would report a smaller number and would not say so.
207207

208208
The fourth row is the one worth flagging to anyone citing it. **The 135 / 77%
209209
figure has no surviving corroboration anywhere in the tree.** This census reads
210-
126 of 238 (53%) as decidably elevated, with 104 more whose elevation is a
210+
126 of 233 (54%) as decidably elevated, with 99 more whose elevation is a
211211
run-time fact — so the claim is neither confirmed nor refuted, and the honest
212212
answer is that a static reading cannot settle it.
213213

214-
⇒ **Cite `2 / 238`, and say what it is**: the sites whose options argument was
214+
⇒ **Cite `2 / 233`, and say what it is**: the sites whose options argument was
215215
READ and holds no tenant context, against a decidably tenancy-enabled object.
216216
That is the control's provable yield surface. ⛔ Do not cite it as "the sites
217217
without tenant context" — **32 further sites** have an options argument this
@@ -223,30 +223,30 @@ cannot read, and they are neither in nor out.
223223

224224
| what | count |
225225
| :--- | ---: |
226-
| write call sites on the application surface | **238** |
227-
| …whose object name is statically decidable | 159 |
228-
| …whose object name is chosen at run time | 79 |
229-
| …against an object with tenancy ENABLED | 158 |
226+
| write call sites on the application surface | **233** |
227+
| …whose object name is statically decidable | 158 |
228+
| …whose object name is chosen at run time | 75 |
229+
| …against an object with tenancy ENABLED | 157 |
230230
| …against an object that declares tenancy off | 1 |
231-
| threading a tenant context | 177 |
231+
| threading a tenant context | 172 |
232232
| PROVABLY carrying none (options read, no context key) | **8** |
233233
| …of those, against a decidably tenancy-enabled object | **2** |
234234
| options argument UNREADABLE — may or may not carry one | 53 |
235235
| …of those, against a decidably tenancy-enabled object | 32 |
236236
| threading a decidably ELEVATED (`isSystem`) context | 126 |
237237
| threading a context that is decidably NOT elevated | 0 |
238-
| threading a context whose elevation is a run-time fact | 104 |
238+
| threading a context whose elevation is a run-time fact | 99 |
239239

240240
| how the instrument reached the site | count |
241241
| :--- | ---: |
242-
| receiver carried a readable engine type | 188 |
242+
| receiver carried a readable engine type | 187 |
243243
| receiver erased, placed by the object NAME | 32 |
244-
| receiver erased, placed by an `object: string` PARAMETER | 13 |
244+
| receiver erased, placed by an `object: string` PARAMETER | 9 |
245245
| receiver erased, placed by an `UNTYPED_RECEIVERS` row | 5 |
246246

247-
| object name spelled inline | 106 |
247+
| object name spelled inline | 105 |
248248
| object name spelled through a `const` | 53 |
249-
| object name is an `object: string` parameter | 17 |
249+
| object name is an `object: string` parameter | 13 |
250250
| object name is some other run-time expression | 62 |
251251

252252
### Subtractions the census could NOT defend — enforced
@@ -297,11 +297,11 @@ holds still. They are required to be HERE and to say WHEN they were true;
297297
their values are not compared. The reasoning, and the measurement behind it,
298298
are in `scripts/check-tenant-audit-census.mjs`.
299299

300-
Measured on 2026-10-11 at `a18c51496`.
300+
Measured on 2026-10-11 at `64e53f1d0`.
301301

302302
| corpus scale (not enforced) | count |
303303
| :--- | ---: |
304-
| tracked non-test sources scanned | 637 |
304+
| tracked non-test sources scanned | 633 |
305305
| engine-shaped types recognised | 72 |
306306
| declared objects in the registry | 117 |
307307
| same-named calls subtracted as non-engine | 162 |

0 commit comments

Comments
 (0)