Skip to content

Commit 07c56b5

Browse files
docs(rest,runtime,qa): attribute the 80 route registrations to both spellings, and re-measure the gated split (#16955)
* docs(rest,runtime,qa): attribute the 80 route registrations to both spellings, and re-measure the gated split Four docblocks said "all 80 `this.routeManager.register(` sites". The population is still 80, but it is now counted across two spellings — 72 direct call sites plus 8 `registerPerItemRoute(` calls through the per-item family's switch-carrying helper. One of the four sites is inside the census file that is itself the authority on this population, whose `:82` already knew about the second spelling while `:139` did not. The sequel figures were re-derived rather than re-worded, using the census's own population rule. 22 = 19 + 3 did not move across the re-spelling: the same 19 routes inside `registerMetadataEndpoints`, 11 still direct and 8 now helper-routed through the same wrapping `guardedRouteManager`, and the same 3 sharing one handler const. The headline split did move, earlier and for an unrelated reason — 50 gated / 30 ungated became 51 / 29 when the one route that resolved no identity was guarded — so the four sites are re-measured, not re-worded, and the "did not move" half is written down so it is not re-opened. The conclusion those figures support is unchanged and stated as such: deriving "gated" from source syntax stays rejected, and the second spelling strengthens that, since a naive scanner would now have to know both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8 * docs(qa): anchor the re-measurement at the tree it was re-verified on `rest-server.ts` moved between the branch point and the merge (a docs-only change to the batch-cap comment), so the note names the tree the reading was re-verified against rather than the one it was first taken on. Every figure is unchanged there: population 80, 51 gated / 29 ungated, 19 inside `registerMetadataEndpoints` (11 direct + 8 helper-routed), 3 sharing a handler const. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 97adce2 commit 07c56b5

4 files changed

Lines changed: 98 additions & 28 deletions

File tree

packages/qa/dogfood/test/authz-conformance.test.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,24 @@ const PROBES: readonly Probe[] = [
162162
// never authorization: `sdk` / `server-only` / `public` / `gap` / `mismatch`
163163
// say nothing about whether a caller is authenticated. Deriving "gated" from
164164
// source syntax instead was measured and rejected — scanning all 80
165-
// `this.routeManager.register(` sites in `rest-server.ts` for `enforceAuth`
166-
// reads 50/30 and 22 of the 30 ungated are FALSE (a wrapping
167-
// `guardedRouteManager` for 19 of them, a shared handler const for 3), a 73%
168-
// false-ungated rate on the largest registrar. What these two probes supply
169-
// is the POPULATION; the classification stays a reviewed row.
165+
// registration sites in `rest-server.ts` for `enforceAuth` (TWO spellings: 72
166+
// direct `this.routeManager.register(` sites plus 8 `registerPerItemRoute(`
167+
// calls through the per-item family's switch-carrying helper) reads 51/29 and
168+
// 22 of the 29 ungated are FALSE (a wrapping `guardedRouteManager` for 19 of
169+
// them, a shared handler const for 3), a 76% false-ungated rate concentrated
170+
// on the largest registrar.
171+
//
172+
// ⚠️ RE-MEASURED 2026-09-08. The 22 = 19 + 3 decomposition did NOT move when
173+
// the per-item helper landed — the same 19 routes, 11 still direct and 8 now
174+
// helper-routed through the same wrapping registrar — and the population
175+
// stayed 80. Only the headline split moved, earlier and unrelatedly: 50/30
176+
// became 51/29 when `registerUiEndpoints`, the one route in that file
177+
// resolving no identity, was guarded. Recorded so the next reader does not
178+
// re-derive a figure that has now been checked; the full reading lives in
179+
// `authz-probe-blind-spot.census.ts`, the authority on this population.
180+
//
181+
// What these two probes supply is the POPULATION; the classification stays a
182+
// reviewed row.
170183
{
171184
kind: 'ROUTE_ENUMERATION',
172185
file: 'packages/rest/src/rest-route-ledger.ts',

packages/qa/dogfood/test/authz-probe-blind-spot.census.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,43 @@
136136
// built as one.
137137
//
138138
// 2. DERIVING "gated" FROM SOURCE SYNTAX IS UNSAFE — measured, not assumed.
139-
// Scanning each of the 80 `this.routeManager.register(` call sites in
140-
// `rest-server.ts` for `enforceAuth` reads 50 gated / 30 ungated, and 22 of
141-
// those 30 are FALSE, in two structural shapes: `registerMetadataEndpoints`
139+
// Scanning each of the 80 registration sites in `rest-server.ts` for
140+
// `enforceAuth` — the SAME two spellings the `populationRule` below counts,
141+
// 72 direct `this.routeManager.register(` call sites plus 8
142+
// `registerPerItemRoute(` calls — reads 51 gated / 29 ungated, and 22 of
143+
// those 29 are FALSE, in two structural shapes: `registerMetadataEndpoints`
142144
// installs a wrapping `guardedRouteManager` so its 19 inner routes are
143145
// gated with no `enforceAuth` at the call site, and
144146
// `registerSecurityExplainEndpoints` shares one `handler` const declared
145-
// outside its 3 `register(` calls. A 73% false-ungated rate, concentrated
147+
// outside its 3 `register(` calls. A 76% false-ungated rate, concentrated
146148
// on the largest registrar, and hand-annotating the exceptions is the same
147149
// rot this instrument already has.
148150
//
151+
// ⚠️ RE-MEASURED 2026-09-08 against `5abca1792e`, because the 19 is a count
152+
// inside the very registrar the per-item helper re-spelled, and because
153+
// this paragraph attributed all 80 sites to the direct spelling alone
154+
// while `:82` above already knew there were two — the authority on this
155+
// population contradicting itself 57 lines apart.
156+
//
157+
// WHAT DID NOT MOVE: 22 = 19 + 3. The same 19 routes, 11 still direct and
158+
// 8 now helper-routed, all through the same wrapping; the same 3 sharing
159+
// one handler const; the population still 80. The re-spelling moved none
160+
// of the five figures.
161+
//
162+
// WHAT DID MOVE, and not here: 50 gated / 30 ungated became 51 / 29 when
163+
// `registerUiEndpoints` — the one route in this file that resolved no
164+
// identity, the same repair recorded as `enforceAuth` 61 -> 64 on the
165+
// rest-server.ts row below — was guarded. That landed the day AFTER this
166+
// paragraph was first written and hours BEFORE it was copied into
167+
// `rest-route-ledger.ts`, `route-ledger.ts` and `authz-conformance.test.ts`,
168+
// which is why four sites carried 50/30 in step. ⛔ Written down as a
169+
// checked figure rather than left as one nobody dared touch: the two read
170+
// identically on the page, and only this note tells them apart.
171+
//
172+
// ⛔ The rejection stands whatever the numbers do, and the second spelling
173+
// strengthens it: a naive scanner now has to know both spellings before it
174+
// can read the file even this badly.
175+
//
149176
// 3. A LEDGER IS A DERIVED DATA FILE, ONE GUARDED STEP BEHIND THE SOURCE.
150177
// Adding a route to a registrar in `rest-server.ts` does not touch
151178
// `rest-route-ledger.ts`, so a ledger-sourced population mints no new key
@@ -184,7 +211,7 @@
184211
// point, where a new route is already being read.
185212
//
186213
// ⛔ Two readings stay REJECTED and are recorded here so they are not
187-
// re-proposed: deriving "gated" from source syntax (73% false-ungated), and
214+
// re-proposed: deriving "gated" from source syntax (76% false-ungated), and
188215
// taking a ledger disposition as an authorization fact (blocker 1).
189216

190217
import { readFileSync } from 'node:fs';

packages/rest/src/rest-route-ledger.ts

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,30 @@ export interface RestRouteLedgerEntry {
109109
* SDK expressibility; none of them says whether a caller must be
110110
* authenticated, and `public` states INTENT for a handful of browser-facing
111111
* routes rather than measuring a gate. Deriving the answer from source
112-
* syntax instead was measured and rejected: scanning all 80
113-
* `this.routeManager.register(` sites in `rest-server.ts` for `enforceAuth`
114-
* reads 50 gated / 30 ungated, and 22 of those 30 are FALSE — a wrapping
115-
* `guardedRouteManager` gates 19 of them with no `enforceAuth` at the call
116-
* site, and one registrar shares a handler const across its 3 mounts. A 73%
117-
* false-ungated rate on the largest registrar is a written-down false
118-
* assurance, which is strictly worse than an honest blank. So the posture is
119-
* DECLARED at the producer, where a new route is already reviewed, instead of
120-
* guessed at the consumer.
112+
* syntax instead was measured and rejected: scanning all 80 registration
113+
* sites in `rest-server.ts` for `enforceAuth` — TWO spellings, 72 direct
114+
* `this.routeManager.register(` sites plus 8 `registerPerItemRoute(` calls
115+
* through the per-item family's switch-carrying helper — reads 51 gated / 29
116+
* ungated, and 22 of those 29 are FALSE: a wrapping `guardedRouteManager`
117+
* gates 19 of them with no `enforceAuth` at the call site, and one registrar
118+
* shares a handler const across its 3 mounts. A 76% false-ungated rate,
119+
* concentrated on the largest registrar, is a written-down false assurance,
120+
* which is strictly worse than an honest blank. So the posture is DECLARED at
121+
* the producer, where a new route is already reviewed, instead of guessed at
122+
* the consumer.
123+
*
124+
* ⚠️ RE-MEASURED 2026-09-08, and the two halves moved differently. The
125+
* 22 = 19 + 3 decomposition did NOT move when the per-item helper landed —
126+
* the same 19 routes, 11 still direct and 8 now helper-routed, all through
127+
* the same wrapping registrar — and the population stayed 80. Only the
128+
* headline split moved, earlier and for an unrelated reason: 50/30 became
129+
* 51/29 when `registerUiEndpoints`, the one route in that file resolving no
130+
* identity, was guarded. Recorded so the next reader does not re-derive a
131+
* figure that has now been checked. ⛔ The rejection stands either way, and
132+
* the second spelling strengthens it — a syntactic scanner has to know both
133+
* before it can read the file even this badly. The full reading lives in
134+
* `packages/qa/dogfood/test/authz-probe-blind-spot.census.ts`, the
135+
* authority on this population.
121136
*
122137
* ABSENT MEANS "UNDECLARED", and that is the state of nearly the whole
123138
* surface. This field is filled INCREMENTALLY, exactly like `responseSchema`

packages/runtime/src/route-ledger.ts

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,30 @@ export interface RouteLedgerEntry {
157157
* SDK expressibility; none of them says whether a caller must be
158158
* authenticated, and `public` states INTENT for a handful of browser-facing
159159
* routes rather than measuring a gate. Deriving the answer from source
160-
* syntax instead was measured and rejected: scanning all 80
161-
* `this.routeManager.register(` sites in `rest-server.ts` for `enforceAuth`
162-
* reads 50 gated / 30 ungated, and 22 of those 30 are FALSE — a wrapping
163-
* `guardedRouteManager` gates 19 of them with no `enforceAuth` at the call
164-
* site, and one registrar shares a handler const across its 3 mounts. A 73%
165-
* false-ungated rate on the largest registrar is a written-down false
166-
* assurance, which is strictly worse than an honest blank. So the posture is
167-
* DECLARED at the producer, where a new route is already reviewed, instead of
168-
* guessed at the consumer.
160+
* syntax instead was measured and rejected: scanning all 80 registration
161+
* sites in `rest-server.ts` for `enforceAuth` — TWO spellings, 72 direct
162+
* `this.routeManager.register(` sites plus 8 `registerPerItemRoute(` calls
163+
* through the per-item family's switch-carrying helper — reads 51 gated / 29
164+
* ungated, and 22 of those 29 are FALSE: a wrapping `guardedRouteManager`
165+
* gates 19 of them with no `enforceAuth` at the call site, and one registrar
166+
* shares a handler const across its 3 mounts. A 76% false-ungated rate,
167+
* concentrated on the largest registrar, is a written-down false assurance,
168+
* which is strictly worse than an honest blank. So the posture is DECLARED at
169+
* the producer, where a new route is already reviewed, instead of guessed at
170+
* the consumer.
171+
*
172+
* ⚠️ RE-MEASURED 2026-09-08, and the two halves moved differently. The
173+
* 22 = 19 + 3 decomposition did NOT move when the per-item helper landed —
174+
* the same 19 routes, 11 still direct and 8 now helper-routed, all through
175+
* the same wrapping registrar — and the population stayed 80. Only the
176+
* headline split moved, earlier and for an unrelated reason: 50/30 became
177+
* 51/29 when `registerUiEndpoints`, the one route in that file resolving no
178+
* identity, was guarded. Recorded so the next reader does not re-derive a
179+
* figure that has now been checked. ⛔ The rejection stands either way, and
180+
* the second spelling strengthens it — a syntactic scanner has to know both
181+
* before it can read the file even this badly. The full reading lives in
182+
* `packages/qa/dogfood/test/authz-probe-blind-spot.census.ts`, the
183+
* authority on this population.
169184
*
170185
* ABSENT MEANS "UNDECLARED", and that is the state of nearly the whole
171186
* surface. This field is filled INCREMENTALLY, exactly like `responseSchema`

0 commit comments

Comments
 (0)