Symptom
A stack declaring two emailTemplates with the same name and different locale (an i18n bundle) does not materialize all rows. The registry logs [Registry] Overwriting email_template: packageId:name and only 3 of 4 authored templates reach sys_email_template — the en-US twin is dropped. The spec states that multiple rows with the same name but different locale form an i18n bundle, so both should coexist.
Root cause
packages/objectql/src/registry.ts (~line 1826) computes the storage key without locale:
const storageKey = packageId ? + "${packageId}:${baseName}" + : baseName;
A second row with the same name but a different locale collides on that key and overwrites the first (the [Registry] Overwriting ... path at ~line 1828). Locale is not part of any item key, so the registry cannot hold an i18n bundle for a single name. This contradicts the spec's own "same name + different locale = i18n bundle" statement. The key computation is generic to every item type, so nothing email-specific rescues it.
Stale-premise check: identical in src, in the executed dist, and on origin/main (byte-for-byte with the 92f26f75 pin) — not fixed upstream.
Reproduction
- Author a stack declaring two
emailTemplates with the same name, one locale: 'en-US' and one locale: 'zh-CN'.
- Boot; watch the registry log and query
sys_email_template.
Expected: both locales materialize as an i18n bundle. Actual: [Registry] Overwriting email_template is logged and only the last-registered locale survives.
Source
Extracted from the QA run #7690 (framework 92f26f7, console 09987b680).
Symptom
A stack declaring two
emailTemplateswith the samenameand differentlocale(an i18n bundle) does not materialize all rows. The registry logs[Registry] Overwriting email_template: packageId:nameand only 3 of 4 authored templates reachsys_email_template— the en-US twin is dropped. The spec states that multiple rows with the same name but different locale form an i18n bundle, so both should coexist.Root cause
packages/objectql/src/registry.ts(~line 1826) computes the storage key without locale:const storageKey = packageId ?+ "${packageId}:${baseName}" +: baseName;A second row with the same name but a different locale collides on that key and overwrites the first (the
[Registry] Overwriting ...path at ~line 1828). Locale is not part of any item key, so the registry cannot hold an i18n bundle for a single name. This contradicts the spec's own "same name + different locale = i18n bundle" statement. The key computation is generic to every item type, so nothing email-specific rescues it.Stale-premise check: identical in
src, in the executeddist, and onorigin/main(byte-for-byte with the92f26f75pin) — not fixed upstream.Reproduction
emailTemplateswith the samename, onelocale: 'en-US'and onelocale: 'zh-CN'.sys_email_template.Expected: both locales materialize as an i18n bundle. Actual:
[Registry] Overwriting email_templateis logged and only the last-registered locale survives.Source
Extracted from the QA run #7690 (framework 92f26f7, console 09987b680).