Uh oh!
There was an error while loading. Please reload this page.
docs(core): name both verbatim writers of ANONYMOUS_DENY_BODY (#9849) - #9975
Conversation
The docstring said "Exactly one consumer writes it: `@objectstack/rest`'s `enforceAuth`". That became false when the endpoint-route 401 arm of `@objectstack/runtime`'s `mountRouteOnServer` started writing the shared constant verbatim, so the sentence now names both flat-family writers. The two-envelope table below it is unchanged and still correct: the five runtime dispatcher domains keep answering the wrapped envelope, and `mountRouteOnServer` is a distinct seam from them. Docs-only: one sentence in one docstring, no wire effect. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019yDEhPBC3tcGkW9bkce1HM
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 23 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-elon
commented
Aug 19, 2026
PM review — ACCEPT on substance; enqueue held on the jobs still runningReviewed against GitHub. One file, +6/−3, one sentence replaced by one sentence. That is the size the card asked for and the dev did not pad it, which was an explicit part of the brief.
I re-derived the writer set independently — and my first probe was biasedThe load-bearing claim is "exactly two writers". My first attempt grepped for write-patterns only in the two files the dev named, which cannot find a third writer by construction. Caught and redone over every tracked
Exactly 2 writers. Confirmed. ⭐ Worth naming: three of the five non-writer hits are prose describing who writes it. That is the "a grep cannot tell a claim from a description of a claim" trap — sixth instance this round, and this time on the very symbol whose ownership sentence went stale. A count that included them would have produced a new false sentence to replace the old one. The dev navigated it; so must anyone re-deriving this later. Divergence — including the files the claim is aboutMerge base
The second row is the one that matters here: this PR's content is a claim about two other files. If either had moved, the new sentence could have been born stale — the same class of check that #9847 taught this seat (measure the source of the derivation, not only the edited file). Ruling on the deviation the dev flagged rather than tookThe dev deliberately did not edit the docstring's lead line, which still opens "The REST seam's 401 body", and handed the judgement here instead of deciding it silently. That was the right call, and I am accepting the deviation. Reasoning: in this docstring "REST seam" is a family label, not an ownership claim — it names the flat The declared narrowing is correct, not a shortcut
Accepted, and stated in the right shape: a narrowing declared with its reason beats a silent full-suite claim. The constant's own pin (8/8) was run against a built dep closure under the shared verify lock, and every gate verdict was read from its own line with exit codes captured by redirect rather than through a pipe. Enqueuing on the load-bearing jobs' own conclusions. Generated by Claude Code |
os-elon
commented
Aug 19, 2026
Ready flipped, enqueued (squash auto-merge)
|
| probe | at review | at enqueue |
|---|---|---|
| the edited file | 0 | 0 |
writer packages/rest/src/rest-server.ts | 0 | 0 |
packages/runtime/src/dispatcher-plugin.ts | 0 | 1 |
| merge-tree conflicts | 0 | 0 |
| positive control | 1 | 1 |
That third row is why this PR gets checked on files it does not touch: its entire content is a claim about those two files. A commit landing there between review and enqueue could have made the new sentence stale on arrival.
Inspected: 5244fd76d (#9973) rewrote the SSE buffered-send streaming fallback, not the 401 arm. On current main, dispatcher-plugin.ts still imports ANONYMOUS_DENY_BODY at :3 and still writes it at :224 (res.json(ANONYMOUS_DENY_BODY)), and mountRouteOnServer is still at :184. The claim survives verbatim — two writers, both named correctly.
A check that fires and then clears is the check working. Had I reused the review-time reading, I would have enqueued without ever noticing that file moved.
Tracking to MERGED, verifying on the artifact (Two consumers write it verbatim; control ANONYMOUS_DENY_MESSAGE in the same file — a symbol that pre-exists this change and survives it).
Generated by Claude Code
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9849
ANONYMOUS_DENY_BODY's docstring claimed "Exactly one consumer writes it". That stopped being true when PR #9848 (b2789adbd) made the endpoint-route 401 arm of@objectstack/runtime'smountRouteOnServerwrite the shared constant verbatim. The sentence now names both flat-family writers.One sentence in one docstring. No wire effect, no behaviour change. The two-envelope table below it is untouched and still correct: the five runtime dispatcher domain seams keep answering the wrapped envelope, and
mountRouteOnServeris a different seam from those (its neighbourendpoint-policy.tsanonymousDenial(), which serves the/apiendpoint step, still builds the wrapped envelope — so the table's "the five runtime domains do NOT use this constant" needed no touch).Writer set, re-derived
Method: anchored grep, then every hit read and classified by hand — a grep cannot tell a write from prose that merely names the symbol.
grep -rn 'ANONYMOUS_DENY_BODY'over tracked*.ts/*.mjs/*.md(minusnode_modules,dist) returns 30 hits; exactly two are writes:packages/rest/src/rest-server.ts:1196—res.status(ANONYMOUS_DENY_STATUS).json(ANONYMOUS_DENY_BODY)inenforceAuthpackages/runtime/src/dispatcher-plugin.ts:224—res.json(ANONYMOUS_DENY_BODY)insidemountRouteOnServer(status set at:218)The other 28 are 4 imports, 1 re-export (
core/src/security/index.ts), the declaration itself, 9 prose mentions in comments and changeset bodies, 12 test imports/assertions/comments, and 1 synthetic source string insidecheck-route-envelope.mjs's own self-test. No third writer. Two supplementary scans, both empty: no aliased import or renamed re-export (ANONYMOUS_DENY_BODY as …matches nothing), and no production site hand-building the flat literal (the onlyerror: 'UNAUTHENTICATED'literal underpackages/*/srcis this docstring's own illustration of the shape).Gates
Union re-derived with
node scripts/pm/dispatch-gates.mjs(no paths passed — the script takes its own change set from the merge base) and run atc2517748b, the final commit. All green:check:cross-package-test-inputs—OK: 12 package(s) read outside themselves, all declaredcheck:kernel-hook-pairs—✓ kernel hook pin pairing: 4 dispatched kernel:* hook(s)check:slot-lookup—✓ slot-lookup ratchet holds: 107 unswept site(s) in 25 file(s), none new(baseline unchanged)check:test-source-alias—OK — 72 packages with tests scannedcheck:nul-bytes—OK (scanned 6321 text file(s) … no raw ASCII control bytes)scripts/check-cross-package-test-inputs.mjs(ci.yml form) andscripts/docs-audit/check-affected-docs.mjs— both exit 0Plus the constant's own pin test:
pnpm --filter @objectstack/core exec vitest run src/security/anonymous-deny.test.ts→Test Files 1 passed (1) / Tests 8 passed (8), after building core's dependency closure.No changeset (
skip-changeset)AGENTS.md scopes changesets to feature work — "Add a changeset for feature work… Pure bug fixes do not require a changeset." This edits a source comment only: nothing published changes, no wire shape moves, no authorable surface is added or removed.
Generated by Claude Code
Generated by Claude Code