Repository navigation
test(dogfood): derive the authz probe reach from the route ledgers; retire the hand-written census - #26491
Conversation
…etire the hand-written census The 1,691-line `authz-probe-blind-spot.census.ts` pinned registration-site counts, control counts and two blind-spot totals, and every route added anywhere in @objectstack/rest had to re-measure it by hand or red main. `authz-probe-blind-spot.test.ts` now reads population and reach from the ledgers themselves and goes red only on a ledger row the discover() ledger probes cannot name. The matrix docblock stops stating ledger row counts, so the #17111 pin holds only the family / domain figures. discover()'s UNCLASSIFIED / STALE ratchet is unchanged. Claude-Session: https://claude.ai/code/session_01ADHkmPfdxeQ7cdMHou5dY1 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check2 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 37 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin feee8b0d4f9c1bf10c7b202fda7807fd6cd29f48 && git checkout feee8b0d4f9c1bf10c7b202fda7807fd6cd29f48
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d0a7e748a933a7fb549c38c3105c1c49f5935dec bd9b1ea5b0264123eba1612a63e00e791787a838 && git checkout -B drift-repro d0a7e748a933a7fb549c38c3105c1c49f5935dec && git merge --no-ff bd9b1ea5b0264123eba1612a63e00e791787a838
node scripts/docs-audit/affected-docs.mjs --json d0a7e748a933a7fb549c38c3105c1c49f5935dec |
席位核对 · ACCEPT · devx seat 2 · 2026-10-27T05:06ZSeat
Landing: ready + auto-merge once CI on this head is green. The card closes on |
Requested by Steve · project thread
Fixes #26410
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6433001130
维护者速读
authz-probe-blind-spot.census.ts,authz-probe-blind-spot.test.ts改成直接从两张路由账本推导:只有账本里出现一行discover()读不到的路由才红,不再钉任何条数。matrix 注释里两本账的「N rows」也去掉,只留 families / domains 数,[finding]authz-conformance.matrix.ts:27states the route ledger holds "94 rows / 19 families" in the present tense — measured 91 today, and the cause is #14503, not the gate move it sits next to #17111 的钉相应只钉组数。discover()的 UNCLASSIFIED / STALE 棘轮不动,也不加任何 CI 车道。packages/qa/dogfood/test/authz-probe-blind-spot.test.ts(新的推导检查),其次authz-conformance.test.ts的 [finding]authz-conformance.matrix.ts:27states the route ledger holds "94 rows / 19 families" in the present tense — measured 91 today, and the cause is #14503, not the gate move it sits next to #17111 段,再看authz-conformance.matrix.ts第 27 行一带。pnpm --filter @objectstack/dogfood exec vitest run test/authz-probe-blind-spot.test.ts test/authz-conformance.test.ts,预期 2 个文件、70 个测试全绿。What changes
C, as ruled. The hand-written census
packages/qa/dogfood/test/authz-probe-blind-spot.census.ts(1,691 lines) is deleted. It pinned per-file registration-site counts, exact positive-control counts, the probe-table shape (25 / 20 / 33) and two blind-spot totals (65 / 70), so every route added anywhere in@objectstack/resthad to be re-measured by hand. If it was not,mainwent red after a green merge.authz-probe-blind-spot.test.tsis rewritten to derive everything and pin no count:REST_ROUTE_LEDGER(family) andROUTE_LEDGER(domain), the imported table is the population. The ledger probe's own scoped text read (the sameexport const NAME… closing-bracket scopediscover()uses) is the reach. The test asserts the two line up row by row. It goes red only on a ledger row whose grouping value the probe cannot read. Such a row is a routediscover()can never name. A row with a literal family or domain moves nothing.discover(): N probes over M named source files" must equal thePROBEStable it describes. EveryPROBESentry must declare itskindbefore itsfile. All three kinds must still be in use.RestServerregistrar list must still register routes, since the tworest-server.tstripwires read them all. No exact counts.The #17111 docblock pin, in place (same defect class). The claim's premise was "the three reds were all the blind-spot pin". That is only partly true. #26406's before-run shows
authz-conformance.test.ts's #17111 pin also red on #26361 (docblock says 80 rows, the table holds 81), so deleting the census alone would leave a route-only PR still editingauthz-conformance.matrix.ts.The matrix docblock now states only
(18 families)/(23 domains). The pin parses that shape, and the "stale ROW count" doctoring case is gone. The group, deletion, second-copy and anchor cases stay. A new family or domain still moves the figure, alongside thediscover()classification it needs anyway. The seat amended the claim's file surface for this.Untouched:
discover()and its UNCLASSIFIED / STALE verdicts, the baseline, the matrix rows, every CI workflow. No census step was added to PRs or the merge queue.Other readers of the census path, re-read before deleting. None needs the table:
packages/rest/src/rest-route-ledger.ts,packages/runtime/src/route-ledger.tspackages/rest/src/rest-meta-auth.test.tsmeta:rest-server.ts:registerMetadataEndpointskeyauthz-conformance.test.ts(5 comments)scripts/pm/dispatch-gates.mjs:2822scripts/pm/dispatch-gates.self-test.mjs:12013jobFilteredStepspackages/qa/dogfood/**No
scripts/pm/**wording moved, so this PR is not Tier H.Why
Three
mainreds in ten days (#24057, #25988, #26361 → #26400) came from a PR that changed a counted file and merged green. These census files run only onmain's push and scheduled batteries. Every one was a count moving, never an unclassified route. The ruling (6433001130) withdrew a PR-time census step (letter A) and kept C: derive the population, so a bump-only change reds nothing, and leavediscover()as the only gate.Tests
Both files on
origin/main6746140 (before): 108 passedBoth files on bd9b1ea (after): 70 passed
The 38 fewer tests are the census's per-file parametrised rows and its table and totals pins, all deleted with it.
Controls on bd9b1ea: one row added to
REST_ROUTE_LEDGERviascripts/ablation-replace.mjs, restored and hash-checked after each legGET /api/v1/approvals/zz-control-probewithfamily: 'approvals', an existing family. Result:Test Files 2 passed (2) · Tests 70 passed (70), nothing to edit. The same shape of change onmain(feat(plugin-approvals,rest,client): a record-anchored approval lock read,{ locked }for every caller who can read the record #26361) needed test(dogfood): re-measure the authz census for the approval record-lock read #26406 (+37/−14 in the census and matrix) to clear 10 reds.family: 'zz-unclassified-probe'.discover()still refuses:UNCLASSIFIED surface — add a ledger row (ADR-0060): rest-family:rest-route-ledger.ts:zz-unclassified-probe, and the [finding]authz-conformance.matrix.ts:27states the route ledger holds "94 rows / 19 families" in the present tense — measured 91 today, and the cause is #14503, not the gate move it sits next to #17111 families figure reds too. 11 failed / 59 passed.family: 'approv' + 'als'.authz-probe-blind-spot.test.tsreds onthe probe reads EVERY row, naming the row. 12 failed / 58 passed.ablation-replace: ok restored: blob == HEAD (b6dd2271294b) and git diff HEAD is empty.Acceptance notes
rest-server.tsregistration-site blind-spot reading (70 sites, 19 reachable, 51 not) is no longer recorded anywhere live. The route-level bound it measured is still stated in the matrix header: a route inside an existing family mints no key. The full record stays in history at 6746140.rest-server-registrar-files.ts's header says each reader pins the list'slength. The derived check walks every module on the list instead, so no length is pinned. That header is not edited here.family: 'approv' + 'als'makes the ledger probe mint a phantom keyapprov, because its pattern stops at the first quote. It is caught twice (UNCLASSIFIED, and the new row-by-row check), so this is noted only.mainpush and schedule runs (dispatch-gates lists Dogfood Regression Gate as "scheduled BY YOUR PATHS" for a route-ledger.ts change, but its if: skips pull_request and merge_group, so neither PR CI nor the derived commands run the dogfood pins (main red after #24009) #24073 stands), so the first CI reading of these two files is after merge.Verification
All readings on head
bd9b1ea5b0, clone unshallowed, every package underpackages/**built (turbo run build --concurrency=2 --filter='./packages/**', 75 tasks, under the verify lock).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 56 derived commands, every exit captured before any pipe, 56 exit 0. The first pass had 2 exit-3 prerequisite refusals (check-plugin-teardown-shape --self-teston the shallow clone,check:dual-build-cjs-loadswithoutdist/). Both exit 0 after unshallowing and building.--ran:56 derived famil(ies) accounted for — 56 run, 0 NOT-MEASURED (a DERIVED zero).packages/were run too:check:authz-resolver,check:error-code-casingandcheck:filter-alias-parity, all exit 0.pnpm --filter @objectstack/dogfood typecheck: exit 0, 0 errors.@objectstack/restand@objectstack/runtimetests and typecheck. Their diff is comment-only (three comment blocks).Test Coreruns them on this PR.!and no(narrowing)arm. The two affected files are the ones run above.Changeset:
skip-changeset.@objectstack/dogfoodis private, and the twosrc/edits in@objectstack/rest/@objectstack/runtimeare comments only.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI-owned)main, one pull request.skip-changeset)packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmPfdxeQ7cdMHou5dY1
Generated by Claude Code