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
{{ message }}
Repository navigation
Commit 33a1af0
Browse filesBrowse the repository at this point in the historyBrowse files
fix(spec): a translation item is named in snake_case, the locale tag goes in locale
`TranslationItemSchema.name` called the locale tag (`zh-CN`) the conventional
item name, which the save door's item-name grammar refuses. The describe, its
comment, the generated reference row and the sync's skip warning now say
snake_case (`zh_cn`) with the BCP-47 tag in `locale`. The door and the
read-side fallback keep their behaviour; a door pin covers both names.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzhKYT8L13Bgj8icT3i
fix(spec): `TranslationItemSchema.name` no longer tells authors to name a translation item after its locale tag
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The `name` describe said a translation item was "conventionally the locale code (`zh-CN`)", but the metadata save door's item-name grammar refuses `zh-CN` (uppercase and a hyphen), so an author or agent following the describe got a 400 `INVALID_REQUEST` on the first save. The describe now says a translation item is named in snake_case like every metadata item (e.g. `zh_cn`), with the BCP-47 tag in `locale`. The save door and the runtime sync's read-side name fallback for rows stored before `locale` became required are unchanged; the sync's skip warning now points authors at `locale` only.
// Undeclared, they were stripped on every parse, so the metadata door quietly
2221
2221
// discarded an item's own name on the way through.
2222
2222
//
2223
-
// Not snake_case-constrained the way `job.name` is: translation items are
2224
-
// conventionally named after their locale (`zh-CN`), and the runtime sync
2225
-
// reads `row.name` as a locale fallback for exactly that reason. Optional
2226
-
// because `locale`, not `name`, is this type's required identity — that call
2227
-
// was deliberate (a skipped item is invisible) and is not being reopened.
2228
-
name: z.string().optional().describe('Item name — conventionally the locale code (`zh-CN`); the runtime sync falls back to it when `locale` is absent'),
2223
+
// Named like every other metadata item: snake_case (`zh_cn`), with the BCP-47
2224
+
// tag in `locale`. The save door's item-name grammar
2225
+
// (`METADATA_ITEM_NAME_PATTERN`) refuses a tag-shaped name such as `zh-CN`,
2226
+
// so this shape does not re-check it. The runtime sync still reads a
2227
+
// tag-shaped `row.name` as a locale fallback, but only for rows stored before
2228
+
// `locale` became required. Optional because `locale`, not `name`, is this
2229
+
// type's required identity — that call was deliberate (a skipped item is
2230
+
// invisible) and is not being reopened.
2231
+
name: z.string().optional().describe('Item name — snake_case like every metadata item (e.g. `zh_cn`); the BCP-47 tag goes in `locale`'),
2229
2232
label: z.string().optional().describe('Human-readable label shown in metadata lists'),
2230
2233
2231
2234
// ADR-0010 — runtime protection envelope (internal — set by the loader).
0 commit comments