Skip to content

Commit 74d7cfb

Browse files
committed
chore(census): tenant-audit census and route-ledger count for the device registry
The registry adds five engine write call sites (260, from 255) and the route ledger ten rows (126, from 116); both regenerated by their writers, with the hand-written figures on the census page moved to match. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmRD9KKqvTU3THnute6
1 parent 8f66d6c commit 74d7cfb

3 files changed

Lines changed: 39 additions & 36 deletions

File tree

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

Lines changed: 23 additions & 23 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 **51 of the 255 sites are spelled that way**. A
135+
forwarding shim cannot, and **55 of the 260 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

@@ -160,8 +160,8 @@ now **0**: nothing on this surface threads a context that provably lacks the fla
160160

161161
**"No tenant context" counted sites it had not read.** An options argument the
162162
walker could not parse was folded into the same bucket as one it had read and
163-
found empty. That published **59 sites "carrying no tenant context at all"**
164-
when 8 said so and 51 were simply unread — an over-claim in the *alarming*
163+
found empty. That published **63 sites "carrying no tenant context at all"**
164+
when 8 said so and 55 were simply unread — an over-claim in the *alarming*
165165
direction, on the very figure this page tells other cards to cite. `carries` is
166166
now three-valued, and an unreadable argument can never contribute to the
167167
provable count.
@@ -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 | **255** |
200+
| 175 write call sites | quoted in the merged changeset | **260** |
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 | **177 of 255** decidable, **78** undecidable |
203-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 145 decidably elevated, 0 decidably not, 102 undecidable |
202+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **182 of 260** decidable, **78** 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, 106 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
@@ -211,17 +211,17 @@ at any commit.
211211

212212
Two structural facts do plausibly widen this reading against any hand or regex
213213
one, and both are counted in the generated tables below: the 62 sites reached
214-
through an erased (`any`) receiver, and the 61 that name their object through a
214+
through an erased (`any`) receiver, and the 66 that name their object through a
215215
`const` rather than inline. An instrument that read either the way a person does
216216
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-
145 of 255 (57%) as decidably elevated, with 102 more whose elevation is a
220+
146 of 260 (56%) as decidably elevated, with 106 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 / 255`, and say what it is**: the sites whose options argument was
224+
⇒ **Cite `2 / 260`, 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,29 +233,29 @@ cannot read, and they are neither in nor out.
233233

234234
| what | count |
235235
| :--- | ---: |
236-
| write call sites on the application surface | **255** |
237-
| …whose object name is statically decidable | 177 |
236+
| write call sites on the application surface | **260** |
237+
| …whose object name is statically decidable | 182 |
238238
| …whose object name is chosen at run time | 78 |
239239
| …against an object with tenancy ENABLED | 176 |
240-
| …against an object that declares tenancy off | 1 |
241-
| threading a tenant context | 196 |
240+
| …against an object that declares tenancy off | 6 |
241+
| threading a tenant context | 197 |
242242
| PROVABLY carrying none (options read, no context key) | **8** |
243243
| …of those, against a decidably tenancy-enabled object | **2** |
244-
| options argument UNREADABLE — may or may not carry one | 51 |
244+
| 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 | 145 |
246+
| threading a decidably ELEVATED (`isSystem`) context | 146 |
247247
| threading a context that is decidably NOT elevated | 0 |
248-
| threading a context whose elevation is a run-time fact | 102 |
248+
| threading a context whose elevation is a run-time fact | 106 |
249249

250250
| how the instrument reached the site | count |
251251
| :--- | ---: |
252-
| receiver carried a readable engine type | 193 |
252+
| receiver carried a readable engine type | 198 |
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 |
258-
| object name spelled through a `const` | 61 |
258+
| object name spelled through a `const` | 66 |
259259
| object name is an `object: string` parameter | 7 |
260260
| object name is some other run-time expression | 71 |
261261

@@ -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-10-31 at `d06a02507`.
310+
Measured on 2026-11-02 at `9a369d6ed`.
311311

312312
| corpus scale (not enforced) | count |
313313
| :--- | ---: |
314-
| tracked non-test sources scanned | 830 |
315-
| engine-shaped types recognised | 96 |
316-
| declared objects in the registry | 124 |
317-
| same-named calls subtracted as non-engine | 214 |
314+
| tracked non-test sources scanned | 851 |
315+
| engine-shaped types recognised | 98 |
316+
| declared objects in the registry | 125 |
317+
| same-named calls subtracted as non-engine | 227 |
318318

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

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

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

3434
| Measure | Value |
3535
|---|---:|
36-
| Write call sites | 255 |
37-
| Object name statically decidable | 177 |
36+
| Write call sites | 260 |
37+
| Object name statically decidable | 182 |
3838
| Object name chosen at run time | 78 |
3939
| Against a tenancy-enabled object | 176 |
40-
| Against an object declaring tenancy off | 1 |
41-
| Threading a tenant context | 196 |
40+
| Against an object declaring tenancy off | 6 |
41+
| Threading a tenant context | 197 |
4242
| Provably carrying none | 8 |
4343
| …and decidably tenancy-enabled | 2 |
44-
| Options argument unreadable | 51 |
44+
| Options argument unreadable | 55 |
4545
| …and decidably tenancy-enabled | 29 |
46-
| Threading a decidably elevated context | 145 |
46+
| Threading a decidably elevated context | 146 |
4747
| Threading a decidably non-elevated context | 0 |
48-
| Threading a context of undecidable elevation | 102 |
48+
| Threading a context of undecidable elevation | 106 |
4949

5050
## Subtractions the census could NOT defend — enforced
5151

@@ -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-10-31 at `d06a02507`.
93+
Measured on 2026-11-02 at `9a369d6ed`.
9494

9595
| corpus scale (not enforced) | count |
9696
| :--- | ---: |
97-
| tracked non-test sources scanned | 830 |
98-
| engine-shaped types recognised | 96 |
99-
| declared objects in the registry | 124 |
100-
| same-named calls subtracted as non-engine | 214 |
97+
| tracked non-test sources scanned | 851 |
98+
| engine-shaped types recognised | 98 |
99+
| declared objects in the registry | 125 |
100+
| same-named calls subtracted as non-engine | 227 |
101101

102102
## Every site
103103

@@ -232,6 +232,9 @@ Measured on 2026-10-31 at `d06a02507`.
232232
| `packages/services/service-mailbox/src/ingest/mail-ingest-service.ts` | `insert` | `MAIL_MESSAGE_OBJECT` | undecidable | elevated | 1 |
233233
| `packages/services/service-mailbox/src/ingest/mail-ingest-service.ts` | `update` | `MAIL_MESSAGE_OBJECT` | undecidable | elevated | 1 |
234234
| `packages/services/service-mailbox/src/sync/mailbox-sync-service.ts` | `update` | `MAILBOX_OBJECT` | undecidable | elevated | 1 |
235+
| `packages/services/service-messaging/src/device-registry.ts` | `delete` | `sys_user_device` | disabled | options unreadable | 2 |
236+
| `packages/services/service-messaging/src/device-registry.ts` | `insert` | `sys_user_device` | disabled | elevated | 1 |
237+
| `packages/services/service-messaging/src/device-registry.ts` | `update` | `sys_user_device` | disabled | options unreadable | 2 |
235238
| `packages/services/service-messaging/src/inbox-channel.ts` | `insert` | `objectName` | undecidable | context, elevation undecidable | 1 |
236239
| `packages/services/service-messaging/src/inbox-channel.ts` | `insert` | `receiptObject` | undecidable | context, elevation undecidable | 1 |
237240
| `packages/services/service-messaging/src/messaging-service.ts` | `insert` | `RECEIPT_OBJECT` | undecidable | context, elevation undecidable | 1 |

‎packages/runtime/src/route-ledger.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export const NON_DISPATCH_MOUNT_PREFIXES = [
301301
/**
302302
* The ledger.
303303
*
304-
* CENSUS (generated): this list holds 116 rows.
304+
* CENSUS (generated): this list holds 126 rows.
305305
*
306306
* ⛔ THAT NUMBER IS WRITTEN BY A TOOL — never by hand.
307307
* `pnpm check:route-ledger-census` counts the rows below and fails when the two

0 commit comments

Comments
 (0)