Uh oh!
There was an error while loading. Please reload this page.
docs(lint): correct the ./runtime subpath's "light entry" claim with measurements - #9802
Conversation
…measurements `@objectstack/lint`'s `./runtime` subpath was documented as the kernel-safe entry that "never names the module graph that reaches the react/jsx source parsers". Measured on this tree, that is false in the direction that costs a reader a console build to discover: . 72 modules dist/index.js 552,936 B 263 exported names ./runtime 71 modules dist/runtime.js 518,583 B 5 exported names (70 shared) (93.8%) 93.8% of the bytes, 1.9% of the surface. The single non-barrel module the root reaches and `./runtime` does not is `lint-startup-registry-verdict.ts`; both entries reach `validate-react-pages.ts` and `validate-react-page-props.ts`. `validateCapabilityReferences` is compiled INTO `dist/runtime.js` and merely not exported from it, so a consumer pays its bytes and cannot call it. What the entry actually buys is an export-surface pin, not weight: the kernel gate must import it rather than the root barrel, and `authoring-rule-wiring.test.ts` fails if it ever does otherwise. The lazy loading of typescript/sucrase/ajv is the PACKAGE's property, pinned by `lazy-deps.test.ts` over all of `src/` — the root entry has it too. Prose only; nothing that executes changes. The corrected copies are `src/runtime.ts`, `src/index.ts`, `tsup.config.ts` and the stale assertion message in `authoring-rule-wiring.test.ts` (message text only, the assertion is untouched). `runtime-lazy-deps.test.ts` already stated the truth and is the witness the other four contradicted. 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 — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
✅ PM ACCEPT — #9772 / PR #9802Verified independently: 4 files ⭐ H1 — re-measured, and the two additions are both worse than the card knewYou quoted none of my figures. Module counts reproduce exactly (72 / 71, 70 shared); the byte figures moved with Two facts the card did not have, and both sharpen it:
That second one is materially worse than the card's claim. The card said ⭐ H2 — you found the real reason, and it is not the one anyone assumedThe 72/71 delta is three files, two of them the barrels themselves, so the real delta is exactly one module —
Derived purpose:
That is the best possible H2 outcome. My prompt worried the 2-module delta might not justify a separate entry; the answer is that it does, for a reason unrelated to the delta, and the old comment was not merely imprecise — it advertised the wrong axis entirely. The published-artifact delta, measured rather than argued
That is the difference between "it's only comments" and "I checked what ships." And the label went on by additive POST, read back with the bot's ⭐ H4 — a clean negative, earned by measuring the true ones tooAll 8 multi-entry
A negative result is only worth something if the positives were checked with the same instrument. Three verified-true claims is what makes "only one is false" a finding rather than a shrug. Ruling on the release-note question you raised to me rather than cardingYou found Ruling: leave all four alone. A shipped release note and a generated changelog are records of what was said at the time, not live documentation. Correcting them retroactively falsifies the record without helping any reader — and Raising it to me instead of either editing it or filing a card was exactly the right disposal. #9803
Verdict: ACCEPT. Arming once the seven running gates converge. Generated by Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
Fixes#9772
Option C of #9707's disposition. Prose only — nothing that executes changes.
H1 — re-measured, not quoted
Measured on this branch by walking the static import graph of
packages/lint/srcfrom each entry, and by
staton this package's owntsupoutput. No consolebuild needed.
dist/index.js/dist/runtime.js(ESM).d.ts../runtime.The card's module counts (72 / 71 / 70 shared) reproduce exactly. The byte
figures moved because
mainhas advanced since the card's SHA, and the card'sbasis is the built ESM bundle: 532,262 / 498,225 (93.6%) then, 552,936 / 518,583
(93.79%) now. The ratio is unchanged. CJS is 570,928 / 520,268 (91.13%).
Two refinements the card did not have:
./runtimecarries 93.8% of the bytesand 1.9% of the export surface (5 names of 263). Its export set is a strict
subset of
.'s — nothing is exclusive to it.validateCapabilityReferencesis compiled intodist/runtime.js(it is amember of the one shared registry; the function body is at line 6435 of the
bundle) and merely not exported from that entry. The card said "does not
export it at all", which is true — but the consumer does not save its bytes
either. You pay for the rule and cannot call it.
H2 — the 2-module delta, named
The 72/71 delta decomposes into three files, two of which are the barrels
themselves. The real delta is exactly one module:
.:index.ts(the barrel) andlint-startup-registry-verdict.ts./runtime:runtime.ts(the barrel)So
lint-startup-registry-verdict.tsis the entire graph difference — and it isnot why the entry exists. Both entries reach
validate-react-pages.ts,validate-react-page-props.tsandvalidate-hook-body-writes.ts, i.e. thereact/jsx source-parser rules.
What
./runtimeis actually for, derived: it is an export-surfaceboundary, machine-checked — not a weight boundary.
@objectstack/metadata-protocol'sruntime gate must reach this package through it rather than the root barrel, and
authoring-rule-wiring.test.ts's third invariant fails if it ever doesotherwise. That pin is what stops a kernel-path consumer from hand-calling a
CLI-only rule. The value is the pin, not the payload.
What is NOT the entry's doing: lazy loading of
typescript/sucrase/ajv. That is the package's property —lazy-deps.test.tspins it over allof
src/, so importing.loads none of them either. All four of those deps areimport typeonly at every site; the values arrive viacreateRequireat calltime. Consistent with ruling 3, and the reason ruling 3's imports stay put.
H3 — the sweep: five copies, four of them false
packages/lint/src/runtime.tsheaderpackages/lint/src/index.ts(line ~660)packages/lint/tsup.config.tspackages/lint/src/authoring-rule-wiring.test.tspackages/lint/src/runtime-lazy-deps.test.tsThe package's own pin test was the witness the other four contradicted. That is
the whole finding: the check was right and the doc comments drifted off it.
Further copies deliberately not touched, reported rather than edited:
content/docs/releases/v17.mdxline 2352 repeats the claim.content/docs/releases/**is off-limits in a code PR (ruling 5 and the repo's release-notes rule) — release
notes are a historical record of what shipped, and that is what shipped.
packages/lint/CHANGELOG.md,packages/cli/CHANGELOG.mdandpackages/metadata-protocol/CHANGELOG.mdcarry it in generated changesethistory. Rewriting shipped history is not a doc fix.
packages/metadata-protocol/src/runtime-authoring-gate.tssays the gate "mayonly reach that package through its kernel-safe
/runtimeentry (the wiringguard's third invariant)". That sentence states the invariant, which is
true and enforced; it makes no weight claim, so it stands.
H4 — other multi-entry packages: one candidate, and it needs judgement
Swept all 8 packages with a multi-entry
exportsmap (spec18,platform-objects11,
metadata4,types,objectql,metadata-core,lint,core2 each) for"light" / "browser-safe" / "kernel-safe" / "minimal" / "never pulls" claims, then
measured every claim found.
packages/lint's was the only unambiguously falseone. The rest hold:
@objectstack/types.vs./node./nodenode-isolation.test.ts@objectstack/core./loggerfs/pathmust never be imported statically"@objectstack/metadata./errors.; reaches neither manager nor loaders./runtime's 93.8%@objectstack/metadata./node,./migrations;@objectstack/metadata-core./testing@objectstack/objectql./core@objectstack/metadata-protocol;.has one,./coredoes not). The 268KB figure is unverified at HEAD —metadata-protocol/srcis 3.6 MB today and comparing published bundles needs a buildChangeset
skip-changeset, applied by additive POST and confirmed by read-back (thelabeler bot's
size/sandtestsboth survived). Verified rather than asserted:I hashed
packages/lint/dist/*before and after the edit and rebuilt. Exactlytwo published files change, both sourcemaps —
dist/index.cjs.mapanddist/runtime.cjs.map, via embeddedsourcesContent. No.js, no.cjs, no.d.ts, no.d.ctsdiffers; grepping the edited comment text finds it in noneof them.
tsup.config.tsis not infilesat all (filesisdist,README.md,CHANGELOG.md). Nothing a consumer can observe in behaviour ortypes changes.
Verification
At commit
44b0305:pnpm --filter @objectstack/lint test— 74 files, 2088 tests, all passedpnpm --filter @objectstack/lint typecheck— cleannode scripts/pm/dispatch-gates.mjs(the dispatch word named none), all exit 0:check:nul-bytes,check:cross-package-test-inputs,check:engine-double-contract,check:where-matcher,check:query-options-erasure,check:type-check-coverage,scripts/docs-audit/check-affected-docs.mjscheck:type-check-debt --re-measure, which needs the wholeworkspace closure built. This diff adds no test file and no code — it edits
comments and one assertion message inside an existing test — so it cannot move
a tsc error count. CI runs it.
Out of scope, honoured
No new subpath export (ruling 1). No shrinking, splitting or restructuring of
.or
./runtime(ruling 2). Themodule/fs/pathimports are untouched(ruling 3). No governed surface touched (ruling 6).
Generated by Claude Code