Skip to content

A translated validation or operation message written with {{ label }} (spaces inside the braces) prints the braces, because the spec's own interpolator still reads only {{label}} #38266

Done

Description

@objectstack-fleet

repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

Filing gate: ① (a) out-of-scope finding from the #38092 card thread (pre-claim report /mnt/project-files/card-38092/pre-claim-report-bd5407ec.md), measured on objectstack origin/main bd5407e. Same defect class as #38092; split off by the seat's claim ruling (comment 7237673531, scope A).

维护者速读

Measured (origin/main bd5407e)

  • renderValidationMessage and renderOperationMessage (packages/spec/src/system/validation-message.ts, operation-message.ts) ask t(key) for the override template WITHOUT params, then fill it with interpolateValidationMessage (validation-message.ts ~387), whose pattern is {{ + word + }} with no whitespace.
  • Probe (vitest, same run as the Server-side t() leaves {{ name }} (with spaces) unreplaced while the Console replaces it, so a translation written in that form shows raw braces in server messages #38092 premise probe): validation override {{ label }} is needed for required answered "{{ label }} is needed"; operation override {{ field }} taken for duplicate_record_field answered "{{ field }} taken". The Console's i18next fills both spellings.
  • reach: core import runner (renderValidationMessage with the request's translator) and objectql duplicate-record errors (renderOperationMessage) — a 400 / 409 answer a user reads.

Ask

  1. interpolateValidationMessage accepts optional whitespace inside the braces, matching the two server t() after Server-side t() leaves {{ name }} (with spaces) unreplaced while the Console replaces it, so a translation written in that form shows raw braces in server messages #38092 and the Console.
  2. A placeholder with no value stays exactly as written (spaces included), as today's "left verbatim" contract says.
  3. Pin: the override path for both renderers with {{ label }}, {{label}}, and a missing-value spaced hole.

Acceptance

  • A translated validation or operation message written with {{ label }} is filled on the server.
  • Expected declaration: Clause-②: yes (widening), Metadata-protocol: semantic, @objectstack/spec minor; touches packages/spec/src/**, so contract review at CONTRACT_REVIEW_TIER.

Grading: area:ux · domain:spec · Bug · p2, the same grade as #38092 (a 400 / 409 answer a user reads shows raw braces). Source: fleet.
Dedupe words: interpolateValidationMessage spaced, validation message override {{ label }}, operation message translation whitespace.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:spec
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibwBjX6kCcDLzx2jrwn
    Account: os-tesla
    Branch: claude/project-thread-e91f9t
    Worktree: objectstack-issue-38266
    Domain: spec
    Area: o3-ux (area:ux p2, a seat card thread)
    Seat: repo:objectstack#3
    Seat rulings on the pre-claim report (/mnt/project-files/card-38266/pre-claim-report-c06dac7c.md, main c06dac7):

    • Premise holds: interpolateValidationMessage (validation-message.ts ~392) reads only {{word}}, and both override paths (validation-message.ts ~471, operation-message.ts ~1049) use it, so {{ label }} and {{ field }} print as written.
    • Route: the same pattern and missing-value behaviour as PR fix(i18n): server t() fills {{ name }} holes written with spaces, as the Console does #38265 (/\{\{\s*(\w+)\s*\}\}/g; a hole with no value stays exactly as written), with the same expectations for all five spellings. The files do not overlap with fix(i18n): server t() fills {{ name }} holes written with spaces, as the Console does #38265 and neither waits on the other.
    • The optional sixth file is in: the fake translator in override-once.test.ts follows the same \s* pattern and gains a case with {{ label }} inside a value.
      File surface:
    • packages/spec/src/system/validation-message.ts (the pattern and its comment).
    • packages/spec/src/system/operation-message.ts (comment only).
    • The two renderer test files, and override-once.test.ts (fake translator plus one case).
    • One .changeset/*.md (@objectstack/spec minor).
      Stop on breach and explain in the report.
      Container & model: S, mode:thread, model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier: "no path-derived mandate"), effort: high, reason: the thread session serves this tier (get_session last_served_model)
      Writes: the PR only through the relay pr_create; comments, labels and bodies only through the relay write tools; report both numbers.
      Clause-②: yes (widening)
      Metadata-protocol: semantic
      Skills-docs: none (reason in the pre-claim report)
      Review owed: L2 contract review at CONTRACT_REVIEW_TIER before the queue, plus L1-a.
      Responsibility: a deployment that translates a validation or operation message with {{ label }} (spaces inside the braces, the spelling the Console accepts) gets the value filled on the server instead of raw braces in a 400 or 409 answer.
      Premise: holds, read on origin/main c06dac7 (probe in the pre-claim report)
      Serial constraints cleared: none — disjoint from PR #38265; overlap-check before the first push
      Readings owed in the report: the five-spelling table on both renderers before and after, built-in catalog output byte-for-byte unchanged, one ablation, the derived gates.
  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibwBjX6kCcDLzx2jrwn
    os-dev-report

    {
      "issue": 38266,
      "status": "done",
      "branch": "claude/project-thread-e91f9t",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38275",
      "session": "session_01L9qibwBjX6kCcDLzx2jrwn",
      "premise_still_valid": true,
      "summary": "interpolateValidationMessage (packages/spec/src/system/validation-message.ts) now matches {{ + optional whitespace + word + optional whitespace + }}, the same pattern and missing-value write-back as the two server t() in PR #38265, so a deployment override of a validation message (validation.field.KEY) or an operation message (errors.KEY) written with {{ label }} is filled on the server instead of printed with braces. A hole with no value is still written back exactly as matched; single braces stay literal; \\w+ is kept (dotted paths and i18next format suffixes stay a shared pre-existing gap, per seat ruling on the record-3 note of the #38265 contract review). Built-in catalog output is byte-for-byte unchanged. Six files per claim 7238167595: the interpolator and its docblocks, an operation-message docblock, the two renderer test files, the override-once test (fake translator pattern + a spaced placeholder inside a value), and a spec minor changeset.",
      "tests": "Head 89321cb5. pnpm --filter @objectstack/spec test under os-verify-lock: VERDICT command-exit 0, Test Files 911 passed (911), Tests 28869 passed | 1 todo. pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0. spec build (dts on): VERDICT command-exit 0. Targeted: validation-message.test.ts + operation-message.test.ts + validation-message.override-once.test.ts, 3 files, 163 passed. Readings before (c06dac7c) and after (89321cb5), five spellings through each renderer's override path, params {name: Ada}: {{name}} -> Hi Ada! both; {{ name }} -> as written before, Hi Ada! after, both renderers; tab+two spaces -> as written before, Hi Ada! after; {name} -> as written both; {{ missing }} -> as written both. Built-in catalogs: every key of every locale of BUILTIN_VALIDATION_MESSAGES and BUILTIN_OPERATION_MESSAGES rendered with all placeholders filled and with none, 1176 lines, sha256 0ac2410ac500f5da98689261a6ad07cfecf6b0e355b8c4b05cd5758ef68657ca before and after, cmp identical. Ablation via scripts/ablation-replace.mjs in a detached worktree at HEAD (pattern reverted to the no-whitespace form; spec tests import src, no dist in the path): 8 failed / 155 passed across the 3 files (spaced and tab spellings on the function and both override paths, and Qty is needed); restore blob 965a5ad4 == HEAD blob. The new override-once spaced-value case stays green under the ablation by design (it pins a single pass).",
      "gates": "dispatch-gates --commands (87 derived, tree c06dac7c merge-base) run locally after the final commit at 89321cb5, exit codes in gates-ran-89321cb5.list; dispatch-gates --ran: 87 derived, 87 run, 0 NOT-MEASURED, 0 UNRUN. Three first exited 3 (check:doc-formula-expressions, check:dual-build-cjs-loads, check:lean-entry-closure) and passed exit 0 after the packages turbo build (VERDICT command-exit 0). check-platform-checklist --changed-from origin/main exit 0 (0 anchored files). overlap-check VERDICT clean exit 0 (shares two files with #38185, merges cleanly). PR check-runs on 89321cb5: 58 success, 11 skipped, 0 failed (incl. Check Changeset, Lint & Repo Gates, Test Core 1-10/10, Type Check workspace/consumer/source/debt, Spec property liveness, Governed Surface Queue Guard, PR-body guards).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "6 — read only: issue_read x3 (get, get_comments x2), pull_request_read x3 (get_diff #38265, get #38275, get_check_runs #38275); plus subscribe_pr_activity (not a GitHub write)",
      "api_writes": "3 — relay pr_create (#38275), this os-dev-report comment on #38266 (post-stamped), relay issue_patch on #38275 body (acceptance note per seat ruling + final readings)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · i18next fills {{a.b}} and {{x, number}} while the server \\w+ reads neither; seat ruled no widening here, same as #38265, noted in Acceptance notes only"
      ]
    }

    Generated by Claude Code

  5. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
    2026-11-28T13:00Z · 收口:PR #38275 于 12:59Z 经合并队列合入,本卡随 Fixes 关闭;去掉 pm:dispatched。

  6. removed
    pm:dispatched
    on Nov 28, 2026
  7. added a commit that references this issue on Dec 1, 2026
    4fd11b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:specpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions