This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 97b0177
test(vi-mock): inherit the real @object-ui/plugin-detail surface in 13 vi.mock factories (#8184)
* test(vi-mock): inherit the real @object-ui/plugin-detail surface in 13 vi.mock factories
objectui#6892 slice 9. Every frozen `vi.mock('@object-ui/plugin-detail', ...)`
factory now obtains the real module through `importOriginal` and spreads it
FIRST, with the file's existing overrides after it, so a new export on the
barrel can no longer resolve to `undefined` and kill the file during
collection. `@object-ui/plugin-detail` joins the gate's `COVERED_SPECIFIERS`
in the same PR (13 -> 14), which is the documented widening precondition.
Census re-derived through the gate's own `scan()` on 310c0ab: 17 judged,
4 already inheriting, 13 frozen -> 0. All 13 sit in one syntactic shape
(zero-parameter object-literal arrows) across three packages: plugin-gantt 8,
plugin-calendar 4, plugin-tree 1. No test assertion changed.
STEP 0 measured rather than assumed, and the two measurements disagree.
The barrel's graph is the largest this worklist has walked -- 564 modules,
6181 module-scope statements, 127 ComponentRegistry registrations, 99 bare
side-effect imports -- and timed cold in an EMPTY test file `importOriginal`
of it costs a median 8.8s, which is objectui#6580's app-shell STOP range.
Measured in the real files it is roughly free: -0.1s to +1.0s per file,
because those files already import `@object-ui/react` plus their own view
component, whose combined 572-module graph is a strict SUPERSET of the
barrel's 564 (zero marginal modules). The cost of inheriting a barrel is a
property of the consuming file, not of the barrel.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
* test(vi-mock): inherit through `<any>` in plugin-tree, which declares no plugin-detail edge
Fix-up on the slice-9 sweep. `check-phantom-dependencies` reads a
type-position `import('@object-ui/plugin-detail')` as a real specifier, and
`packages/plugin-tree` neither declares that package nor needs to: measured,
`ObjectTree`'s module graph reaches ZERO plugin-detail modules, against 50
each from `ObjectGantt` and `ObjectCalendar`. That factory therefore mocks a
module nothing under test ever loads, and the typed spelling would have made
the package declare a dependency its runtime does not have.
`<any>` inherits the same surface without asserting the edge, and it is the
spelling this tree's three already-inheriting plugin-detail factories use. The
twelve siblings keep the typed form, where the edge is real and declared. A
comment on the factory records the measurement so the difference is not read
as drift and "corrected" back.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent daf9d57 commit 97b0177
15 files changed
Lines changed: 96 additions & 20 deletions
File tree
- .changeset
- packages
- plugin-calendar/src
- plugin-gantt/src
- plugin-tree/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments