Skip to content

test(dogfood): derive the authz probe reach from the route ledgers; retire the hand-written census - #26491

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-4g1xrr
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-4g1xrr

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #26410

Clause-②: no
Metadata-protocol: none
Ruling-ref: 6433001130

维护者速读

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/rest had to be re-measured by hand. If it was not, main went red after a green merge.

authz-probe-blind-spot.test.ts is rewritten to derive everything and pin no count:

  • Population and reach come from the ledgers. For REST_ROUTE_LEDGER (family) and ROUTE_LEDGER (domain), the imported table is the population. The ledger probe's own scoped text read (the same export const NAME … closing-bracket scope discover() 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 route discover() can never name. A row with a literal family or domain moves nothing.
  • Kept, derived on both sides: the matrix header's "discover(): N probes over M named source files" must equal the PROBES table it describes. Every PROBES entry must declare its kind before its file. All three kinds must still be in use.
  • Kept, presence only: each file a TRIPWIRE probe reads keeps one in-file positive control, so a tripwire's zero still reads the file. Each module on the RestServer registrar list must still register routes, since the two rest-server.ts tripwires 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 editing authz-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 the discover() 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:

Reader What it held Action
packages/rest/src/rest-route-ledger.ts, packages/runtime/src/route-ledger.ts a comment pointer: "the full reading lives in … census.ts" pointer now names the census at commit 6746140 and its derived successor
packages/rest/src/rest-meta-auth.test.ts a comment: the test "licenses the census counting those 8 as REACHABLE" reworded to the ratchet's meta:rest-server.ts:registerMetadataEndpoints key
authz-conformance.test.ts (5 comments) pointers to the census's prose and per-file controls re-pointed (the controls now live in the new test)
scripts/pm/dispatch-gates.mjs:2822 a dated incident narrative naming the path unchanged; it describes a past edit
scripts/pm/dispatch-gates.self-test.mjs:12013 the path as a change-set fixture for jobFilteredSteps unchanged; pure path-pattern matching, no file read, and the path still lies under packages/qa/dogfood/**

No scripts/pm/** wording moved, so this PR is not Tier H.

Why

Three main reds in ten days (#24057, #25988, #26361 → #26400) came from a PR that changed a counted file and merged green. These census files run only on main'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 leave discover() as the only gate.

Tests

Both files on origin/main 6746140 (before): 108 passed
 Test Files  2 passed (2)
      Tests  108 passed (108)
os-verify-lock: VERDICT command-exit 0 · held the lock 19s
Both files on bd9b1ea (after): 70 passed
 Test Files  2 passed (2)
      Tests  70 passed (70)
os-verify-lock: VERDICT command-exit 0 · held the lock 22s

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_LEDGER via scripts/ablation-replace.mjs, restored and hash-checked after each leg

Acceptance notes

Verification

All readings on head bd9b1ea5b0, clone unshallowed, every package under packages/** 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-test on the shallow clone, check:dual-build-cjs-loads without dist/). Both exit 0 after unshallowing and building.
  • --ran: 56 derived famil(ies) accounted for — 56 run, 0 NOT-MEASURED (a DERIVED zero).
  • The three artifact-roster families whose roster sits under packages/ were run too: check:authz-resolver, check:error-code-casing and check:filter-alias-parity, all exit 0.
  • pnpm --filter @objectstack/dogfood typecheck: exit 0, 0 errors.
  • Not run locally: @objectstack/rest and @objectstack/runtime tests and typecheck. Their diff is comment-only (three comment blocks). Test Core runs them on this PR.
  • Dogfood shards: not run whole. The title has no ! and no (narrowing) arm. The two affected files are the ones run above.

Changeset: skip-changeset. @objectstack/dogfood is private, and the two src/ edits in @objectstack/rest / @objectstack/runtime are comments only.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (CI-owned)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset. (nothing publishes: skip-changeset)
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English, except the 维护者速读 block.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmPfdxeQ7cdMHou5dY1


Generated by Claude Code

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 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): node scripts/docs-audit/affected-docs.mjs --json d0a7e748a933a7fb549c38c3105c1c49f5935dec → packageMentionDocs.

Which tree this was computed on

This run read content/docs from feee8b0d4f9c1bf10c7b202fda7807fd6cd29f48 — the merge of head bd9b1ea5b0264123eba1612a63e00e791787a838 into base d0a7e748a933a7fb549c38c3105c1c49f5935dec, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · devx seat 2 · 2026-10-27T05:06Z

Seat domain:devx#2 (#20163) · session_01Q4MDXRbEJCNdPAP4SiXwp9 · reviewed head bd9b1ea5 · card #26410 (claim 6433691397, branch claude/project-thread-4g1xrr), wave 10 delta N, ruling C only (Ruling-ref: 6433001130). Not governed (check-governed-merges: tier null); +227/−1870, below the 3000-line threshold.

Landing: ready + auto-merge once CI on this head is green. The card closes on Fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xl skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

2 participants