Surfaced while implementing #6849. Filed unassigned. Deliberately not fixed there — that card installs the ratchet on the one specifier that has been swept; this is the population the ratchet cannot cover yet.
What was measured
#6849's guard (scripts/check-vi-mock-inherit.mjs) classifies every vi.mock factory in the tree by whether it OBTAINS the real module (a callback parameter under any name, or vi.importActual of the same specifier) and SPREADS it. Run over all 1,499 call sites at 9ce20233f, restricted to workspace specifiers:
workspace-specifier call sites : 545
inherits : 240
frozen : 299 <- 1 on @object-ui/react (fixed in #6849), 298 elsewhere
Per specifier:
| specifier | frozen |
|---|
@object-ui/auth | 92 |
@object-ui/i18n | 34 |
@object-ui/collaboration | 25 |
@object-ui/plugin-form | 24 |
@object-ui/components | 22 |
@object-ui/permissions | 20 |
@object-ui/app-shell | 20 |
@object-ui/plugin-grid | 17 |
@object-ui/plugin-chatbot | 11 |
@object-ui/plugin-designer | 10 |
@object-ui/fields | 8 |
@object-ui/plugin-list | 6 |
@object-ui/plugin-detail | 4 |
@object-ui/plugin-dashboard | 2 |
@object-ui/plugin-markdown, @object-ui/data-objectstack, @object-ui/plugin-report | 1 each |
Reproduce with the guard on this tree:
node scripts/check-vi-mock-inherit.mjs --list
...and widen COVERED_SPECIFIERS locally to re-derive the table. ⛔ Do not commit a widened list without the sweep — see below.
Why each of these is the same defect
A factory that hand-lists its exports pins the mock at whatever was typed that day. The next export any module in the file's import graph reads AT MODULE SCOPE resolves to undefined and the file dies during COLLECTION. Measured on #6768: Test Files 3 failed | 546 passed with Tests 6694 passed — zero failed assertions, because those files' tests never ran. It reads as flake, and the bill lands on whoever added the export, in a red suite that does not point at them.
@object-ui/auth at 92 sites is worth its own sentence: it is the single largest frozen population in the tree and it is a package whose surface grows.
Why the guard cannot simply be widened today
Triage's ruling on #6849 (R+34) was NARROW, on the explicit ground that the gate is free while the tree is at zero — "窄口径今天是免费的。树在 0/106,门以棘轮起步". That is true of @object-ui/react and of nothing else: pointing the same gate at every @object-ui/* specifier lands it RED on 298 sites, which is a sweep, not a ratchet.
Triage also ruled out the escape hatch, and was right to: "宽了以后要收窄,是在一堆红里做例外表 —— 那正是例外表长成沼泽的路径". A 298-entry exemption ledger is exactly that swamp.
So the guard's COVERED_SPECIFIERS is grow-only and its documented widening precondition is a sweep, per specifier: convert that specifier's frozen factories to the inheriting form, confirm the guard reads zero for it, and add it to the list in the same PR. That is what this card is the worklist for.
Suggested shape
One card per specifier rather than one card for 298 sites — each is independently landable, each ends with a one-line addition to COVERED_SPECIFIERS, and a stalled one blocks nothing. @object-ui/auth first, on population; @object-ui/plugin-markdown / @object-ui/data-objectstack / @object-ui/plugin-report are one site each and are effectively free.
PR #6847 is the worked example of the conversion (25 sites, with a two-leg ablation demonstrating the failure and its removal).
⚠️Re-derive the numbers before acting on them. They are a snapshot at 9ce20233f, taken with the guard rather than with a grep — and the whole reason #6849 exists is that the previous figures came from a grep and were wrong in both directions.
Related: #6580 (a different importOriginal concern — the ~10s cost of inheriting through the source-aliased @object-ui/app-shell barrel). Worth reading before sweeping @object-ui/app-shell's 20, since inheriting is what that card measures the cost of.
Surfaced while implementing #6849. Filed unassigned. Deliberately not fixed there — that card installs the ratchet on the one specifier that has been swept; this is the population the ratchet cannot cover yet.
What was measured
#6849's guard (
scripts/check-vi-mock-inherit.mjs) classifies everyvi.mockfactory in the tree by whether it OBTAINS the real module (a callback parameter under any name, orvi.importActualof the same specifier) and SPREADS it. Run over all 1,499 call sites at9ce20233f, restricted to workspace specifiers:Per specifier:
@object-ui/auth@object-ui/i18n@object-ui/collaboration@object-ui/plugin-form@object-ui/components@object-ui/permissions@object-ui/app-shell@object-ui/plugin-grid@object-ui/plugin-chatbot@object-ui/plugin-designer@object-ui/fields@object-ui/plugin-list@object-ui/plugin-detail@object-ui/plugin-dashboard@object-ui/plugin-markdown,@object-ui/data-objectstack,@object-ui/plugin-reportReproduce with the guard on this tree:
...and widen
COVERED_SPECIFIERSlocally to re-derive the table. ⛔ Do not commit a widened list without the sweep — see below.Why each of these is the same defect
A factory that hand-lists its exports pins the mock at whatever was typed that day. The next export any module in the file's import graph reads AT MODULE SCOPE resolves to
undefinedand the file dies during COLLECTION. Measured on #6768:Test Files 3 failed | 546 passedwithTests 6694 passed— zero failed assertions, because those files' tests never ran. It reads as flake, and the bill lands on whoever added the export, in a red suite that does not point at them.@object-ui/authat 92 sites is worth its own sentence: it is the single largest frozen population in the tree and it is a package whose surface grows.Why the guard cannot simply be widened today
Triage's ruling on #6849 (R+34) was NARROW, on the explicit ground that the gate is free while the tree is at zero — "窄口径今天是免费的。树在 0/106,门以棘轮起步". That is true of
@object-ui/reactand of nothing else: pointing the same gate at every@object-ui/*specifier lands it RED on 298 sites, which is a sweep, not a ratchet.Triage also ruled out the escape hatch, and was right to: "宽了以后要收窄,是在一堆红里做例外表 —— 那正是例外表长成沼泽的路径". A 298-entry exemption ledger is exactly that swamp.
So the guard's
COVERED_SPECIFIERSis grow-only and its documented widening precondition is a sweep, per specifier: convert that specifier's frozen factories to the inheriting form, confirm the guard reads zero for it, and add it to the list in the same PR. That is what this card is the worklist for.Suggested shape
One card per specifier rather than one card for 298 sites — each is independently landable, each ends with a one-line addition to
COVERED_SPECIFIERS, and a stalled one blocks nothing.@object-ui/authfirst, on population;@object-ui/plugin-markdown/@object-ui/data-objectstack/@object-ui/plugin-reportare one site each and are effectively free.PR #6847 is the worked example of the conversion (25 sites, with a two-leg ablation demonstrating the failure and its removal).
9ce20233f, taken with the guard rather than with a grep — and the whole reason #6849 exists is that the previous figures came from a grep and were wrong in both directions.Related: #6580 (a different
importOriginalconcern — the ~10s cost of inheriting through the source-aliased@object-ui/app-shellbarrel). Worth reading before sweeping@object-ui/app-shell's 20, since inheriting is what that card measures the cost of.