test(app-shell,scripts): plugin-charts and plugin-dashboard join COVERED_SPECIFIERS (objectui#6892 slice 2) - #8035
Merged
Conversation
…ashboard vi.mock factories objectui#6892 slice 2. The four frozen factories on `@object-ui/plugin-charts` (1 site) and `@object-ui/plugin-dashboard` (3 sites) now obtain the real module and spread it before their overrides, and both specifiers join `COVERED_SPECIFIERS` in `scripts/check-vi-mock-inherit.mjs` in the same commit — the gate's documented widening precondition. Counts re-derived on this tree through the guard's exported `scan()` with `covered` set to all 22 workspace specifiers, never by widening the constant: plugin-charts 1 judged / 1 frozen -> 0, plugin-dashboard 3 judged / 3 frozen -> 0, all-specifier population 315 -> 311 frozen with zero sites moving the other way. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Contributor
✅ Console Performance Budget
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
Size Limits
|
Contributor
|
Standing-down note — Generated by Claude Code |
baozhoutao
marked this pull request as ready for review
September 6, 2026 12:11
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #6892
The second slice of the
vi.mockinheritance worklist:@object-ui/plugin-charts(1 site) and@object-ui/plugin-dashboard(3 sites). Each factory now obtains the real module and spreads it before its own overrides, and both specifiers joinCOVERED_SPECIFIERSin the same PR — the widening precondition the gate's own header states, and the one objectui#6849's ruling forbids splitting.Verified at
35a32c092, on base689127723(which carries slice 1, PR #8020).Recordmappingstringtounknown.Re-derived per-specifier table — ⛔ not the card's
The card's table (
9ce20233f) is stale three ways now, and the third one is new to this slice:@object-ui/i18nmock factories inherit the real surface, and the recogniser stops mis-reading a nested generic (objectui#7337) #7889 (the old classifier over-reportedfrozen);@object-ui/i18nflip (PR test(app-shell,scripts):@object-ui/i18njoinsCOVERED_SPECIFIERS(objectui#7337) #7920) and slice 1 (PR test(console,app-shell,scripts): three 1-site specifiers joinCOVERED_SPECIFIERS(objectui#6892 slice 1) #8020);@object-ui/plugin-chartsis not on that table at all — not because the classifier hid it, but because its only call site did not exist yet.ObjectView.chartConfigForward-7891.test.tsxwas added by38158c6bbon 2026-09-06, a week after the9ce20233fsnapshot of 2026-08-30. Measured with a two-leg check:git cat-file -e 9ce20233f:PATHexits 128 for that file and 0 for a control path that resolves at the same commit. A slice scoped from the table alone would have swept@object-ui/plugin-dashboard, flipped both lines, and left a frozen site behind on the specifier it had just declared covered.Everything below was measured on this branch with the repaired classifier, by slice 1's method:
scan()is exported and takes acoveredoption, so the table comes from a scratchpad script and the constant in the tree was never widened-and-reverted.This slice's two, before and after:
@object-ui/plugin-charts@object-ui/plugin-dashboardThe whole population, over the 22 workspace specifiers any call site in the tree names:
Zero sites moved the other way, and this is a measurement rather than a claim: the per-specifier rows for the other 20 specifiers are byte-identical between the two runs (
diffof the two tables with the two changed rows removed exits 0).The remaining 311 stay on the worklist.
@object-ui/authat 102 is the largest by yield;@object-ui/app-shellat 23 still reads #6580 first.The conversion, per file
All four take the shape already used by their neighbours —
ObjectView.chartConfigForward-7891.test.tsxhas a@object-ui/plugin-viewfactory two lines below that is line-for-line this spelling, andReportView.dataSourceObjectKey.test.tsxhas the@object-ui/plugin-reportfactory slice 1 converted immediately above. The spread is the first property in all four, so every test's own stub still shadows the real export exactly as before.packages/app-shell/src/views/ObjectView.chartConfigForward-7891.test.tsx@object-ui/plugin-chartsObjectChart,ChartRendererpackages/app-shell/src/views/DashboardView.modalTarget.test.tsx@object-ui/plugin-dashboardDashboardRendererpackages/app-shell/src/views/DashboardView.rootTitleRetired.test.tsx@object-ui/plugin-dashboardDashboardRendererpackages/app-shell/src/views/ReportView.dataSourceObjectKey.test.tsx@object-ui/plugin-dashboardDrillDownDrawerNone of the four is a deliberate freeze. Each was read against the "prove the module is NOT loaded" shape the gate's header carves out, and each is an ordinary stub-the-renderer factory that captures props and asserts on them.
DrillDownDraweris a bare null-returning stub, but the file never asserts that it was absent — its two null assertions are about a query record, not about an export.Behaviour preservation
Spreading the real module means each mock now returns exports it previously omitted, so this was checked rather than assumed, on PR #6847's criteria:
Object.keysorintest to read.src/, notdist/. The rootvitest.config.mtsaliases@object-ui/plugin-chartsand@object-ui/plugin-dashboardto their packagesrc/, so the real module is read from source and no build stands between the edit and the run.⭐ One real behavioural difference, recorded rather than glossed. Unlike slice 1's three, both of these barrels have module-scope side effects:
packages/plugin-charts/src/index.tsxandpackages/plugin-dashboard/src/index.tsxeach make 8ComponentRegistry.registercalls. Inheriting means those calls now run in these four files, where the frozen factory used to suppress them. The suite is green either way, and the cost is not measurable: the four files together ran 28.99s frozen and 29.88s inheriting.DashboardView.modalTarget.test.tsxcarried a comment claiming the stub "keeps this file out of the ComponentRegistry-heavy setup". That sentence is false after this change, so it is corrected in the same commit rather than left to mislead the next reader — the only edit in this PR that is not a factory or a constant.Reverse verification — two legs, four times
Committed first, then mutated: the restore leg points at
HEAD, andHEADcarries the implementation. Each leg proves itself on disk — the mutation by counting the deleted spread marker and the injected frozen form, the restore bygit hash-objectequal to the HEAD blob and an emptygit diff HEAD. Restore runs from atrapon EXIT INT TERM with absolute paths built fromgit rev-parse --show-toplevel.Leg A — re-freeze one factory, keep its specifier covered. The gate goes RED, exit 1, naming that site and no other (four separate runs; the "total site lines reported" count was 1 each time, so the red is precise, not a shower):
each with
the factory never obtains the real module.Leg B — restore. Blobs
a278550d7,2e4cab260,291f2981b,d066f8194, each equal to HEAD's,git diff HEADempty, gate exit 0 each time.This is what makes the two new
COVERED_SPECIFIERSlines load-bearing rather than decorative: without them Leg A stays green, because an unlisted specifier is never judged. The whole ablation was re-run at the final HEAD after the comment correction moved one blob, so none of the hashes above is stale.The guard's own pin needed no edit
Expected to redden and did not, so it is recorded rather than assumed — same as slice 1. Every membership assertion in
scripts/__tests__/check-vi-mock-inherit.test.tsis derived from the constant rather than spelling it, and both new members resolve to a realpackages/NAME/package.json, so all 69 cases pass unchanged.The flip side of that derivation is filed separately as #8018 and is not addressed here: the only membership pin that resists removal names
@object-ui/i18nalone.Gates
All at
35a32c092, exit codes captured by redirect-then-capture (never through a pipe).pnpm check:vi-mock-inherit233 call site(s) on @object-ui/react, @object-ui/i18n, @object-ui/plugin-markdown, @object-ui/data-objectstack, @object-ui/plugin-report, @object-ui/plugin-charts, @object-ui/plugin-dashboard judged (233 inherit, 0 auto-mocked)— was 229 on fivevitest run scripts/__tests__/check-vi-mock-inherit.test.ts+ the 4 converted filesTest Files 5 passed (5),Tests 89 passed (89)(69 pin + 20 converted)vitest run packages/app-shell/Test Files 632 passed (632), `Tests 6077 passedpnpm check:vi-mock-specifiersOK (4356 tracked source file(s) ... 868 relative specifier(s) resolved)pnpm type-check:scriptstsc -p tsconfig.scripts.jsonpnpm check:control-bytesOK (scanned 6448 tracked text file(s); skipped 85 binary)grep -naPcontrol-byte self-scan of all 6 changed pathsnode scripts/check-changeset-presence.mjs4 source file(s) of 1 released package(s) changed ... Every one of them has an EMPTY frontmattercheck-changeset-fixed/-no-major/-overwritecheck-lint-coverage.mjs46/46 packages linted, 0 with outstanding errorsnode scripts/check-governed-queue-guard.mjs --test(all 6 paths)NOT GOVERNED — 6 path(s) checked against 5 governed surface(s); none matchedtsc --noEmit(src)tsc -p tsconfig.test.json--listFilesprogram of 4421 files names all four edited test files (1 hit each)eslint .(full, not narrowed)--format json; 0 warnings on any added line (the 4/13/6/7 warnings on those files are pre-existingno-explicit-anyon their own any-typed props)The changeset declares an empty frontmatter: the four edited files are test files under a released package's
src/, and nothing published changes. objectui has noskip-changesetlabel, so this is the whole answer to that gate.Scope of "affected" was derived, not guessed.
TURBO_SCM_BASE=689127723 turbo ls --affectednames four packages:app-shell(run in full above) plusconsole,example-byo-backend-consoleandexample-console-starter, which the dependency graph pulls in. Those three are declared to CI rather than run here, on a reachability check: nothing outsidepackages/app-shellreferences any of the four edited test files (one hit, a comment inside app-shell itself, against a control search returning 9 files), and a.test.tsxedit cannot be imported by another package. The dependency closure had to be built before the type-check meant anything — the first run showed 1279 TS2307s that were the unbuilt closure, not the diff; afterpnpm --filter '@object-ui/app-shell^...' buildboth swept packages'dist/index.d.tscarry this worktree's own build timestamps, so the type-check read local artifacts rather than a replayed foreign cache.Live E2E (informational)is red on every branch today for an upstream reason (#7990 / objectstack#16186) and is not this PR's.Generated by Claude Code