Skip to content

Commit c418d5c

Browse files
committed
ci: the vouched-reference census runs beside the single authz resolver guard; the tenant audit census counts the attach verb's insert
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibvynRbCtMndW8EHNGc
1 parent ce03251 commit c418d5c

3 files changed

Lines changed: 34 additions & 24 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2550,10 +2550,20 @@ jobs:
25502550
# @objectstack/core). Guards against a duplicate resolver copy drifting on a
25512551
# security path (the REST-vs-dispatcher sys_user_role drift) and against an
25522552
# entry point silently dropping the delegation.
2553+
#
2554+
# The second command is the same kind of guard on the write-time reference
2555+
# check: the code that may set the vouched-reference mark (a service verb
2556+
# vouching, on its own write, for the one record it proved) is pinned to an
2557+
# allowlist, so a new caller is a reviewed edit and never a quiet one. Its
2558+
# alias runs the census's `--self-test` first, which is what
2559+
# `check:self-test-wired` requires. Folded into this step rather than a step
2560+
# of its own: no new check context and no new required-status entry.
25532561
- name: Single authz resolver guard
25542562
id: single-authz-resolver-guard
25552563
continue-on-error: true
2556-
run: pnpm check:authz-resolver
2564+
run: |
2565+
pnpm check:authz-resolver
2566+
pnpm check:vouch-for-reference-callers
25572567
25582568
# #11352. Product code may not read a test-RUNNER variable (`TEST`,
25592569
# `VITEST*`, `JEST_WORKER_ID`). Runner variables are INHERITED by every

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

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

9595
**The expensive failure direction is a keyword.** Sites whose receiver the author
96-
typed `any` have no type to read, and there are 62 of them — just over a fifth
96+
typed `any` have no type to read, and there are 63 of them — just over a fifth
9797
of the population, concentrated in exactly the seed and bootstrap paths this
9898
control exists for. Scoring an unreadable receiver as "not an engine" would have
9999
dropped every one of them silently, with a clean exit and a smaller number that
@@ -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 265 sites are spelled that way**. A
135+
forwarding shim cannot, and **55 of the 266 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 | **265** |
200+
| 175 write call sites | quoted in the merged changeset | **266** |
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 | **188 of 265** decidable, **77** undecidable |
203-
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 148 decidably elevated, 0 decidably not, 109 undecidable |
202+
| 127 of 175 statically decidable, 48 runtime-parameter-name sites | restated on the `isSystem`-scoping card | **189 of 266** decidable, **77** undecidable |
203+
| 135 (77%) silenced by the `isSystem` guard before the posture gate | the lost issue body — **no surviving corroboration** | **not reproduced**: 148 decidably elevated, 0 decidably not, 110 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
@@ -210,18 +210,18 @@ be stated is what this instrument counts, which is written above and re-runnable
210210
at any commit.
211211

212212
Two structural facts do plausibly widen this reading against any hand or regex
213-
one, and both are counted in the generated tables below: the 62 sites reached
213+
one, and both are counted in the generated tables below: the 63 sites reached
214214
through an erased (`any`) receiver, and the 69 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-
148 of 265 (56%) as decidably elevated, with 109 more whose elevation is a
220+
148 of 266 (56%) as decidably elevated, with 110 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 / 265`, and say what it is**: the sites whose options argument was
224+
⇒ **Cite `2 / 266`, 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,28 +233,28 @@ cannot read, and they are neither in nor out.
233233

234234
| what | count |
235235
| :--- | ---: |
236-
| write call sites on the application surface | **265** |
237-
| …whose object name is statically decidable | 188 |
236+
| write call sites on the application surface | **266** |
237+
| …whose object name is statically decidable | 189 |
238238
| …whose object name is chosen at run time | 77 |
239-
| …against an object with tenancy ENABLED | 182 |
239+
| …against an object with tenancy ENABLED | 183 |
240240
| …against an object that declares tenancy off | 6 |
241-
| threading a tenant context | 202 |
241+
| threading a tenant context | 203 |
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 |
246246
| threading a decidably ELEVATED (`isSystem`) context | 148 |
247247
| threading a context that is decidably NOT elevated | 0 |
248-
| threading a context whose elevation is a run-time fact | 109 |
248+
| threading a context whose elevation is a run-time fact | 110 |
249249

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

257-
| object name spelled inline | 119 |
257+
| object name spelled inline | 120 |
258258
| object name spelled through a `const` | 69 |
259259
| object name is an `object: string` parameter | 7 |
260260
| object name is some other run-time expression | 70 |
@@ -307,7 +307,7 @@ 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-06 at `4addb47fd`.
310+
Measured on 2026-11-07 at `ce0325138`.
311311

312312
| corpus scale (not enforced) | count |
313313
| :--- | ---: |

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

Lines changed: 7 additions & 7 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 | 265 |
37-
| Object name statically decidable | 188 |
36+
| Write call sites | 266 |
37+
| Object name statically decidable | 189 |
3838
| Object name chosen at run time | 77 |
39-
| Against a tenancy-enabled object | 182 |
39+
| Against a tenancy-enabled object | 183 |
4040
| Against an object declaring tenancy off | 6 |
41-
| Threading a tenant context | 202 |
41+
| Threading a tenant context | 203 |
4242
| Provably carrying none | 8 |
4343
| …and decidably tenancy-enabled | 2 |
4444
| Options argument unreadable | 55 |
4545
| …and decidably tenancy-enabled | 29 |
4646
| Threading a decidably elevated context | 148 |
4747
| Threading a decidably non-elevated context | 0 |
48-
| Threading a context of undecidable elevation | 109 |
48+
| Threading a context of undecidable elevation | 110 |
4949

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

@@ -90,7 +90,7 @@ 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-06 at `4addb47fd`.
93+
Measured on 2026-11-07 at `ce0325138`.
9494

9595
| corpus scale (not enforced) | count |
9696
| :--- | ---: |
@@ -270,7 +270,7 @@ Measured on 2026-11-06 at `4addb47fd`.
270270
| `packages/services/service-storage/src/backfill-sys-file-organizations.ts` | `update` | `sys_file` | enabled | context, elevation undecidable | 1 |
271271
| `packages/services/service-storage/src/backfill-sys-file-public-scope.ts` | `update` | `sys_file` | enabled | context, elevation undecidable | 1 |
272272
| `packages/services/service-storage/src/file-attachment-service.ts` | `delete` | `sys_attachment` | enabled | context, elevation undecidable | 1 |
273-
| `packages/services/service-storage/src/file-attachment-service.ts` | `insert` | `sys_attachment` | enabled | context, elevation undecidable | 1 |
273+
| `packages/services/service-storage/src/file-attachment-service.ts` | `insert` | `sys_attachment` | enabled | context, elevation undecidable | 2 |
274274
| `packages/services/service-storage/src/file-reference-lifecycle.ts` | `insert` | `sys_file` | enabled | context, elevation undecidable | 1 |
275275
| `packages/services/service-storage/src/file-reference-lifecycle.ts` | `update` | `sys_file` | enabled | elevated | 2 |
276276
| `packages/services/service-storage/src/metadata-store.ts` | `delete` | `sys_file` | enabled | options unreadable | 1 |

0 commit comments

Comments
 (0)