Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

test(vi-mock): inherit the real @object-ui/app-shell surface in 23 vi.mock factories (objectui#6892 slice 14) - #8407

Merged
baozhoutao merged 3 commits into
mainfrom
claude/issue-6892-vi-mock-inherit-slice14-app-shell
Sep 7, 2026
Merged

baozhoutao merged 3 commits into
mainfrom
claude/issue-6892-vi-mock-inherit-slice14-app-shell

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Refs #6892 (slice 14)

Converts every frozen vi.mock / vi.doMock factory naming @object-ui/app-shell
to the inheriting form used by slices 1 to 13, and adds the specifier to
COVERED_SPECIFIERS in scripts/check-vi-mock-inherit.mjs in the same PR.

@object-ui/app-shell was the LAST specifier in this tree carrying frozen sites.

FIRST: the count. Three numbers were in circulation; here is the reconciliation

The number this PR converted is 23, and it is the one the gate's own exported
scan() reports. Command, run at fff250ff1:

import { scan, COVERED_SPECIFIERS } from './scripts/check-vi-mock-inherit.mjs';
scan(ROOT, { covered: [...COVERED_SPECIFIERS, '@object-ui/app-shell'] });
// -> 23 sites naming the specifier, 23 frozen, 0 inheriting
count what it actually counts why it differs
22 distinct FILES, from objectui#6892's own Verification recipe AppManagementPage.mutations.test.tsx carries TWO sites, so a file count can never reach 23
23 call SITES per scan() — what this PR converts the gate's reading
24 vi.mock + vi.doMock OCCURRENCES from an unmasked regex the extra one is at FormPage.predicateScope.test.tsx:76 and it is inside a block comment

The dispatch's hypothesis was that the 24th was a code SAMPLE inside a string
literal. That is falsified. It is a comment, and the difference is not
cosmetic: scanSource() blanks comments BEFORE CALL_RE runs, so a commented
occurrence never becomes a call site at all and is counted in no bucket. The
gate's embedded counter reads 3 tree-wide and every one of those three names
something else — two @object-ui/react samples inside the gate's own header, one
./dep in an eslint-rule test. Measured directly against the mask:
comment[offset] = 1, literal[offset] = 0.

Before / after census

node scripts/check-vi-mock-inherit.mjs, exit 0 in both states:

judged inherit frozen other workspace
fff250ff1 (base) 625 625 0 35
this PR (0d163da2a) 648 648 0 12

The covered count rose by exactly 23 and other workspace fell by exactly 23, so
no site moved the other way and nothing else joined the judged population.

Name the odd site

Twenty-two of the 23 are module-scope vi.mock calls whose factory runs during the
import phase, which no timeout bounds.

The twenty-third — apps/console/src/pages/system/__tests__/AppManagementPage.mutations.test.tsx:280
— is a vi.doMock inside a test body, after vi.resetModules(). Its obtain
therefore sits in a bounded window, which is exactly the shape AGENTS.md's
测试纪律 section warns about. It was measured before conversion rather than argued
about (objectui#8173): that test went 459 ms to 660 ms against a 5000 ms
testTimeout
, while hop1SessionPrincipal — the 15000 ms window objectui#6580
was fighting — went 9 ms to 8 ms. Harmless, but shaped differently from the
other 22, and the next reader should not have to rediscover that.

The measured cost, carried forward so nobody re-derives it

objectui#8173 spent 11 vitest arms establishing this. Summary, so this PR is
self-contained:

  • The blocker that parked this specifier was a 10 s per file, times 22 files, equals 220 s
    extrapolation from objectui#6580. It does not survive.
  • objectui#6580's per-file figure reproduces in isolation (~8.3 s), but the cost is a
    one-time transform of the app-shell graph per vitest process, not a per-file
    cost — and about 67 of the console project's 89 test files already load the real
    barrel
    , so a realistic shard has already paid it before the first converted file
    is transformed.
  • Bound: at most +4 % of one shard, and only in the pathological case where all 22
    files land in one shard with no non-mocking console file beside them.
  • Green over three replicates: 22/22 files, 150/150 tests, and the whole console
    project at 1069/1069.

No maintainer ruling is owed and none was sought.

What is left after this slice

With this member in, running the classifier over every workspace specifier any
vi.mock call site in this tree names — 21 of them — reads 660 judged, 660
inheriting, 0 frozen
. Two specifiers are still outside COVERED_SPECIFIERS:
@object-ui/plugin-view (10 sites) and @object-ui/core (2). Both already read
all-inheriting when judged
(10/10 and 2/2), so their slices are membership flips
rather than sweeps. They are deliberately NOT folded in here — one specifier per
slice is this worklist's convention through thirteen landings, and it is what keeps
a regression bisectable.

No assertion was edited or deleted

Every one of the 23 removed lines in this diff is a factory line:

 15x  -vi.mock('@object-ui/app-shell', () => ({
  3x  -vi.mock('@object-ui/app-shell', () => ({ useAdapter: () => ADAPTER }));
  2x  -vi.mock('@object-ui/app-shell', async () => ({
  2x  -vi.mock('@object-ui/app-shell', async () => {
  1x  -    vi.doMock('@object-ui/app-shell', () => ({

One purely additive exception, declared rather than buried: FormPage.predicateScope.test.tsx
gains a paragraph inside an existing block comment. That comment documents the
module-scope import objectui#6580 added and states, as a load-bearing claim, that
"objectui#6580 took the barrel out of the factory". This PR puts the barrel back
in, so leaving the paragraph untouched would leave a comment asserting the opposite
of the code beside it. Nothing was removed from it; eight lines were appended.

Neighbour reading — zero repairs owed

Across the 22 files, all 28 workspace neighbours already inherit (16
@object-ui/auth, 11 @object-ui/i18n, one @object-ui/plugin-markdown), and the
only third-party factory is sonner (7 sites). The frozen lucide-react neighbour
that killed 15 files in slice 6 cannot exist here — no file among the 22 mocks
it. The remaining 61 neighbours are local whole-module replacements, out of scope by
construction.

Verification

Heavy runs went through the shared verify lock; every verdict below is the line the
tool printed, not a bare shell status.

command result
pnpm exec vitest run over the 22 converted files Test Files 22 passed (22) / Tests 150 passed (150) — lock VERDICT command-exit 0
pnpm exec vitest run apps/console/ Test Files 89 passed (89) / Tests 1069 passed (1069) — lock VERDICT command-exit 0
pnpm exec vitest run scripts/__tests__/check-vi-mock-inherit.test.ts …specifiers… …js-comment-mask-jsx-6891… Test Files 3 passed (3) / Tests 146 passed (146)
node scripts/check-vi-mock-inherit.mjs exit 0, 648 judged (648 inherit), 12 other workspace
node scripts/check-vi-mock-specifiers.mjs exit 0 — the sibling gate on the same population
node scripts/check-changeset-presence.mjs exit 0 — 22 published source files, 1 changeset, empty frontmatter
node scripts/check-changeset-no-major.mjs exit 0
pnpm --filter @object-ui/console run type-check exit 0 (after turbo run build --filter '@object-ui/console^...'; without the dependency closure built it is TS2307-noise, i.e. NOT MEASURED, not red)
turbo run lint --filter @object-ui/console exit 0 — 0 errors, 210 warnings, all pre-existing
eslint . --no-inline-config --format json (whole tree, no narrowing) 4456 files linted; 94 errors across 78 files, all pre-existing and none in this diff; the 12 warnings in changed files are all no-explicit-any on lines this PR did not write
control-character scan over the diff no hits

Reverse verification (ablation)

Run from the committed tree, with a trap-restore on absolute paths, and proven on
disk rather than by an exit code. Reverting one converted factory
(ApprovalsInboxPage.cellIdentity.test.tsx) to the frozen form:

BEFORE  injected-spread count: 4   frozen-form count: 0
AFTER   injected-spread count: 3   frozen-form count: 1
        on-disk hash 673e5690… -> cef53498…   (HEAD blob 673e5690…)
GATE EXIT=1
  apps/console/…/ApprovalsInboxPage.cellIdentity.test.tsx:123 -- vi.mock("@object-ui/app-shell")
    the factory never obtains the real module
RESTORE  git diff HEAD empty: YES   on-disk hash back to 673e5690…   frozen-form count: 0

Worth recording: the first attempt at this ablation used a perl -0pi -e
substitution that silently matched nothing. It exited 0 and the file was
byte-identical to HEAD; only the on-disk marker count and the hash comparison
caught it. Had the run been read off the exit code, this PR would have reported a
green gate as evidence that the gate can fail.

Changeset

.changeset/vi-mock-inherit-slice14-app-shell.md, empty frontmatter — 22 test files
under a published package changed, and the change releases nothing.
check-changeset-presence was run rather than guessed at.

Scope fences honoured


🤖 Generated with Claude Code

https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr


Generated by Claude Code

….mock factories

Every one of the 23 frozen factories hand-listed between one and 26 of the
barrel's exports, so the next export any module in the file's import graph
reads at module scope would resolve to `undefined` against the stand-in and
the file would die during collection -- with zero failed assertions, which is
the failure shape check-vi-mock-inherit exists to catch. Each now spreads the
real module first; every hand-written double stays after it as the override,
which is the behaviour those tests assert.

No assertion moved: all 23 removed lines in this diff are `vi.mock(` /
`vi.doMock(` factory lines.

Twenty-two are module-scope `vi.mock` calls. The twenty-third,
`AppManagementPage.mutations.test.tsx:280`, is a `vi.doMock` inside a test
body after `vi.resetModules()`, so its obtain sits in a bounded window rather
than the unbounded import phase. objectui#8173 measured it before conversion:
459ms -> 660ms against a 5000ms testTimeout.

`FormPage.predicateScope.test.tsx` gains a paragraph in the comment that
documents its module-scope import, because this change reverses that
comment's factual claim about where the barrel is loaded. Nothing was removed
from it.

22 files, 150 tests green; the whole console project 89 files / 1069 tests
green.

Part of objectui#6892 (slice 14).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
The sweep in the previous commit took this specifier to zero frozen, so it
joins COVERED_SPECIFIERS -- the grow-only list whose documented widening
precondition is a sweep, not a judgement. Eighteen members become nineteen,
and the gate reads 648 of 648 inheriting, with `other workspace` falling 35
to 12: the covered count rose by exactly the converted sites and no site
moved the other way.

The header gains the slice-14 record in the shape slices 5 to 13 used, plus
two things specific to this specifier:

  - The three-way count reconciliation. 22 is a FILE count (the worklist's
    own recipe, and unreachable as a site count because one file carries two
    sites); 23 is what `scan()` reports; 24 is an unmasked regex, whose extra
    match is inside a BLOCK COMMENT, not a string literal. That distinction
    matters because a commented occurrence is masked before CALL_RE runs and
    lands in NO bucket -- reading it as the `embedded` bucket would have been
    plausible and wrong.
  - Why no maintainer ruling is owed on the cost that parked this specifier
    under objectui#6580: the 220s extrapolation does not survive, because the
    cost is a one-time per-process transform that ~67 of the console
    project's 89 files already pay.

The record also states what is left: with this member in, every workspace
specifier any `vi.mock` call site in this tree names reads 660 judged, 660
inheriting, 0 frozen. The two specifiers still outside the list already read
all-inheriting, so their slices are membership flips rather than sweeps.

Part of objectui#6892 (slice 14).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
22 test files under a published package changed, so check-changeset-presence
demands a declaration. It is test-only, hence the empty frontmatter.

Part of objectui#6892 (slice 14).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3472.5 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-BeaSh76w.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 498.55KB 114.03KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.12KB 3.28KB
data-objectstack (index.js) 189.15KB 52.56KB
fields (index.js) 243.15KB 61.40KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 49.00KB 13.91KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.49KB 46.33KB
plugin-dashboard (index.js) 131.48KB 34.45KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 248.68KB 63.94KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.58KB 56.63KB
plugin-kanban (index.js) 55.38KB 15.72KB
plugin-list (index.js) 113.38KB 27.73KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.33KB 3.25KB
plugin-view (index.js) 84.46KB 20.80KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

ACCEPT — domain:devx @ objectui execution seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr, R46, reviewed 2026-09-07T17:55Z against GitHub and the tree, ⛔ never against the report's narrative.

⚠️ First: the dispatch's hypothesis was wrong, and the dev is right about why

The claim comment offered a hypothesis for the 24-vs-23 discrepancy — "the likeliest reconciliation is that one occurrence is a code SAMPLE inside a string" — and marked it as a hypothesis rather than a reading. It is false. Verified here on origin/main: apps/console/src/components/FormPage.predicateScope.test.tsx:76 sits inside a /** … */ block comment — #6580's own doc comment, which quotes the very vi.mock('@object-ui/app-shell') call it documents.

⭐ And the sharper half of the correction is the dev's: the number quoted in the same dispatch already refuted the hypothesis. The gate reports 3 embedded in a string literal tree-wide, and none of those three names @object-ui/app-shell (two are @object-ui/react samples in the gate's own header, one is ./dep in an eslint-rule test). Had the 24th been a string literal it would have appeared in that counter. The mechanism is different in kind: scanSource() blanks comments before CALL_RE runs, so a commented occurrence never becomes a call site and lands in no bucket at all. Measured: comment[offset] = 1, literal[offset] = 0.

⇒ No effect on scope — 23 was and is the right number, and 23 were converted. Only the explanation changes. ⭐ The reconciliation is now recorded in the gate's own header, which is the right home: it is a property of that file's masking behaviour, and it explicitly says that guessing embedded would have been wrong "in a way that reads plausible".

The count, reconciled all three ways

number what it counts why
22 distinct files — the card's own recipe unreachable as a site count: AppManagementPage.mutations.test.tsx carries two sites (vi.mock at :89, vi.doMock at :280)
23 call sites per scan() what this PR converted, one for one
24 vi.mock+vi.doMock occurrences, unmasked regex the extra one is the block comment above

The census moved exactly as far as the diff, and no further

625 judged / 625 inherit / 0 frozen; 35 other workspace → 648 / 648 / 0; 12 other workspace. Covered rose by 23, other-workspace fell by 23, and 648 + 12 = 660 both before and after ⇒ no site moved the other way and nothing joined the judged population except these. @object-ui/app-shell went 23 frozen → 0. COVERED_SPECIFIERS is 19 and the header's count was updated with it.

⭐ The one site that could have gone wrong, and the reason it did not

FormPage.predicateScope.test.tsx is the file #6580 removed importOriginal() from, because the barrel load cost 10204 ms of hop1SessionPrincipal's 15000 ms budget. This slice puts it back. That is the highest-risk edit in the PR and it is safe for a reason the file's own comment already contained: the module-scope import { InternalFormRoute } above is the first VALUE request for the specifier, so the factory — and the barrel load inside it — runs during the IMPORT phase, which no timeout bounds. #8173 measured it: hop1SessionPrincipal 9 ms → 8 ms.

⭐ The dev appended eight lines to that comment rather than leaving it asserting the opposite of the code beside it, and declared the addition as its one non-factory edit. Nothing was removed from it. Checked in the diff: the factory now spreads importOriginal() first, with the pre-existing vi.importActual submodule spreads after it, so every current override still wins.

Assertions

23 removed lines, every one a factory line — 15 plain multi-line vi.mock, 3 single-line, 2 async arrows returning an object literal, 2 with block bodies, 1 vi.doMock. The vi.doMock at :280 is named in the PR body as the odd site, as the dispatch required: it runs inside a test after vi.resetModules(), so its obtain sits in a bounded window rather than the import phase — measured harmless at 459 → 660 ms against a 5000 ms budget.

⭐ The ablation near-miss is the most valuable line in the report

The first ablation used perl -0pi -e, silently matched nothing, and exited 0 — leaving the file byte-identical to HEAD. It was caught only because the harness compares on-disk marker counts and blob hashes before reading any result, and it was reported rather than quietly retried. A green from an ablation that never mutated anything is the exact "clean number bought by not looking" failure this lane has now hit three times today in different disguises. The redone leg mutates by exact-string replacement with an asserted anchor count (marker 4 → 3, frozen-form 0 → 1, blob 673e5690… → cef53498…), the gate then exits 1 naming ApprovalsInboxPage.cellIdentity.test.tsx:123, and the restore is proven by observation (git diff HEAD empty, hash back to 673e5690…), not by an exit code.

Verification reproduces #8173's figures exactly — 22 files / 150 tests, and the console project at 89 files / 1069 tests — which is itself a cross-check between two independent runs a day apart. The changeset check was run, not guessed: it exited 1 first and demanded the declaration. One NOT-MEASURED datum is recorded rather than reported as a pass: type-check before the dependency build exits 2 with a wall of TS2307, which is the missing-dist class and not a red typecheck.

⭐ What this changes about the worklist, and it is more than one slice

The dev measured the tail rather than assuming it: @object-ui/plugin-view reads 10 judged / 10 inheriting / 0 frozen, and @object-ui/core reads 2 / 2 / 0. ⇒ Slices 15 and 16 are pure membership flips of COVERED_SPECIFIERS with no test edits at all — this slice was the last one carrying frozen sites, and the tree-wide figure across all 21 specifiers any vi.mock names is now 660 judged, 660 inherit, 0 frozen. ⛔ Correctly not folded in: the dispatch forbade it and one-specifier-per-slice keeps a regression bisectable. But the card's remaining shape is now two cheap flips, not two sweeps, and that goes on the card at release.

Not governed surface (--test on all 24 paths ⇒ NOT GOVERNED). PR stays draft; the flip is this seat's read.

Next: CI convergence → flip ready → post-flip guard → auto-merge SQUASH → queue confirmation → landing probe ('@object-ui/app-shell' present in COVERED_SPECIFIERS on re-fetched origin/main; control: the gate's own CI run on merged main prints 648 judged, 648 inherit, 0 frozen, 12 other workspace — a census that did not move would mean the member was added without the sweep) → LANDED here and on #6892, which stays open and is RELEASED back to pm:queue with its assignee cleared, per Refs #6892 (slice 14).


Generated by Claude Code

@baozhoutao
baozhoutao marked this pull request as ready for review September 7, 2026 18:30
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 7, 2026
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Armed: PR #8407 flipped ready at 2026-09-07T18:30:06Z on head 0d163da2a after CI converged all green (31 checks, Live E2E excluded, read 18:29:59Z); post-flip Governed Surface Queue Guard completed/success at 18:30:25Z; auto-merge SQUASH enabled; queued (added_to_merge_queue at 18:30:32Z, read 18:30:36Z).

Landing probe on merge, on re-fetched origin/main: '@object-ui/app-shell' present in COVERED_SPECIFIERS (19 members) and the header's own count reading nineteen. Control taken from the gate RUNNING on merged main, ⛔ not from a source grep — the post-merge Inert vi.mock Specifiers push run must print 648 call site(s) … judged (648 inherit, 0 auto-mocked); 12 other workspace. A census that did NOT move would mean the member joined COVERED_SPECIFIERS without its sweep — a member added by judgement rather than by sweep is the one thing that constant's grow-only rule exists to prevent, and it would read green either way from the outside. 648 + 12 = 660, the same total as 625 + 35 before, so the reading also proves no site moved the other way.

Then LANDED here and on #6892, which stays open and is RELEASED back to pm:queue with its assignee cleared (Refs #6892 (slice 14), ⛔ not Fixes) — with the note that its remaining tail is now two membership flips, not two sweeps: @object-ui/plugin-view reads 10 judged / 10 inheriting / 0 frozen and @object-ui/core reads 2 / 2 / 0. — domain:devx @ objectui seat, PM session session_01FhBNJcLRZLe8M87VcUgpKr.


Generated by Claude Code

Merged via the queue into main with commit 7876f58 Sep 7, 2026
34 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-6892-vi-mock-inherit-slice14-app-shell branch September 7, 2026 18:46
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

LANDED — merged into main at 2026-09-07T18:46:24Z as 7876f5855 (squash), read 18:46:32Z. #6892 stays open and is released — this PR carried Refs #6892 (slice 14), not Fixes.

Content probe on re-fetched origin/main (tip 7876f5855, read 18:48Z): '@object-ui/app-shell' is present in COVERED_SPECIFIERS, which now holds 19 members.

Control — read from the gate RUNNING on merged main, ⛔ not from a source grep. The post-merge push run (34152980787, head 7876f5855, step completed 18:46:38Z):

✅  check-vi-mock-inherit: OK (4458 tracked source file(s), 2724 test-named; 616 carry a mock;
    648 call site(s) on …, @object-ui/app-shell and their subpaths judged
    (648 inherit, 0 auto-mocked); 12 other workspace, 243 external, 879 local, …)

⇒ 648 judged / 648 inherit / 0 frozen / 12 other workspace, exactly the figure the Armed note named in advance. 648 + 12 = 660, the same total as the pre-change 625 + 35, so no site moved the other way and nothing joined the judged population except the 23 converted here.

⭐ Why that is the right control for a sweep slice rather than a formality: a member added to COVERED_SPECIFIERS without its sweep reads green from the outside just as happily — the gate would simply report the same census with one more name in the list. The census having risen by exactly 23 while other workspace fell by exactly 23 is what distinguishes "joined by sweep" from "joined by judgement", and that constant's grow-only rule exists precisely to forbid the second.

⭐ This was the last specifier in the tree carrying frozen sites. Across all 21 workspace specifiers any vi.mock call site names, the tree now reads 660 judged, 660 inherit, 0 frozen.


Generated by Claude Code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants