Uh oh!
There was an error while loading. Please reload this page.
docs(objectql): drop the unverified "268KB" from the ./core boundary claim (#9803) - #9909
Conversation
…claim (#9803) The `@objectstack/objectql/core` entry comment sold the ADR-0076 D2 boundary with a hard byte figure ("the 268KB metadata protocol"). It is not merely stale - it never had a stated unit, and no refresh can supply one. Provenance, re-derivable with `git cat-file -s <rev>:<path>`: 268,886 B packages/objectql/src/protocol.ts @ d9fe95f 268,921 B packages/metadata-protocol/src/protocol.ts @ 13dbcf2 (#2415) 1,054,749 B packages/metadata-protocol/src/protocol.ts @ HEAD The figure was raw source bytes of ONE file - what ADR-0076's premise paragraph counted on 2026-06-28 (268,886 B = 268.9 decimal KB). It was then re-pointed at a whole package ("the 268KB metadata-management layer"), a unit it never had. There is also no single right number to write instead. Measured today: 169,718 B dist/index.js, gzipped (LESS than the quoted figure) 591,087 B dist/index.js, raw 1,054,749 B src/protocol.ts (the quoted figure's own unit) 1,513,973 B src/**/*.ts, excluding tests 3,637,237 B src/**/*.ts A 21x spread straddling "268KB" in both directions, before an embedder's own bundler and tree-shaking are considered. So the figure goes rather than getting refreshed: exclusion is the load-bearing claim and the D2 ratchet already pins it. Removed from core.ts and both embed-objectql sites; the provenance above is recorded, commit-pinned, in the ratchet test header. Adds a second assertion to that existing ratchet test so core.ts cannot quote a byte figure for the excluded weight again. It is a content assertion on one file, not a size ratchet: no threshold, and it can only fire on a KB/MB figure written into core.ts. Replayed over all 14 states of core.ts since the file was created: red at 13 (every one of them this same line), green only at this fix. docs/adr/0076-objectql-core-tiering.md keeps its three uses: governed surface, and historically accurate there - it describes protocol.ts the file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
📓 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 — 14 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
PM review — ACCEPT. H2 turned "refresh the number" from the obvious fix into an impossible one. Arming.Verified at Ruling 1 — "right-shaped, factually correct, under-evidenced"That is the correct verdict and the correct response to it. The draft picked option (2) and both its asserted numbers verified exactly (268,921 B and 1,054,749 B) — but it stated them with no provenance and no unit analysis, i.e.
Keeping its direction and its three prose edits verbatim, and rewriting only the ratchet header so every figure is commit-pinned and re-derivable, is exactly the shape ruling 1 asked for: the deliverable is a number that can be re-derived, not a fresher number. ⭐ H1 — the card's guess was wrong, and that is what makes H2 the headlineThe card guessed So the card's premise ("unverified and probably stale") was true but understated. It is stale and unitless — and the second half is the stronger defect, because it makes option (1) unavailable rather than merely short-lived. ⭐ H2 — the measurement that decides the cardThe per-file figure was silently re-pointed at a whole package — "the 268KB metadata-management layer" — a unit it never had. "The size of
A 21× spread that straddles "268KB" in both directions, before an embedder's own bundler and tree-shaking ever runs. ⇒ A number whose unit is undefined cannot be verified even in principle, and no re-measurement supplies one. Removal, not refresh — and the ADR-0076 D2 exclusion ratchet, which already runs, carries the load-bearing half of the sentence. That is a genuinely better answer than the card asked for. H3 — the ADR left alone, for the right reason
Two independent reasons, and the second is the one that matters: an ADR records what was true at decision time. "Fixing" it would have been the actual defect. Naming that rather than hiding behind the governed-surface rule is the better answer. ⭐ Ruling 3 — the gate priced by replaying its own historyI asked for the threshold, what it measures, and how often it would have fired historically. You replayed the guard predicate over all 14 states of
That is the strongest form this pricing takes, and it converts "will this be a nuisance?" from a guess into a closed question. And it is not a size ratchet — no bundle measured, no threshold — it asserts that The known limitation stated rather than buried — the two H4Both arms reverse-verified from a committed state, each restore proven byte-identical by sha256 (
Side benefit — you strengthened one of my open escalationsYour build step used Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9803
The
@objectstack/objectql/coreentry comment sold the ADR-0076 D2 boundary with a hard byte figure — "the 268KB metadata protocol". The card asked whether to refresh it, drop it, or leave it. Measuring it first changed the answer: the figure is not merely stale, it never had a stated unit, so there is no correct number to write in its place.H1 — what the figure actually measured
Re-derivable with
git cat-file -s REV:PATH. The extraction predates the default 63-commit shallow clone (finding #9878), sogit fetch --deepen=1200first:packages/objectql/src/protocol.tsd9fe95fcf— pre-extractionpackages/metadata-protocol/src/protocol.ts13dbcf2d0— same file, as it landed (#2415, 2026-06-28)packages/metadata-protocol/src/protocol.tsHEAD268,886 B = 268.9 decimal KB — so "268KB" was the raw source bytes of one file,
protocol.ts, counted by ADR-0076's premise paragraph. Under its own original unit it is 3.9x stale today.H2 — the deeper defect: the unit
That per-file figure was then re-pointed at a whole package — "the 268KB metadata-management layer". Today "the size of
@objectstack/metadata-protocol" is any of these, afterpnpm --filter @objectstack/metadata-protocol build:dist/index.js, gzipped — less than the quoted figuredist/index.js, rawsrc/protocol.ts— the quoted figure's own unitsrc/**/*.ts, excluding testssrc/**/*.tsA 21x spread that straddles "268KB" in both directions, before an embedder's own bundler and tree-shaking are considered. A number whose unit is undefined cannot be verified even in principle — which is why this PR takes option (2) from the card (drop the figure, keep the claim) rather than option (1). Exclusion is the load-bearing half of the sentence, and the D2 ratchet already pins it.
H3 — every occurrence
Seven at
origin/main. Four fixed, three deliberately not:packages/objectql/src/core.ts:8(the carded one),packages/objectql/src/core-boundary.ratchet.test.ts:7,examples/embed-objectql/src/index.ts:7,examples/embed-objectql/README.md:18docs/adr/0076-objectql-core-tiering.mdlines 20 / 31 / 68 — governed surface, and historically accurate there: the ADR describesprotocol.tsthe file, which genuinely was that size.The full provenance above is recorded, commit-pinned, in the ratchet test header so the next reader can re-derive it instead of re-litigating it.
The one new assertion — please read this bit
The PR adds a second
it()to the existingcore-boundary.ratchet.test.ts, assertingcore.tsquotes no byte figure for the excluded weight.It is not a size ratchet. It measures no bundle, carries no threshold, and cannot redden on unrelated work: it fires only on a KB/MB figure written into that one file, on a comment line that also names metadata-protocol/metadata-management. Scope is deliberately
core.tsonly — the historical figures in the ratchet test's own header are dated, commit-pinned provenance and are meant to stay, and readingexamples/from a package test would add a cross-package path dependency for no gain.Priced by replay over all 14 states of
core.tssince the file was created:13 red / 1 green, and every red is this same defect — the figure was present from the file's very first commit. Zero false positives over the file's entire history.
Reverse verification (H4)
Both arms broken deliberately and restored with
git checkout HEAD -- packages/objectql/src/core.ts, byte-identity confirmed by sha256 (983554e1…) both times.export { assembleMetadataProtocol } from '@objectstack/metadata-protocol';tocore.ts. Red:core.ts imports forbidden package @objectstack/metadata-protocol.origin/mainline. Red, naming it:"// the 268KB metadata protocol is never pulled into their dependency graph."Gates
Union re-run at final HEAD
db22a44014, after the last commit:examples/embed-objectqltypecheck first failed onCannot find module '@objectstack/driver-memory'— an unbuilt dependency closure, not this change; green afterpnpm --workspace-concurrency=2 --filter '@objectstack/example-embed-objectql^...' build.Release
Comment-only in shipped source, plus one test assertion and two example-doc lines — nothing user-visible ships, so this carries
skip-changesetrather than a changeset. (An empty-frontmatter changeset is not the mechanism in this repo;scripts/check-empty-changeset.mjsrejects newly added ones.)Draft on purpose — not arming auto-merge, not flipping out of draft.
Generated by Claude Code