Repository navigation
fix(spec): a translated validation or operation message fills {{ label }} holes written with spaces, as the Console does - #38275
Conversation
… }} holes written with spaces interpolateValidationMessage now allows whitespace inside the braces, the way the Console's i18next and the server t() read the same translation string. A placeholder with no value is still left exactly as written. Built-in catalog output is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwBjX6kCcDLzx2jrwn
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 79ebb9bb6674e761c3bc718a210f07ce4e2df5b8 && git checkout 79ebb9bb6674e761c3bc718a210f07ce4e2df5b8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e2a0e90025059d066dff4b067a8b70d23bca2680 89321cb5a826805ba80f58592786f8d1737a3799 && git checkout -B drift-repro e2a0e90025059d066dff4b067a8b70d23bca2680 && git merge --no-ff 89321cb5a826805ba80f58592786f8d1737a3799
node scripts/docs-audit/affected-docs.mjs --json e2a0e90025059d066dff4b067a8b70d23bca2680 |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 89321cb · 2026-11-28T11:44Z |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: Read for this record: card #38266 with its claim 7238167595 and os-dev-report 7238709250; PR #38275 body, comments, file list and the net diff from merge base ① Derived judgments
② Semver levelRight. The changeset gives ③ Boundary flags
④ Design judgment
Findings:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The brief the contract reviewer above was handed, filled, for the seat to read before it adopts the record: Contract review brief — PR #38275 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1-a ACCEPT at Contract. The published-schema face is Claim against surface (claim 7238167595). The six files are the two interpolators, their three test files (including the override-once case) and one changeset. They match the claim. Sibling rules. The rules match #38265's record ③ character for character. The pattern is Changeset, read sentence by sentence: it holds. Evidence (report 7238709250). Spec: 911 files, 28869 cases. 87/87 gates ran. Ablation: 8 red, then restored. Checks at this head: 73, with 60 success, 13 expected skip, 0 failed, 0 pending. mergeable clean. Relation. Landing order (record N1). The new docblocks say the spaced form matches "the server Note for the seat, outside the record. The changeset's summary line has a bare |
|
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Landing · 2026-11-28T11:55Z · zone
|
Requested by Tesla · project thread
Fixes #38266
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Clause-②: yes (widening)
Metadata-protocol: semantic
Skills-docs: none — skills/objectstack-i18n already teaches the double-brace {{variable}} form; the spaced form is tolerated to match the Console and the server t(), not a new form to teach
维护者速读
What changes
packages/spec/src/system/validation-message.ts:interpolateValidationMessagematches{{, optional whitespace, a word, optional whitespace,}}(/\{\{\s*(\w+)\s*\}\}/g, the same pattern as the two servert()in fix(i18n): server t() fills {{ name }} holes written with spaces, as the Console does #38265). A placeholder with no value is still written back exactly as matched, spaces included; single braces ({name}) are still not a placeholder. The function docblock and the module's## Interpolationsection say so.packages/spec/src/system/operation-message.ts: docblock only; it shares the interpolator.renderValidationMessage,renderOperationMessage) and built-in paths go through this one function, so both catalogs change together.@objectstack/specminor (Metadata-protocol: semantic: in a deployment's override translation,{{ label }}now means a placeholder instead of literal text).Not changed: core and service-i18n (#38265), ui, locale packs, HotCRM, skills. Signature unchanged, so
api-surface/export-originsdo not move.Tests
validation-message.test.ts: the five spellings oninterpolateValidationMessageand on therenderValidationMessageoverride path, plus{{ label }} is neededrenderingQty is needed.operation-message.test.ts:{{ field }} takenrenderingEmail takenon therenderOperationMessageoverride path, plus the five spellings.validation-message.override-once.test.ts: the fake translator follows the same\s*pattern (it modelsFileI18nAdapter.t), and a new case pins that a written VALUE containing{{ label }}is still printed as written (one pass, no re-expansion).Five spellings through each renderer's override path (params
{ name: 'Ada' }; Console column measured with i18next 26.4.0 on the #38092 card):Hi {{name}}!Hi Ada!Hi Ada!Hi Ada!Hi {{ name }}!Hi Ada!Hi {{ name }}!Hi Ada!Hi Ada!Hi Ada!Hi {name}!Hi {name}!Hi {name}!Hi {name}!Hi {{ missing }}!Hi {{ missing }}!Hi {{ missing }}!Hi {{ missing }}!Acceptance notes
origin/mainc06dac7cbefore any edit: avalidation.field.requiredoverride{{ label }} is neededrendered as written, and anerrors.duplicate_record_fieldoverride{{ field }} takenrendered as written.BUILTIN_VALIDATION_MESSAGESandBUILTIN_OPERATION_MESSAGES, rendered once with every placeholder filled and once with none, 1176 lines, sha2560ac2410a…68657cabefore and after (cmpidentical). No built-in template carries a spaced hole.interpolateValidationMessageis insidepackages/spec(the two renderers); other packages call only the renderers.{{a.b}}) and format suffixes ({{x, number}}), which this interpolator and the two servert()in fix(i18n): server t() fills {{ name }} holes written with spaces, as the Console does #38265 still read as literal text (the name stays\w+); per the seat's ruling on the fix(i18n): server t() fills {{ name }} holes written with spaces, as the Console does #38265 contract review (7238665113), neither card widens it, so all three server interpolators handle it the same way.Verification
pnpm --filter @objectstack/spec exec vitest run src/system/validation-message.test.ts src/system/operation-message.test.ts src/system/validation-message.override-once.test.tsshows 3 files, 163 passed.interpolateValidationMessageinvalidation-message.ts(the one changed line), then the new spaced-value case invalidation-message.override-once.test.ts.Local readings at 89321cb
scripts/ablation-replace.mjs(pattern reverted to/\{\{(\w+)\}\}/g, tests run onsrc, no dist in the path): 8 failed (spaced and tab spellings on both renderers and on the function, andQty is needed), 155 passed; restore blob965a5ad4== HEAD. The new spaced-value case inoverride-oncestays green under the ablation by design: it pins one pass, which holds with either pattern.overlap-check.mjsVERDICT clean exit 0 against origin/main e2a0e90 (shares two files with feat(runtime): POST /packages/:id/move-in moves a selection of loose items into a package, each through the save door #38185, merges cleanly).pnpm --filter @objectstack/spec build(dts on),typecheck: VERDICT command-exit 0;pnpm --filter @objectstack/spec test: Test Files 911 passed (911), Tests 28869 passed, 1 todo.dispatch-gates --ran(gates-ran-89321cb5.list): 87 derived, 87 run, 0 NOT MEASURED, 0 unrun. Three first exited 3 for a missing build (check:doc-formula-expressions,check:dual-build-cjs-loads,check:lean-entry-closure) and exited 0 after the packages turbo build.{{ label }}(spaces inside the braces) prints the braces, because the spec's own interpolator still reads only{{label}}#38266 comment 7238709250.Generated by Claude Code