Skip to content

Commit c60f2b4

Browse files
committed
test(plugin-dev): drop the redundant driver-memory mock the census ledger locks (#15232)
`check:driver-memory-census` counts `vi.mock` as a DECLARATION, and that package's consumer set is locked by maintainer ruling (#5499 froze investment, #5704 / #6664 ruled each remaining consumer at two). The mock copied in from this package's sibling harnesses made this file a third consumer. ⛔ Not ledgered — MIGRATED, which here means deleted: the line was redundant. `dev-plugin.ts` has exactly one `import('@objectstack/driver-memory')` and it sits inside `if (enabled('driver'))`, while both boots in this file pass `services: { driver: false }`, so the specifier was never reached. Measured rather than argued: with the line gone the suite is unchanged at `7 passed (7) / 68 passed (68)`, both BOOT cases green (5ms / 1ms), and the census gate returns to `OK — 2 ruled consumers` with its ledger untouched. A comment stands where the mock was, so the next author copying the sibling harness does not re-add it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
1 parent 561ae05 commit c60f2b4

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/plugins/plugin-dev/src/dev-i18n-packages-reader.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@ vi.mock('@objectstack/service-i18n', () => ({
5454

5555
vi.mock('@objectstack/objectql', () => { throw absent('@objectstack/objectql'); });
5656
vi.mock('@objectstack/runtime', () => { throw absent('@objectstack/runtime'); });
57-
vi.mock('@objectstack/driver-memory', () => { throw absent('@objectstack/driver-memory'); });
57+
// ⛔ NO `@objectstack/driver-memory` mock here, deliberately — do not copy one in
58+
// from the sibling harnesses. `vi.mock` counts as a DECLARATION to
59+
// `scripts/check-driver-memory-census.mjs`, and that package's consumer set is
60+
// locked by maintainer ruling (#5499 froze investment, #5704 / #6664 ruled each
61+
// remaining consumer). A third test consumer is the #6664 defect itself, not a
62+
// bookkeeping chore. Nothing here needs it: every boot below passes
63+
// `services: { driver: false }`, and `dev-plugin.ts`'s ONE
64+
// `import('@objectstack/driver-memory')` sits inside `if (enabled('driver'))`,
65+
// so the specifier is never reached. Measured, not assumed: with the line gone
66+
// this suite is unchanged at 68 passed, both BOOT cases below green in 5ms and
67+
// 1ms — timings a real `import()` of that package would not fit in.
5868
vi.mock('@objectstack/service-storage', () => { throw absent('@objectstack/service-storage'); });
5969
vi.mock('@objectstack/service-realtime', () => { throw absent('@objectstack/service-realtime'); });
6070
vi.mock('@objectstack/plugin-auth', () => { throw absent('@objectstack/plugin-auth'); });

0 commit comments

Comments
 (0)