Repository navigation
docs(i18n): state the import rule the placeholder-spelling suite actually obeys - #8418
Conversation
`fallback-placeholder-spelling-3512.test.ts`'s header claimed the file "imports nothing outside its own package". It has imported `@object-ui/test-support/defaults-table-scan` since objectui#7884, when the defaults-table walk moved there so this gate and objectui#4401's would ask their question of one population -- a change the same header already described correctly a hundred lines further down. The sentence is load-bearing: it is the stated reason this file may live in `@object-ui/i18n` rather than move to `app-shell` like `defaults-maps-mirror-en-pack.test.tsx`. Read as written it declares a rule the file itself breaks, so the paragraph now states the invariant that actually holds -- DIRECTION, not absence -- as three checks a new import has to pass: the imported package must not depend on `@object-ui/i18n` (test-support declares no `@object-ui/*` dependency at all and is `private: true`); it must be reached through a declared `exports` subpath, not a deep path into another package's tests; and it must not reach a consumer (devDependency, imported from `__tests__/`, which this package's build tsconfig excludes). Comment-only. No assertion, no runtime source and no gate changed. Fixes #8029 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
✅ 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
|
|
ACCEPT — ⭐ The finding of this review: a sub-premise of the CARD and of TRIAGE is false, and copying it would have written a new false sentence into a card about a false sentenceBoth #8029's body and its triage comment cite " #7310 (PR #8028) put the rule inside this package, and ⇒ ⭐ That is the whole hazard of a stale-prose card, hit at one remove: the fix instructions were themselves stale. It is also why the parity file's own header records that the The rule was derived from the tree, and it checks outThe dev concluded the real invariant is direction, not absence, with three applicable checks — Direction / Reach / Ship. The load-bearing step is the disproof of "no cross-package import": the sibling Verified independently by this seat: Reach and Ship were likewise taken from things already written down — Comment-only, measured rather than asserted
⭐ And the new paragraph ends by stating that nothing mechanical holds it to the import list above. That is the same discipline #8414 showed three hours ago: the cause that let the old sentence survive is unchanged, and the file says so rather than leaving a "now covered" impression behind a rewritten paragraph. The declared deviation is handled correctlyThe commit message carries a The four-axis answer refused the tempting option, and priced itOption D — add a gate binding the comment to the import list — is acknowledged as long-term strongest on axis 2 and then rejected on axis 4: a new checker guarding a defect class this repo has seen once, structurally fragile (comment rewordings are unbounded, so the matcher is either too loose or noisy), with no pull. ⛔ No card was filed to build it either, since the card itself says no gate moves. ⭐ The cost of that refusal is stated out loud in the file rather than hidden — which is what makes it a decision instead of an omission. A changeset is owed and present, with empty frontmatter (declared as releasing nothing) — measured both ways: Next: CI convergence → flip ready → post-flip guard → auto-merge SQUASH → queue confirmation → landing probe (the header states the direction rule and the
Generated by Claude Code |
|
Armed: PR #8418 flipped ready at 2026-09-07T21:33:00Z on head Landing probe on merge, on re-fetched Control: Then LANDED here and on #8029, which closes via Generated by Claude Code |
|
LANDED — merged into Content probe on re-fetched
Control on the merged tip: ⭐ Each check is anchored to something already in the tree rather than invented for the paragraph: check 2 cites the
Generated by Claude Code |
Fixes #8029
Comment-only. One paragraph of
packages/i18n/src/__tests__/fallback-placeholder-spelling-3512.test.ts's header, plus a changeset declaring no release. No assertion, no runtime source, no gate moved.The falsification, verified on
origin/mainat4b5e07a53before editingThe header's
## Why this file lives in @object-ui/i18n when two of its surfaces do notsaid, of this file:The file's actual import list today (lines 136-143):
The
@object-ui/test-supportimport arrived with objectui#7884, when the defaults-table walk moved there so this gate and objectui#4401's would ask their question of one population — which the same header already describes correctly a hundred lines further down. So the sentence was false, and self-contradicted within one document.What the file actually obeys, and how that was derived from the tree
The sentence is load-bearing: it is the stated reason this file may live in
@object-ui/i18nrather than move toapp-shelllikedefaults-maps-mirror-en-pack.test.tsx. So it is rewritten rather than deleted, and the invariant it now states is direction, not absence.Derivation — four measurements on this tree:
packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsximports@object-ui/plugin-detail,@object-ui/plugin-list,@object-ui/plugin-designer— and@object-ui/test-support/defaults-table-scan, the very same import. The shared import is therefore provably not the discriminator.@object-ui/i18n, so importing them from inside i18n inverts the dependency:plugin-detail—dependenciesplugin-designer—dependenciesplugin-list—peerDependenciesanddevDependencies@object-ui/test-supportdeclares no@object-ui/*dependency in any of its four fields, and isprivate: true, never published — no path back to@object-ui/i18nexists. (plugin-detailandplugin-listthemselves take it as a devDependency, which puts it below both.)defaults-table-scan.ts's own header records that parking the walk in either caller "would either invert a dependency or force a deep subpath import into another package'ssrc/__tests__/, the shape objectui#4325 ruled out";packages/i18n/tsconfig.jsonexcludes**/__tests__/**from the emitting program (check:published-tsconfig-exclude); andcheck-phantom-dependencies.mjsjudges that same tooling tier against dev dependencies rather than runtime ones, "on the ground that no consumer ever resolves such a file".⇒ The rewritten paragraph states it as three checks a new import has to pass — direction (the imported package must not depend on
@object-ui/i18n, directly or transitively), reach (a declaredexportssubpath, never a deep path into another package's tests), ship (a devDependency, imported from a file under__tests__/) — and keeps separate the property that is still true and still load-bearing: the gated surfaces (defaults tables, needle files) are read as text and parsed, never imported. Only the walk that discovers them is an import.A premise in the card that did not survive contact with the tree
The card's "Shape of a fix" and the triage comment both name "
scripts/placeholder-spelling.mjs-shaped helpers (since #7310)" as a second example of a dependency pointing away. No such file exists. objectui#7310 (PR #8028) put the rule inpackages/i18n/src/__tests__/placeholder-spelling-rule.ts— inside this package — andscripts/__tests__/placeholder-spelling-parity.test.tsreaches into it by relative path. That file's own header records why thescripts/-side option was measured and rejected in both directions (TS2307 / ERR_MODULE_NOT_FOUND one way, TS7016 for lack ofallowJsthe other). The rewritten paragraph therefore does not cite it.⛔ Not covered by any gate
Comment accuracy is not mechanically checkable here, which is how the old sentence survived objectui#7884 for as long as it did. This PR does not change that, and the paragraph now says so in its last line rather than leaving an implied "now covered". Adding a gate for it was not in scope and no obvious one exists.
Changeset
node scripts/check-changeset-presence.mjsasks for one (the edited file is under a released package'ssrc/), so.changeset/i18n-header-import-rule-8029.mdcarries an empty frontmatter — the explicit "releases nothing" declaration, which is a first-class pass, not a workaround. Not guessed: the gate went fromEXIT=1toEXIT=0on adding it.Verification (real output; heavy runs through the shared lock)
packages/i18n— the package that owns the edited file:Dependency-closure build + this package's type-check, whose
tsconfig.test.jsonincludessrc/**/*.test.ts, so the edited file is a program input rather than merely adjacent to one:The four suites elsewhere in the tree that name this file, run explicitly rather than assumed unaffected:
Repo lint, run in full rather than narrowed:
Gates:
The last two are not incidental: they are the two gates the new paragraph cites, re-run so the citations are true as of this commit. Exit codes captured before any pipe.
Every changed line in the
.tsfile is a block-comment line — measured, not asserted:git diff HEAD~1 -- <that file> | grep -E '^[+-]' | grep -v '^[+-][+-][+-]' | grep -vcE '^[+-] \*'returns 0.Status
Stays draft by dispatch instruction; the governed-surface guard reports this diff as not governed.
🤖 Generated with Claude Code
Generated by Claude Code
Generated by Claude Code