You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli,lint): read only the declared label spelling for section headings (#5730) (#6616)
`record:details` sections and form-view sections declare exactly one heading
key — `label`. #5611 settled this by declaring `label` on
`RecordDetailsProps.sections[]` and deliberately NOT declaring `title`;
`FormSectionSchema` has only ever declared `label`.
Two consumers still read `label ?? title`:
- packages/cli/src/utils/i18n-extract.ts (addSectionList)
- packages/lint/src/validate-translatable-sections.ts
Both now read `label` only. Per Prime Directive #12 the tolerance is the bug:
a consumer that reads an undeclared spelling turns it into a second de-facto
contract. The extractor is the worst place for it — it WRITES translation
bundles, so it would seed a bundle key from a spelling the schema rejects and
teach that key to every translator downstream.
Zero migration: all ~12 `record:details` sections in this repo (three showcase
pages plus packages/platform-objects/src/pages/sys-user.page.ts) already author
`label`; no real authoring surface spells `title`.
Fixtures are triaged individually rather than re-spelled in bulk (#5046):
- i18n-section-coverage.test.ts:220 — re-spell (`title:` -> `label:`).
- validate-translatable-sections.test.ts — replace wholesale. That test
pinned exactly the deleted limb, so after the change it would keep passing
because NOTHING is produced, not because the logic is right.
Both replacements are written as PAIRS so neither can pass vacuously: the
`label` case proves the walk reaches the site, and the `title` case's empty
result therefore reads as "the tolerance is gone" rather than "the fixture
never arrived". The cli pin additionally asserts the section's expected key is
still emitted (it derives from `name`) while its inline source text is empty.
Claude-Session: https://claude.ai/code/session_011M7UwH25Unfi73UHim7ajY
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments