docs(spec): re-measure proof 4's two mislabelled census figures, each beside its population - #18863
Merged
Merged
Conversation
…lation
The proof-4 docblock in `packages/spec/scripts/build-schemas.ts` carried two
census figures that name a population they do not measure:
- "on the shipped graph 7 of the 8 defs in that state are unions" — the
not-delivered state holds 9 keys on 4 defs, 3 of them unions carrying 7 of
the 9 keys. The 7 was the KEY count wearing the DEF label.
- the closing line sent a reader to the census in a PR body whose own row
labels "defs resolving to exactly one declaration that names an undeclared
key" with 258 — the count of defs resolving to exactly one declaration
whether or not it names anything. That population measures 147.
Re-measured on this tree rather than copied: the whole census was re-derived
with this head's own verbatim `computeGuidanceRoutes`, and every figure is now
written beside the population it counts, with the commit it was taken on.
The rationale both figures support is unchanged — unions do dominate the
not-delivered set (3 of 4 defs, 7 of 9 keys). Only the arithmetic moved.
Comment-only; this script ships in no tarball (`@objectstack/spec` `files[]`
has no `scripts/` entry), so the blast radius is the gate's next reader.
Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3
Co-authored-by: Claude <noreply@anthropic.com>
…ead on Both corrected figures now say WHICH tree they are a reading of, in the same sentence as the number. A count anchored to a commit stays true when the graph moves; an unanchored one silently becomes a claim about a tree nobody measured, which is the same failure mode one level up from the one being fixed here. The not-delivered partition in particular is a fact about the graph, not a property of the proof — closing an open door moves it — so the docblock now tells its next reader to re-measure rather than re-date these counts. Claude-Session: https://claude.ai/code/session_01JbZnqu8bt6YqfJsr9vaFb3 Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Sep 18, 2026
os-bill
marked this pull request as ready for review
September 18, 2026 02:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #18579
Clause-②: no
Two census figures in the proof-4 prose of
packages/spec/scripts/build-schemas.tslabel a population they do not measure. Both are corrected, and both now carry their population — and the tree they were read on — in the same sentence, which is what the triage note on the card asked of whoever took it.The two figures
(1) The docblock's not-delivered rationale. It said "on the shipped graph 7 of the 8 defs in that state are unions". Measured: that state holds 9 keys on 4 defs, and 3 of those 4 defs are unions, carrying 7 of the 9 keys. The 7 was the KEY count wearing the DEF label.
(2) The closing line of the same docblock, which sent its reader to PR #18529's body "for the census run". That body's census row labels "defs resolving to exactly one declaration that names an undeclared key" with 258 — but 258 is the count of defs resolving to exactly one declaration whether or not it names anything. The labelled population measures 147. That row lives in a merged PR body and is not editable from here, so the docblock now records the census in the tree and tells its reader not to re-derive it from that body.
The argument both figures support is unchanged — unions do dominate the not-delivered set (3 of 4 defs, 7 of 9 keys). Only the arithmetic moved.
Re-measured on this head, not copied from the card
The card's numbers were taken on branch
9e0324f807andpackages/spec/srchas moved onmainsince, so nothing was copied. The whole census was re-derived with this head's own verbatimcomputeGuidanceRoutes: a byte-identical copy ofscripts/build-schemas.ts(prefix proven equal bygit hash-object:0803422391…on both) with a census block appended, run as the real generator sozodByDefKey,generatedSchemasand the declaration registry are the ones the gate itself sees. The copy was deleted before the first commit; it is in no diff.Tree measured:
objectstack-ai/objectstackat88aa326deb— the merge base of this branch withorigin/main.zodByDefKey, = bundled$defs)additionalProperties: falseprescribed)declared-but-silent)shared/RateLimitConfigui/ChartGroupBy,ui/ViewItem,ui/RecordHighlightsField)What validates the instrument is the rest matching, not the conclusion agreeing. Reproduced exactly against the card: 1117 · 258 · 147 · 779 · 770 · 9 · 2 · 6 · 9 · 0 ambiguous · 3-of-4 · 7-of-9. Drifted with
src, as the card predicted: 1525 → 1527 emitted defs, 303 → 304 no-shape, 408 → 410 not-additionalProperties-false. Independent corroboration of the 1527/1538 pair from the generator's own summary line:check:authorable-surfaceprintsbundled schema: objectstack.json (1527 definitions)/Successfully generated 1538 schemas.Cross-check tying the partition to the gate's own function: every one of the 779 promised (def, key) pairs the census derived was fed back through the head's verbatim
verdictFor— 0 came backnone. A replication that invented a pair the real lookup does not hold would show up there.Sequencing with PR #18861
PR #18861 (card #18578) repairs the
shared/RateLimitConfigopen-twin defect and therefore moves this exact partition (its author measures delivered 770 → 772, not delivered 9 → 7). It is absent from the tree measured here, proven twice:git merge-base --is-ancestor 36adecac58 HEADexits 1 on a non-shallow checkout with a lit control leg (88aa326deb→ exit 0), and the census itself still listsshared/RateLimitConfig:keyByand:storeas not-delivered, which is precisely the defect that PR removes.So both replacement sentences are written as readings of a named commit (
at 88aa326deb that state held …), not as claims about whatevermainholds today. They stay true when #18861 lands; they become stale, visibly, with the commit that says so right there. The docblock also now tells its next reader that which defs sit in that state is a fact about the graph rather than a property of the proof — "closing an open door moves it" — and to re-measure rather than re-date. Nothing here waits on or depends on that branch.Not taken: the
delivers()fixtureThe card's optional fourth item — a fixture for the
message-includes leg, the one refusing a strict clone built without the declaration's error map — is handed back, with a reason rather than a shrug. Three routes exist and each is blocked by a rule this repo states out loud:packages/spec/srcis published (files[]carriessrc/**/*.zod.ts), so this ships a fake schema to consumers.build-schemas-check-mode.test.tsbuilds each sandbox withfs.symlinkSyncforsrc— its own comment says "src/is the fixture's own, so the population a run observes is the repo's". A fixture def would have to be written into the realsrc, i.e. route 1. Copyingsrcper sandbox instead is a structural change to a 4466-line harness.delivers()is a closure over module-level state, and that file's header rule is no test-only seam.So it is not a fixture-sized job; it is a restructuring, and the card is explicit that this PR should not become two things. Recommendation for whoever files it: route 2, as its own card, because it also unlocks fixtures for the other fail-closed legs. The census zero that defends the leg today is re-stated above with its tree, so the next reader can see what it rests on.
Verification
pnpm --filter @objectstack/spec build— green (runsgen:schema, i.e. the edited generator, end to end)pnpm --filter @objectstack/spec typecheck— green (all three legs:tsc --noEmit,check:scripts-typecheckwhich compiles the edited file,check:test-typecheck)pnpm --filter @objectstack/spec test— 487 files / 14055 tests passedpnpm --filter @objectstack/spec exec vitest run --project repo scripts/build-schemas-check-mode.test.ts— 1 file / 85 tests passed. This is the suite that spawns the edited generator, and it is not in the package'spnpm test: that script runs--project localonly, and vitest's filter guard says so out loud when you aim the wrong project at the file.scripts/file-description.test.ts+scripts/def-key-collisions.test.ts(--project repo) — 128 passed; these are the only other tests that read this script by name.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack— 51 green. Two exit 3, which is that gate's own NOT-MEASURED code and neither a pass nor a failure:check:dual-build-cjs-loadsandcheck:lean-entry-closureboth need a whole-repopnpm buildthat this worktree does not carry. Neither can move on a comment in an unpublished script; CI builds fresh.pnpm lintequivalent run whole, not narrowed:npx eslint . --no-inline-config --format jsonat8f9a42d8a2— 6846 files, 0 errors, 0 warnings.grep -naPover the C0 range plus DEL) — no match;pnpm check:nul-bytesgreen.No changeset (
skip-changeset)Nothing published moves. Measured rather than asserted:
@objectstack/spec'sfiles[]isdist · json-schema · liveness · prompts · llms.txt · README.md · src/**/*.zod.ts · CHANGELOG.md · api-surface · spec-changes.json— noscripts/entry — and grepping every shipped path forcomputeGuidanceRoutesreturns 0 hits, against a lit positive control (keySetMatches, which is found indist/shared/index.jsand four more). The diff is comment-only inside that unpublished file, so the blast radius is the gate's next reader, not an author and not a consumer.Generated by Claude Code