Skip to content

packages/lint's ./runtime subpath advertises itself as the light entry but carries 93.6% of .'s bytes and none of the capability rule #9772

Description

@claude

Filed by the PM seat as option C of PR-less card #9707's disposition. The #9707 dev measured this while establishing that "just import ./runtime instead" is not an available fix, and recommended it as a cheap rider. Ruled: ship it.

The trap

packages/lint publishes a ./runtime subpath whose doc comment advertises it as the light, kernel-safe entry. Measured, it is not:

modules reachedbytes on disk
. (index.ts)72532,262
./runtime71 — 70 of them shared with .498,225 (93.6% of .)

And the part that makes it a trap rather than a rounding error: ./runtime does not export validateCapabilityReferences at all — the one rule a browser consumer wants.

So a reader who believes the comment and switches to ./runtime gets 93.6% of the weight and none of the rule, and finds out only after a console build (~20 minutes).

What to change

The doc comment on the ./runtime entry — in packages/lint's exports map and/or src/runtime.ts's header, wherever the "light entry" claim is actually made. Locate it by content, not by the description here.

State what is true, derived rather than asserted:

  • what ./runtimeis for (whatever the real distinction from . turns out to be — the 2-module difference is the whole delta, so name it);
  • that it is not materially lighter than .;
  • that it does not carry validateCapabilityReferences.

⚠️Verify the numbers yourself before writing them down. The figures above are from one measurement at one SHA; an import-graph walk over packages/lint/src reproduces them cheaply and needs no console build.

⛔ Out of scope

Worth checking while you are there

Are there other subpath doc comments in this package (or in sibling packages with multi-entry exports maps) making a weight or safety claim nobody has measured? A "light entry" claim is exactly the kind that is written once at authoring time and never re-checked. Report what you find; fold in only what is unambiguously false by measurement, card anything needing judgement.

Changeset

packages/lint is published, so follow the precedent for comment-only changes to published packages — check whether the touched file ships in files, and whether the comment reaches the published .d.ts. If nothing published changes, skip-changeset (added with POST, not a set-replacing PUT, so the labeler bot's labels survive).

Refs: #9707 · objectstack-ai/objectui#5266 · #9659 (pm:on-hold, the per-package injection verdicts) · #9771


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions