test(app-shell,scripts): @object-ui/i18n joins COVERED_SPECIFIERS (objectui#7337) - #7920
Merged
Merged
Conversation
… (objectui#7337)
The last frozen `vi.mock('@object-ui/i18n', …)` factory in the tree —
`DeclaredActionsBar.test.tsx` — now obtains the real module and spreads it, so
the specifier's frozen population is zero and it joins the gate's covered set in
the same PR, which is what the gate's own header requires of a widening.
Three steps, in the only order that works: converting first, then flipping.
Flipping while a frozen factory remains fails `check:vi-mock-inherit` on the
very next run.
Measured on this branch, before -> after: `@object-ui/i18n` 92 judged / 91
inherit / 1 frozen -> 92 judged / 92 inherit / 0 frozen; across all 39 workspace
specifiers 315 -> 314 frozen with zero sites moving the other way. The gate's
verdict line now reads 223 call sites judged (131 + 92), all inheriting.
The pin file loses the case that recorded WHY the specifier was not covered yet
and gains its positive half: dropping a member of the covered set makes every
call site on it unjudged, so the gate would stay green over a population it no
longer looks at. One census case that spelled a single specifier was really
asserting the SET'S SIZE, and is now derived from `COVERED_SPECIFIERS` itself.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
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
|
baozhoutao
marked this pull request as ready for review
September 6, 2026 03:19
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.
Fixes #7337
The ruled follow-up (option A) to PR #7889: the
@object-ui/i18nslice of thecheck-vi-mock-inheritratchet is finished, so the gate — not a pin file — nowholds that specifier's frozen population at zero.
Three steps, one PR, in the only order that works. Converting first and flipping
second is not stylistic: with a frozen factory still in the tree the flip fails
check:vi-mock-inheriton the very next run.packages/app-shell/src/views/__tests__/DeclaredActionsBar.test.tsx— the oneremaining frozen
vi.mock('@object-ui/i18n', ...)factory obtains the realmodule and spreads it, keeping the three overrides the suite needs
(
useObjectLabel,useObjectTranslation,pickLocalized). Same spelling asits already-converted sibling
DeclaredActionsBar.overrideAffordance.test.tsx.scripts/__tests__/check-vi-mock-inherit.test.ts— the case that recorded WHYthe specifier was not covered yet is deleted, along with the two expectations
that encoded the un-flipped state (the held-file carve-out, and a census
expectation that allowed one non-inheriting site).
scripts/check-vi-mock-inherit.mjs—@object-ui/i18njoinsCOVERED_SPECIFIERS, and the header stops saying the covered set has exactlyone member.
Measured, before and after, on this branch
84ce0b80d)4c871b0e3)@object-ui/i18njudged call sitesThe one frozen site before was
DeclaredActionsBar.test.tsx:65, exactly as therelease comment predicted. Zero sites moved the other way: the frozen sets
were diffed per site (file plus mocked specifier, line deliberately omitted
because an edit above a site shifts its line without moving its verdict), and the
only difference is that one site leaving.
Note for whoever re-derives these: the all-specifier population here is taken over
all 39
@object-ui/*workspace packages, read out ofpackages/*/package.json.The last reading on the merged head used a 21-specifier set and reported 312
frozen / 627 covered. The delta is entirely definitional —
inheritsagrees at315 in both — so the extra 3 are frozen sites on specifiers the narrower set never
named, not a change in the tree.
Gate verdict line after the flip:
223 = 131 on
@object-ui/reactplus 92 on@object-ui/i18n.Reverse verification, two legs
Both legs: commit first, mutate, prove the bytes reached disk by counting the
injected and the deleted text, run, restore with
git checkout HEAD -- PATH,prove the restore by an empty
git diff HEADand a blob hash equal to HEAD's.Restore runs from a
trapon EXIT/INT/TERM with absolute paths.Leg A — re-freeze the factory, keep the flip. The gate goes RED, exit 1,
naming the site:
Restored blob
67cdf539b,git diff HEADempty.Leg B — drop the specifier from the covered set, keep the conversion. This is
the non-vacuity check for the one case this PR ADDS, and it measures the exact
failure mode that case exists for: the gate stays GREEN (exit 0, 131 judged
instead of 223) because every
@object-ui/i18ncall site becomes unjudged — aratchet retiring in silence. The pin file is what reddens, with exactly one
failing case, the new one:
Restored blob
1cea0ddf4,git diff HEADempty.One case changed beyond the three steps, and why
puts the census in the verdictbuilt its expected string from a file-localconstant naming a single specifier, while the gate's verdict line joins the whole
covered set. It read as an assertion about the verdict line and was really an
assertion about the set's SIZE — measured: it was the only failure on the first
run after the flip. It now derives the names from
COVERED_SPECIFIERSitself, sothe next widening does not pay for it. The rest of the death pin (legs 1/2/3, the
non-vacuity control, the replay case and the JSON-reporter verdicts) is untouched:
69 cases before, 69 after.
Gates, each with its own printed verdict
Exit codes captured by redirect-then-capture, never through a pipe.
check:vi-mock-inheritOK ... 223 call site(s) ... judged (223 inherit, 0 auto-mocked)check:vi-mock-specifiersOK (4331 tracked source file(s) ... 844 relative specifier(s) resolvedpnpm exec vitest run scripts/__tests__/check-vi-mock-inherit.test.tsTest Files 1 passed (1)·Tests 69 passed (69)pnpm exec vitest run scripts/__tests__/Test Files 107 passed (107)·Tests 3220 passed (3220)pnpm exec vitest run packages/app-shell/src/views/__tests__/DeclaredActionsBar.test.tsxTest Files 1 passed (1)·Tests 33 passed (33)pnpm type-check:scripts--listFilesnames the pin file exactly oncepnpm --filter @object-ui/app-shell type-checktsconfig.test.json --listFilesnames the converted file oncepnpm check:control-bytesOK (scanned 6396 tracked text file(s); skipped 85 binary)pnpm lint:rootpnpm exec eslint .pnpm lint:coverage46/46 packages linted, 0 with outstanding errorspnpm check:unreferenced-sourcesEvery shipped source file in every covered package is reachablenode scripts/check-changeset-presence.mjspnpm changeset:checkmajornode scripts/check-governed-queue-guard.mjs --testNOT GOVERNED— 4 paths, none matchedEvery heavy run went through
scripts/pm/os-verify-lock.sh; verdicts read from itsVERDICT command-exitline, never a bare shell status. The dependency closure wasbuilt first (
pnpm --filter '@object-ui/app-shell^...' build) — without ittype-checkfails on missing sibling declaration files, which reads exactly likea break this diff caused.
Union re-run at the final commit
4c871b0e3, working tree clean.Scope
Four files: the converted test, the pin file, the gate, and one
empty-frontmatter changeset. No other specifier is swept — objectui#6892 stays
serial behind this card. No exemption table and no per-site allowlist; the pin
that forbids one still passes.
Part of the worklist tracked in objectui#6892. Related: PR #7889, PR #7846.
Generated by Claude Code