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
i18n: i18n.defaultLocale is both the users' default language and the authoring (source) language — an English-authored app that defaults users to zh-CN gets 446 false "missing en" lint gaps and loses its zh-CN coverage check #33232
Found by a downstream app on the published 18.4.0 packages (steedos-labs/os-project-blackcat-crm#67, PR #72).
Symptom
The app's metadata is authored in English (inline labels), with zh-CN / es-ES / ja-JP packs. Setting i18n.defaultLocale: 'zh-CN' (so users without a personal locale, and the boot seed, get Chinese) makes objectstack lint --strict read the inline text as zh-CN source: it reports 446 missing translation for locale "en" and stops seeing real zh-CN gaps (downstream ablation: removing a zh-CN account description → 0 zh-CN gaps reported). The app works around nothing in metadata but has to run objectstack lint --strict --default-locale en to keep its Chinese pack checked.
Why it matters
"Which language do users get by default" and "which language is the inline metadata written in" are different facts for any app sold into a market other than its authors'. One key carrying both forces apps to either keep a wrong user default or pass a lint flag that every other reader of the setting (i18n extract / check, docs) does not know about.
Suggested fix shape (for the lane to judge)
A separate source-language key (e.g. i18n.sourceLocale, defaulting to defaultLocale for compatibility) read by lint / os i18n extract / check as the authoring language, while defaultLocale stays the users' default.
Row:i18n.defaultLocale is used both as the users' default language and as the authoring language, so an English-authored app that defaults users to zh-CN gets 446 false "missing en" lint gaps and loses its zh-CN coverage check. One key carries two facts, and the lint gives wrong answers (p2).
Claim: PM loop round 1 (seat 2, tenure of 2026-11-14 14:23Z)
Session: session_017xRBcSbLCxEmyHf9upz3pz (the cloud dev reports its own session id)
Account: sunhaolin
Branch: claude/issue-33232-source-locale
Worktree: objectstack-issue-33232 (cloud container)
Domain: domain:spec
Seat: domain:spec#2
File surface: packages/spec/src/system/translation.zod.ts (the i18n config schema, its describe and alias table) and what the spec gates regenerate from it; the readers that take i18n.defaultLocale as the authoring language: packages/cli/src/utils/i18n-coverage.ts, packages/cli/src/commands/lint.ts, packages/cli/src/commands/i18n/check.ts, packages/cli/src/commands/i18n/extract.ts, packages/cli/src/utils/i18n-bundle-extract.ts, packages/lint/src/i18n-walk.ts (only where measured to read it); a runtime or objectql label reader only where measured to treat the inline text as defaultLocale text (named in the report before it is touched); their tests; the i18n docs page under content/docs; .changeset/33232-*.md (stop on breach; explain in the report)
Container & model: M, mode:cloud (packages/spec/src/** plus another package = build heavy), model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② suspect, so the review is owed at CONTRACT_REVIEW_TIER), effort: high
Clause-②: yes
Metadata-protocol: added
Responsibility: objectstack: the CLI lint / i18n check / extract read i18n.defaultLocale as the inline text's language (packages/cli/src/utils/i18n-coverage.ts:609) | the --default-locale flag only, which no other reader of the setting knows | a downstream app on 18.4.0 (steedos-labs/os-project-blackcat-crm#67) hits it today
Thread-read: 6874060759
Premise: holds (read at e540baf887: computeI18nCoverage takes opts.defaultLocale ?? declared.defaultLocale as the locale the inline label is the text of)
Serial constraints cleared: none (no open PR and no pm:dispatched claim touches the surface; #33231 (domain:ui, console user default) shares no file)
Ruling-ref: none on the card; grep of the surface hits rulings unrelated to the source locale (#5728, #14412, #14749, #26170 on key families)
Relayed verbatim by the seat. The cloud dev session_017xRBcSSA3H2jkpZCNuJyw2 ended its turn with this report, but its session's auto-mode classifier refused both of its GitHub writes (the relay pr_create and this comment). The seat opened the draft PR #33357 from the pushed branch at 34ec0e4f.
{
"issue": 33232,
"status": "blocked",
"branch": "claude/issue-33232-source-locale",
"pr": null,
"session": "session_017xRBcSSA3H2jkpZCNuJyw2",
"premise_still_valid": true,
"summary": "Implemented and pushed at 34ec0e4f. TranslationConfigSchema gains an optional i18n.sourceLocale: the same LocaleSchema as defaultLocale, and like defaultLocale it is not required to be in supportedLocales. The near-miss keys sourceLanguage, authoringLocale and authoringLanguage are answered with sourceLocale. One CLI reading, resolveSourceLocale (sourceLocale, else defaultLocale, else 'en', in packages/cli/src/utils/i18n-coverage.ts), feeds computeI18nCoverage (os lint, os i18n check) and os i18n extract. --default-locale stays the override on all three, and its help text now says it overrides the source locale. With no sourceLocale, every reader behaves as before. BLOCKED: this session's auto-mode classifier refused both GitHub writes ('Undermining Oversight'): the relay pr_create (draft, Fixes #33232) and the os-dev-report comment on #33232 through post-stamped.mjs. Neither was retried or re-routed, so there is no PR and no report comment. The seat (or the maintainer) needs to open the draft PR from claude/issue-33232-source-locale and post this report. Assumption 1 is confirmed: i18n-coverage.ts:609 and extract.ts:269 both took --default-locale ?? i18n.defaultLocale ?? 'en' as the inline text's locale; lint and check pass the flag into computeI18nCoverage; lint's i18n-walk.ts reads no defaultLocale; i18n-bundle-extract.ts takes the resolved value from extract.ts. Assumption 2 was measured. It is false for zh-CN users: they are served the zh-CN row, because the requested locale's own bundle is read first. It holds in the other direction for en users (see out_of_scope_findings).",
"tests": "At 34ec0e4f, each exit captured on its own: pnpm --filter @objectstack/cli typecheck exit 0. pnpm --filter @objectstack/cli exec vitest run --project unit exit 0 (Test Files 417 passed (417), Tests 5959 passed (5959)). pnpm --filter @objectstack/spec test exit 0 (Test Files 840 passed (840), Tests 26838 passed, 1 todo). pnpm --filter @objectstack/spec typecheck exit 0 at 7a9b2d47; spec has not changed since. The first CLI unit run at 7a9b2d47 failed one pin, test/i18n-bundle-extract-exports.pin.test.ts, which holds the extractor's export set to its list from before the walk moved; 34ec0e4f fixes it by moving resolveSourceLocale into i18n-coverage.ts. New tests. translation.test.ts: sourceLocale is optional, is canonicalised, a non-tag is refused at sourceLocale, and the 3 near-miss keys are answered. i18n-coverage.test.ts, new top-level describe: in the downstream shape there are zero en findings and exactly one zh-CN gap (description), a warning normally and an error under strict; the platform baseline is satisfied for the source locale; the override wins; with the key absent the report deep-equals the pre-change reading. i18n-extract.test.ts: resolveSourceLocale's order; en is filled from the source, the zh-CN row is kept and the zh-CN gap left empty. Ablation via scripts/ablation-replace.mjs, mutating resolveSourceLocale to stop reading sourceLocale (mutation landed: anchor 1 to 0, blob 705326d2 to 1e0784fc): Tests 5 failed | 47 passed. Restored to blob 705326d2 == HEAD, git diff HEAD empty. The tests import src/, so no dist leg was needed. Runtime probe (not kept): the built @objectstack/spec/system translateObject with {locale:'en', fallbackChain:['zh-CN'], defaultLocale:'zh-CN'} returns 客户 for inline label Account; with fallbackChain ['en'] it returns Account.",
"gates": "dispatch-gates --commands (no paths) at 7a9b2d47 derived 115 commands: the seat's 78 plus 37 from the actual diff. All 115 exit 0. Four first runs exited 3 (missing prerequisites, not findings) and were cleared. check-plugin-teardown-shape --self-test needed a commit missing from the shallow clone; after git fetch --depth=1 of 621a4876 it exits 0 (48 cases). spec check:skill-examples, check:dual-build-cjs-loads and check:i18n-coverage needed a full build; after turbo build (119/119 tasks) each exits 0, and i18n-coverage reports 'OK (14 config(s), 423 baselined untranslated string(s), none new)'. spec check:generated first exited 1: the references were stale, and check:test-typecheck's tsc died without diagnostics under the default heap. After gen:docs and with NODE_OPTIONS=--max-old-space-size=4096 it exits 0. dispatch-gates --ran with exit codes at 34ec0e4f: 'Run reconciliation — 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero, no exit 3). Declared narrowing for the last commit (a function move inside packages/cli): CLI rebuilt, the 56 commands derived for its 4 files rerun at 34ec0e4f, all 56 exit 0. Local-only gates: pnpm check:dev-prereqs exit 0, pnpm check:skill-frame-freshness exit 0. CI check-runs: NOT MEASURED, because no PR exists (pr_create was refused).",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "0 — both attempted writes were refused by the classifier before anything was sent: relay pr_create (scripts/pm/fleet-write/dispatch.mjs) and the issue comment on #33232 (scripts/pm/post-stamped.mjs). git push is not a REST write.",
"line_budget": "346 changed lines (+318 / -28) over 14 files vs merge base e540baf88; under the 3000 human-merge threshold",
"files_changed": [
".changeset/33232-i18n-source-locale.md",
"content/docs/deployment/cli.mdx",
"content/docs/references/system/translation.mdx",
"content/docs/ui/translations.mdx",
"packages/cli/src/commands/i18n/check.ts",
"packages/cli/src/commands/i18n/extract.ts",
"packages/cli/src/commands/lint.ts",
"packages/cli/src/utils/i18n-bundle-extract.ts",
"packages/cli/src/utils/i18n-coverage.ts",
"packages/cli/test/i18n-coverage.test.ts",
"packages/cli/test/i18n-extract.test.ts",
"packages/spec/authorable-surface/system.json",
"packages/spec/src/system/translation.test.ts",
"packages/spec/src/system/translation.zod.ts"
],
"deviations": [
"The classifier refused both external writes ('Undermining Oversight'). (1) node scripts/pm/fleet-write/dispatch.mjs --repo objectstack-ai/objectstack --actions-file pr-actions.json --json: op pr_create, draft forced, head claude/issue-33232-source-locale, base main, assignees [sunhaolin], body first line 'Fixes #33232'. (2) node scripts/pm/post-stamped.mjs --comment=33232 --file=report-comment.md. Neither was retried or re-routed. The drafted PR body (Fixes line; Clause-② / Metadata-protocol / Skills-docs lines; 维护者速读 six lines; What changes / Tests / Acceptance notes / Verification) and the report comment exist only in this container's scratchpad (issue-33232/pr-body.md, issue-33232/report-comment.md).",
"Declared file-surface breach: content/docs/deployment/cli.mdx, one row. Its os lint --default-locale row said 'Defaults to the config's i18n.defaultLocale', which this change makes false. Per os-dev rule 3, a published sentence this change makes false is fixed in the same PR.",
"The dispatch asked for the PR body to end with an HTML-comment signed trailer. os-dev forbids HTML comments in GitHub text a dev writes, and os-dev wins on a conflict, so the drafted body carries a plain-text 'Signed:' line and a code-spanned 'signed:' last line instead.",
"The gate rerun for the last commit was narrowed to the 56 commands derived for the moved files, because that commit only moves a function. The full 115 ran at 7a9b2d47.",
"Clause-② was measured on the built declaration closure: packages/spec/dist (system/index.d.ts and the translation / stack chunks) gains TranslationConfig.sourceLocale, which is a widening. The CLI helper cannot be reached through @objectstack/cli's exports map ('.', './console', './hook-body'). This agrees with the claim's 'Clause-②: yes', copied verbatim with no arm; '(widening)' would also fit.",
"The shared primary checkout /home/user/objectstack was detached at e540baf8 so the branch could be checked out in the worktree /home/user/objectstack-issue-33232. The worktree is kept, because no PR has been opened yet."
],
"open_questions": [
{
"question": "Runtime half: should the serving layer also read sourceLocale, so that skipping the fallback chain for the authored label follows the inline text's language rather than the users' default?",
"options": [
"A — open a follow-up card. II18nService gains an optional getSourceLocale/setSourceLocale; AppPlugin threads i18n.sourceLocale ?? defaultLocale; metaTranslateOptions and the objectql / plugin-email option-label seams pass it as ResolveOptions.defaultLocale (or a renamed sourceLocale). Cost: a contract widening across about 8 packages, medium work.",
"B — keep sourceLocale tooling-only and document the fallbackLocale: 'en' workaround, which is what this PR does. Cost: nothing now, but en users in the downstream shape keep getting zh-CN rows until the stack declares fallbackLocale."
],
"recommendation": "A, as its own domain:spec / runtime card. The docs promise that what the gate counts as covered is what gets served, and with sourceLocale declared and no fallbackLocale that promise breaks for the source locale."
},
{
"question": "os i18n check --json keeps the field name defaultLocale for the resolved source locale, so the output stays the same for stacks without the key. Should a later change add a sourceLocale field (always present)?",
"options": [
"A — keep as is; the CoverageReport doc comment and the changeset document it",
"B — add sourceLocale beside defaultLocale, which adds one field to every --json output"
],
"recommendation": "A for this PR; B only if a --json consumer asks for it."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"class: a · reach: named producer — packages/rest/src/meta-item-read-gate.ts metaTranslateOptions builds {locale, fallbackChain:[getFallbackLocale()], defaultLocale:getDefaultLocale()}, and the REST metadata reads spread it into @objectstack/spec/system translateObject. Measured on the built resolver with that shape, for a stack with defaultLocale 'zh-CN' and no fallbackLocale: an en request for an object with inline label 'Account' and a zh-CN row '客户' answers '客户', so an English user is served Chinese ahead of the English inline text. With fallbackLocale 'en' declared it answers 'Account'. The HTTP door (GET /api/v1/meta/object/NAME with Accept-Language en) was not booted. This exists today, independent of this PR. Seam: spec:ResolveOptions.defaultLocale ('the language its metadata labels are authored in') → runtime:metaTranslateOptions (getDefaultLocale) · dedupe words: i18n fallback chain authored label source locale · en request served zh-CN bundle · ResolveOptions defaultLocale authoring language",
"carrier: skills lane (domain:skills) · Skills-docs follow-up owed: skills/objectstack-i18n/SKILL.md needs a sourceLocale row in its i18n key table (line 45), and its --default-locale mention (line 419) needs updating · noted, not filed"
]
}
Round 2, relayed verbatim by the seat from the cloud dev session_017xRBcSSA3H2jkpZCNuJyw2 (its final message at 2026-11-15T04:28Z). On the seat's order, the dev made no GitHub writes this round.
{
"issue": 33232,
"status": "done",
"branch": "claude/issue-33232-source-locale",
"pr": "https://github.com/objectstack-ai/objectstack/pull/33357",
"session": "session_017xRBcSSA3H2jkpZCNuJyw2",
"premise_still_valid": true,
"summary": "Rework round 2 for contract-review record 6882834204, pushed as c703b3bd and 18a92291 on top of 34ec0e4f. Head is 18a92291; nothing was pushed after it. Per the seat, the delta review is PASS (record 6889064772, nits only) and CI is green (58 success, 10 skipped). Should-fix, finding 1, first remedy: a new shared helper, withGatedDefaultLocale (packages/cli/src/utils/i18n-coverage.ts), appends the declared users' defaultLocale on a stack that declares sourceLocale; on a stack without sourceLocale it returns its input unchanged. computeI18nCoverage applies it in the three arms that read the config: supportedLocales, bundles only, and monolingual. An explicit --locales list is left as the whole set. os i18n extract applies the same helper to the locales it emits when no --locales is given, and its --locales help says so. The jsdoc sentence the review found false is now true and stated precisely. Nits from record 6882834204: the sourceLocale .describe() now carries the caveat that the serving layer does not read the key yet, and the reference is regenerated. 'non-default locales' became 'non-source locales' in the check --strict help, the lint --i18n-strict help (and its row in content/docs/deployment/cli.mdx) and the check closing hint. The changeset and the translations doc each gained one sentence for the gated default. origin/main was not merged: no conflict.",
"tests": "At 18a92291, run under the lock as one && chain, VERDICT command-exit 0: pnpm --filter @objectstack/cli build; pnpm --filter @objectstack/cli typecheck; pnpm --filter @objectstack/cli exec vitest run --project unit (Test Files 417 passed (417), Tests 5967 passed (5967)); pnpm --filter @objectstack/spec typecheck; spec src/system/translation.test.ts (Tests 231 passed (231)). Targeted run: test/i18n-coverage.test.ts plus test/i18n-extract.test.ts, Tests 60 passed (60). New pins: a top-level describe in i18n-coverage.test.ts. It covers the record's shape { defaultLocale: 'zh-CN', sourceLocale: 'en', supportedLocales: ['en', 'es-ES'] } with no zh-CN bundle (all 3 zh-CN gaps, nothing else); supportedLocales: [] with an es-ES bundle (locales en, es-ES, zh-CN; 3 zh-CN gaps); supportedLocales: [] with no bundle (locales en, zh-CN; 3 zh-CN gaps); an explicit --locales list left as the whole set; and key absent: nothing added, and the report deep-equals the --default-locale reading from before the change. i18n-extract.test.ts covers the helper's append and identity cases and an extract that scaffolds zh-CN for a stack that left it out of supportedLocales. Ablation via scripts/ablation-replace.mjs: withGatedDefaultLocale was made to always return its input (mutation landed: anchor 1 to 0, blob 33b59697 to ed582a71). Result: Tests 5 failed | 55 passed (60). Restored to blob 33b59697 == HEAD, git diff HEAD empty. The tests import src/, so no dist leg was needed.",
"gates": "dispatch-gates --commands (no paths) at 18a92291: 115 commands. All 115 run at 18a92291, and all 115 exit 0 (each captured before any pipe), including spec check:generated, check:docs, check:authorable-surface and check:i18n-coverage ('OK (14 config(s), 423 baselined untranslated string(s), none new)'). dispatch-gates --ran with recorded exit codes: 'Run reconciliation — 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero, no exit 3). Local-only: pnpm check:skill-frame-freshness exit 0, pnpm check:dev-prereqs exit 0, node scripts/check-nul-bytes.mjs exit 0. PR #33357 CI on 18a92291, as relayed by the seat and not re-read here: 58 success, 10 skipped.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "0 — push only (git push is not a REST write); the seat relays this report. One REST read: GET issues/comments/6882834204.",
"line_budget": "PR total vs merge base e540baf88: 517 changed lines (+478 / -39), 14 files, under the 3000 threshold. This round, 34ec0e4f..18a92291: 11 files, +170 / -21.",
"files_changed": [
".changeset/33232-i18n-source-locale.md",
"content/docs/deployment/cli.mdx",
"content/docs/references/system/translation.mdx",
"content/docs/ui/translations.mdx",
"packages/cli/src/commands/i18n/check.ts",
"packages/cli/src/commands/i18n/extract.ts",
"packages/cli/src/commands/lint.ts",
"packages/cli/src/utils/i18n-coverage.ts",
"packages/cli/test/i18n-coverage.test.ts",
"packages/cli/test/i18n-extract.test.ts",
"packages/spec/src/system/translation.zod.ts"
],
"deviations": [
"Accepted on the seat's instruction: the remaining nits of delta review record 6889064772 are left unfixed. I did not read that record this round.",
"The extract half is pinned at the shared helper (withGatedDefaultLocale) and at extractTranslations fed by that helper. The command's own one-line call site in extract.ts is not run by a unit test, because no unit test runs the oclif extract command in-process; spawning it belongs to the integration tier, which is left to CI.",
"The key-absent console text changed in one place, as ordered: the os i18n check closing hint now reads 'Non-source locales have gaps but the source locale is fully covered.'. The key-absent report and findings are unchanged (pinned by test).",
"The PR body was not updated (dev does not PATCH it). It still describes round 1; the seat's rewrite should add the gated-default behaviour and the round-2 readings."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: seat (domain:spec#2) · the follow-up card for open question 1 is owed and not filed: the serving layer should read sourceLocale. metaTranslateOptions passes getDefaultLocale() as ResolveOptions.defaultLocale, so in the downstream shape with no fallbackLocale an en request is served the zh-CN row (evidence in round-1 report 6881427009).",
"carrier: skills lane (domain:skills) · the Skills-docs follow-up is owed and not filed: skills/objectstack-i18n/SKILL.md needs a sourceLocale row (the i18n key table at line 45) and an update to its --default-locale mention (line 419)."
]
}
Seat note: both out-of-scope findings were filed before this relay, as #33634 (serving layer) and #33635 (skills).
ACCEPT → PR #33357 comment 6890005293 · head bbf55f56 · readied and auto-merge armed 2026-11-15T05:54Z (relay run 43683034684). This seat follows it to MERGED.
PR #33357 merged at 2026-11-15T06:32Z (merge commit 0be91f0e79), and this card closed as completed. pm:dispatched is removed in this stroke. The follow-ups are #33634 (the serving layer, domain:server) and #33635 (skills docs, domain:skills, already in pm:queue).
Activity
objectstack-fleet commentedon Nov 14, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: first touch →
domain:spec· p2 ·pm:queue· 2026-11-14T07:47Z⛔ Not a claim.
i18n.defaultLocaleis used both as the users' default language and as the authoring language, so an English-authored app that defaults users to zh-CN gets 446 false "missing en" lint gaps and loses its zh-CN coverage check. One key carries two facts, and the lint gives wrong answers (p2).i18n.defaultLocale(served as discoverylocale.default) #33231's reading of the user default. A downstream app hit it.objectstack-fleet commentedon Nov 14, 2026
domain:spec#2 · sunhaolin · session_017xRBcSbLCxEmyHf9upz3pz
Claim: PM loop round 1 (seat 2, tenure of 2026-11-14 14:23Z)
Session:
session_017xRBcSbLCxEmyHf9upz3pz(the cloud dev reports its own session id)Account:
sunhaolinBranch:
claude/issue-33232-source-localeWorktree:
objectstack-issue-33232(cloud container)Domain:
domain:specSeat:
domain:spec#2File surface:
packages/spec/src/system/translation.zod.ts(the i18n config schema, its describe and alias table) and what the spec gates regenerate from it; the readers that takei18n.defaultLocaleas the authoring language:packages/cli/src/utils/i18n-coverage.ts,packages/cli/src/commands/lint.ts,packages/cli/src/commands/i18n/check.ts,packages/cli/src/commands/i18n/extract.ts,packages/cli/src/utils/i18n-bundle-extract.ts,packages/lint/src/i18n-walk.ts(only where measured to read it); a runtime or objectql label reader only where measured to treat the inline text asdefaultLocaletext (named in the report before it is touched); their tests; the i18n docs page undercontent/docs;.changeset/33232-*.md(stop on breach; explain in the report)Container & model:
M,mode:cloud(packages/spec/src/**plus another package = build heavy),model: default tier (dispatch-gates --tier: no path-derived mandate; Clause-② suspect, so the review is owed at CONTRACT_REVIEW_TIER),effort: highClause-②: yes
Metadata-protocol: added
Responsibility:
objectstack: the CLI lint / i18n check / extract read i18n.defaultLocale as the inline text's language (packages/cli/src/utils/i18n-coverage.ts:609) | the --default-locale flag only, which no other reader of the setting knows | a downstream app on 18.4.0 (steedos-labs/os-project-blackcat-crm#67) hits it todayThread-read: 6874060759
Premise: holds (read at
e540baf887:computeI18nCoveragetakesopts.defaultLocale ?? declared.defaultLocaleas the locale the inline label is the text of)Serial constraints cleared: none (no open PR and no
pm:dispatchedclaim touches the surface; #33231 (domain:ui, console user default) shares no file)Ruling-ref: none on the card; grep of the surface hits rulings unrelated to the source locale (#5728, #14412, #14749, #26170 on key families)
objectstack-fleet commentedon Nov 14, 2026
domain:spec#2 · sunhaolin · session_017xRBcSbLCxEmyHf9upz3pz
os-dev-report
Relayed verbatim by the seat. The cloud dev
session_017xRBcSSA3H2jkpZCNuJyw2ended its turn with this report, but its session's auto-mode classifier refused both of its GitHub writes (the relaypr_createand this comment). The seat opened the draft PR #33357 from the pushed branch at34ec0e4f.{ "issue": 33232, "status": "blocked", "branch": "claude/issue-33232-source-locale", "pr": null, "session": "session_017xRBcSSA3H2jkpZCNuJyw2", "premise_still_valid": true, "summary": "Implemented and pushed at 34ec0e4f. TranslationConfigSchema gains an optional i18n.sourceLocale: the same LocaleSchema as defaultLocale, and like defaultLocale it is not required to be in supportedLocales. The near-miss keys sourceLanguage, authoringLocale and authoringLanguage are answered with sourceLocale. One CLI reading, resolveSourceLocale (sourceLocale, else defaultLocale, else 'en', in packages/cli/src/utils/i18n-coverage.ts), feeds computeI18nCoverage (os lint, os i18n check) and os i18n extract. --default-locale stays the override on all three, and its help text now says it overrides the source locale. With no sourceLocale, every reader behaves as before. BLOCKED: this session's auto-mode classifier refused both GitHub writes ('Undermining Oversight'): the relay pr_create (draft, Fixes #33232) and the os-dev-report comment on #33232 through post-stamped.mjs. Neither was retried or re-routed, so there is no PR and no report comment. The seat (or the maintainer) needs to open the draft PR from claude/issue-33232-source-locale and post this report. Assumption 1 is confirmed: i18n-coverage.ts:609 and extract.ts:269 both took --default-locale ?? i18n.defaultLocale ?? 'en' as the inline text's locale; lint and check pass the flag into computeI18nCoverage; lint's i18n-walk.ts reads no defaultLocale; i18n-bundle-extract.ts takes the resolved value from extract.ts. Assumption 2 was measured. It is false for zh-CN users: they are served the zh-CN row, because the requested locale's own bundle is read first. It holds in the other direction for en users (see out_of_scope_findings).", "tests": "At 34ec0e4f, each exit captured on its own: pnpm --filter @objectstack/cli typecheck exit 0. pnpm --filter @objectstack/cli exec vitest run --project unit exit 0 (Test Files 417 passed (417), Tests 5959 passed (5959)). pnpm --filter @objectstack/spec test exit 0 (Test Files 840 passed (840), Tests 26838 passed, 1 todo). pnpm --filter @objectstack/spec typecheck exit 0 at 7a9b2d47; spec has not changed since. The first CLI unit run at 7a9b2d47 failed one pin, test/i18n-bundle-extract-exports.pin.test.ts, which holds the extractor's export set to its list from before the walk moved; 34ec0e4f fixes it by moving resolveSourceLocale into i18n-coverage.ts. New tests. translation.test.ts: sourceLocale is optional, is canonicalised, a non-tag is refused at sourceLocale, and the 3 near-miss keys are answered. i18n-coverage.test.ts, new top-level describe: in the downstream shape there are zero en findings and exactly one zh-CN gap (description), a warning normally and an error under strict; the platform baseline is satisfied for the source locale; the override wins; with the key absent the report deep-equals the pre-change reading. i18n-extract.test.ts: resolveSourceLocale's order; en is filled from the source, the zh-CN row is kept and the zh-CN gap left empty. Ablation via scripts/ablation-replace.mjs, mutating resolveSourceLocale to stop reading sourceLocale (mutation landed: anchor 1 to 0, blob 705326d2 to 1e0784fc): Tests 5 failed | 47 passed. Restored to blob 705326d2 == HEAD, git diff HEAD empty. The tests import src/, so no dist leg was needed. Runtime probe (not kept): the built @objectstack/spec/system translateObject with {locale:'en', fallbackChain:['zh-CN'], defaultLocale:'zh-CN'} returns 客户 for inline label Account; with fallbackChain ['en'] it returns Account.", "gates": "dispatch-gates --commands (no paths) at 7a9b2d47 derived 115 commands: the seat's 78 plus 37 from the actual diff. All 115 exit 0. Four first runs exited 3 (missing prerequisites, not findings) and were cleared. check-plugin-teardown-shape --self-test needed a commit missing from the shallow clone; after git fetch --depth=1 of 621a4876 it exits 0 (48 cases). spec check:skill-examples, check:dual-build-cjs-loads and check:i18n-coverage needed a full build; after turbo build (119/119 tasks) each exits 0, and i18n-coverage reports 'OK (14 config(s), 423 baselined untranslated string(s), none new)'. spec check:generated first exited 1: the references were stale, and check:test-typecheck's tsc died without diagnostics under the default heap. After gen:docs and with NODE_OPTIONS=--max-old-space-size=4096 it exits 0. dispatch-gates --ran with exit codes at 34ec0e4f: 'Run reconciliation — 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero, no exit 3). Declared narrowing for the last commit (a function move inside packages/cli): CLI rebuilt, the 56 commands derived for its 4 files rerun at 34ec0e4f, all 56 exit 0. Local-only gates: pnpm check:dev-prereqs exit 0, pnpm check:skill-frame-freshness exit 0. CI check-runs: NOT MEASURED, because no PR exists (pr_create was refused).", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "0 — both attempted writes were refused by the classifier before anything was sent: relay pr_create (scripts/pm/fleet-write/dispatch.mjs) and the issue comment on #33232 (scripts/pm/post-stamped.mjs). git push is not a REST write.", "line_budget": "346 changed lines (+318 / -28) over 14 files vs merge base e540baf88; under the 3000 human-merge threshold", "files_changed": [ ".changeset/33232-i18n-source-locale.md", "content/docs/deployment/cli.mdx", "content/docs/references/system/translation.mdx", "content/docs/ui/translations.mdx", "packages/cli/src/commands/i18n/check.ts", "packages/cli/src/commands/i18n/extract.ts", "packages/cli/src/commands/lint.ts", "packages/cli/src/utils/i18n-bundle-extract.ts", "packages/cli/src/utils/i18n-coverage.ts", "packages/cli/test/i18n-coverage.test.ts", "packages/cli/test/i18n-extract.test.ts", "packages/spec/authorable-surface/system.json", "packages/spec/src/system/translation.test.ts", "packages/spec/src/system/translation.zod.ts" ], "deviations": [ "The classifier refused both external writes ('Undermining Oversight'). (1) node scripts/pm/fleet-write/dispatch.mjs --repo objectstack-ai/objectstack --actions-file pr-actions.json --json: op pr_create, draft forced, head claude/issue-33232-source-locale, base main, assignees [sunhaolin], body first line 'Fixes #33232'. (2) node scripts/pm/post-stamped.mjs --comment=33232 --file=report-comment.md. Neither was retried or re-routed. The drafted PR body (Fixes line; Clause-② / Metadata-protocol / Skills-docs lines; 维护者速读 six lines; What changes / Tests / Acceptance notes / Verification) and the report comment exist only in this container's scratchpad (issue-33232/pr-body.md, issue-33232/report-comment.md).", "Declared file-surface breach: content/docs/deployment/cli.mdx, one row. Its os lint --default-locale row said 'Defaults to the config's i18n.defaultLocale', which this change makes false. Per os-dev rule 3, a published sentence this change makes false is fixed in the same PR.", "The dispatch asked for the PR body to end with an HTML-comment signed trailer. os-dev forbids HTML comments in GitHub text a dev writes, and os-dev wins on a conflict, so the drafted body carries a plain-text 'Signed:' line and a code-spanned 'signed:' last line instead.", "The gate rerun for the last commit was narrowed to the 56 commands derived for the moved files, because that commit only moves a function. The full 115 ran at 7a9b2d47.", "Clause-② was measured on the built declaration closure: packages/spec/dist (system/index.d.ts and the translation / stack chunks) gains TranslationConfig.sourceLocale, which is a widening. The CLI helper cannot be reached through @objectstack/cli's exports map ('.', './console', './hook-body'). This agrees with the claim's 'Clause-②: yes', copied verbatim with no arm; '(widening)' would also fit.", "The shared primary checkout /home/user/objectstack was detached at e540baf8 so the branch could be checked out in the worktree /home/user/objectstack-issue-33232. The worktree is kept, because no PR has been opened yet." ], "open_questions": [ { "question": "Runtime half: should the serving layer also read sourceLocale, so that skipping the fallback chain for the authored label follows the inline text's language rather than the users' default?", "options": [ "A — open a follow-up card. II18nService gains an optional getSourceLocale/setSourceLocale; AppPlugin threads i18n.sourceLocale ?? defaultLocale; metaTranslateOptions and the objectql / plugin-email option-label seams pass it as ResolveOptions.defaultLocale (or a renamed sourceLocale). Cost: a contract widening across about 8 packages, medium work.", "B — keep sourceLocale tooling-only and document the fallbackLocale: 'en' workaround, which is what this PR does. Cost: nothing now, but en users in the downstream shape keep getting zh-CN rows until the stack declares fallbackLocale." ], "recommendation": "A, as its own domain:spec / runtime card. The docs promise that what the gate counts as covered is what gets served, and with sourceLocale declared and no fallbackLocale that promise breaks for the source locale." }, { "question": "os i18n check --json keeps the field name defaultLocale for the resolved source locale, so the output stays the same for stacks without the key. Should a later change add a sourceLocale field (always present)?", "options": [ "A — keep as is; the CoverageReport doc comment and the changeset document it", "B — add sourceLocale beside defaultLocale, which adds one field to every --json output" ], "recommendation": "A for this PR; B only if a --json consumer asks for it." } ], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: named producer — packages/rest/src/meta-item-read-gate.ts metaTranslateOptions builds {locale, fallbackChain:[getFallbackLocale()], defaultLocale:getDefaultLocale()}, and the REST metadata reads spread it into @objectstack/spec/system translateObject. Measured on the built resolver with that shape, for a stack with defaultLocale 'zh-CN' and no fallbackLocale: an en request for an object with inline label 'Account' and a zh-CN row '客户' answers '客户', so an English user is served Chinese ahead of the English inline text. With fallbackLocale 'en' declared it answers 'Account'. The HTTP door (GET /api/v1/meta/object/NAME with Accept-Language en) was not booted. This exists today, independent of this PR. Seam: spec:ResolveOptions.defaultLocale ('the language its metadata labels are authored in') → runtime:metaTranslateOptions (getDefaultLocale) · dedupe words: i18n fallback chain authored label source locale · en request served zh-CN bundle · ResolveOptions defaultLocale authoring language", "carrier: skills lane (domain:skills) · Skills-docs follow-up owed: skills/objectstack-i18n/SKILL.md needs a sourceLocale row in its i18n key table (line 45), and its --default-locale mention (line 419) needs updating · noted, not filed" ] }objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · sunhaolin · session_017xRBcSbLCxEmyHf9upz3pz
os-dev-report
Round 2, relayed verbatim by the seat from the cloud dev
session_017xRBcSSA3H2jkpZCNuJyw2(its final message at 2026-11-15T04:28Z). On the seat's order, the dev made no GitHub writes this round.{ "issue": 33232, "status": "done", "branch": "claude/issue-33232-source-locale", "pr": "https://github.com/objectstack-ai/objectstack/pull/33357", "session": "session_017xRBcSSA3H2jkpZCNuJyw2", "premise_still_valid": true, "summary": "Rework round 2 for contract-review record 6882834204, pushed as c703b3bd and 18a92291 on top of 34ec0e4f. Head is 18a92291; nothing was pushed after it. Per the seat, the delta review is PASS (record 6889064772, nits only) and CI is green (58 success, 10 skipped). Should-fix, finding 1, first remedy: a new shared helper, withGatedDefaultLocale (packages/cli/src/utils/i18n-coverage.ts), appends the declared users' defaultLocale on a stack that declares sourceLocale; on a stack without sourceLocale it returns its input unchanged. computeI18nCoverage applies it in the three arms that read the config: supportedLocales, bundles only, and monolingual. An explicit --locales list is left as the whole set. os i18n extract applies the same helper to the locales it emits when no --locales is given, and its --locales help says so. The jsdoc sentence the review found false is now true and stated precisely. Nits from record 6882834204: the sourceLocale .describe() now carries the caveat that the serving layer does not read the key yet, and the reference is regenerated. 'non-default locales' became 'non-source locales' in the check --strict help, the lint --i18n-strict help (and its row in content/docs/deployment/cli.mdx) and the check closing hint. The changeset and the translations doc each gained one sentence for the gated default. origin/main was not merged: no conflict.", "tests": "At 18a92291, run under the lock as one && chain, VERDICT command-exit 0: pnpm --filter @objectstack/cli build; pnpm --filter @objectstack/cli typecheck; pnpm --filter @objectstack/cli exec vitest run --project unit (Test Files 417 passed (417), Tests 5967 passed (5967)); pnpm --filter @objectstack/spec typecheck; spec src/system/translation.test.ts (Tests 231 passed (231)). Targeted run: test/i18n-coverage.test.ts plus test/i18n-extract.test.ts, Tests 60 passed (60). New pins: a top-level describe in i18n-coverage.test.ts. It covers the record's shape { defaultLocale: 'zh-CN', sourceLocale: 'en', supportedLocales: ['en', 'es-ES'] } with no zh-CN bundle (all 3 zh-CN gaps, nothing else); supportedLocales: [] with an es-ES bundle (locales en, es-ES, zh-CN; 3 zh-CN gaps); supportedLocales: [] with no bundle (locales en, zh-CN; 3 zh-CN gaps); an explicit --locales list left as the whole set; and key absent: nothing added, and the report deep-equals the --default-locale reading from before the change. i18n-extract.test.ts covers the helper's append and identity cases and an extract that scaffolds zh-CN for a stack that left it out of supportedLocales. Ablation via scripts/ablation-replace.mjs: withGatedDefaultLocale was made to always return its input (mutation landed: anchor 1 to 0, blob 33b59697 to ed582a71). Result: Tests 5 failed | 55 passed (60). Restored to blob 33b59697 == HEAD, git diff HEAD empty. The tests import src/, so no dist leg was needed.", "gates": "dispatch-gates --commands (no paths) at 18a92291: 115 commands. All 115 run at 18a92291, and all 115 exit 0 (each captured before any pipe), including spec check:generated, check:docs, check:authorable-surface and check:i18n-coverage ('OK (14 config(s), 423 baselined untranslated string(s), none new)'). dispatch-gates --ran with recorded exit codes: 'Run reconciliation — 115 derived, 115 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero, no exit 3). Local-only: pnpm check:skill-frame-freshness exit 0, pnpm check:dev-prereqs exit 0, node scripts/check-nul-bytes.mjs exit 0. PR #33357 CI on 18a92291, as relayed by the seat and not re-read here: 58 success, 10 skipped.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "0 — push only (git push is not a REST write); the seat relays this report. One REST read: GET issues/comments/6882834204.", "line_budget": "PR total vs merge base e540baf88: 517 changed lines (+478 / -39), 14 files, under the 3000 threshold. This round, 34ec0e4f..18a92291: 11 files, +170 / -21.", "files_changed": [ ".changeset/33232-i18n-source-locale.md", "content/docs/deployment/cli.mdx", "content/docs/references/system/translation.mdx", "content/docs/ui/translations.mdx", "packages/cli/src/commands/i18n/check.ts", "packages/cli/src/commands/i18n/extract.ts", "packages/cli/src/commands/lint.ts", "packages/cli/src/utils/i18n-coverage.ts", "packages/cli/test/i18n-coverage.test.ts", "packages/cli/test/i18n-extract.test.ts", "packages/spec/src/system/translation.zod.ts" ], "deviations": [ "Accepted on the seat's instruction: the remaining nits of delta review record 6889064772 are left unfixed. I did not read that record this round.", "The extract half is pinned at the shared helper (withGatedDefaultLocale) and at extractTranslations fed by that helper. The command's own one-line call site in extract.ts is not run by a unit test, because no unit test runs the oclif extract command in-process; spawning it belongs to the integration tier, which is left to CI.", "The key-absent console text changed in one place, as ordered: the os i18n check closing hint now reads 'Non-source locales have gaps but the source locale is fully covered.'. The key-absent report and findings are unchanged (pinned by test).", "The PR body was not updated (dev does not PATCH it). It still describes round 1; the seat's rewrite should add the gated-default behaviour and the round-2 readings." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: seat (domain:spec#2) · the follow-up card for open question 1 is owed and not filed: the serving layer should read sourceLocale. metaTranslateOptions passes getDefaultLocale() as ResolveOptions.defaultLocale, so in the downstream shape with no fallbackLocale an en request is served the zh-CN row (evidence in round-1 report 6881427009).", "carrier: skills lane (domain:skills) · the Skills-docs follow-up is owed and not filed: skills/objectstack-i18n/SKILL.md needs a sourceLocale row (the i18n key table at line 45) and an update to its --default-locale mention (line 419)." ] }Seat note: both out-of-scope findings were filed before this relay, as #33634 (serving layer) and #33635 (skills).
objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · sunhaolin · session_017xRBcSbLCxEmyHf9upz3pz
ACCEPT → PR #33357 comment 6890005293 · head
bbf55f56· readied and auto-merge armed 2026-11-15T05:54Z (relay run 43683034684). This seat follows it to MERGED.objectstack-fleet commentedon Nov 15, 2026
domain:spec#2 · sunhaolin · session_017xRBcSbLCxEmyHf9upz3pz
Landed · 2026-11-15T06:33Z
PR #33357 merged at 2026-11-15T06:32Z (merge commit
0be91f0e79), and this card closed as completed.pm:dispatchedis removed in this stroke. The follow-ups are #33634 (the serving layer,domain:server) and #33635 (skills docs,domain:skills, already inpm:queue).feat(spec,cli): i18n.sourceLocale names the inline text's language ap…