Address the three open review threads on the dictionary parity gate.
Regex/TEXT: localeOf now requires an uppercase ASCII [A-Z] flat-letter at
the third position of a name-prefix shape, so zh2Foo/zh_probe are no longer
treated as dictionaries in localeOf while the admission pre-filter skips
them. The two now agree exactly.
register detection now also admits a bare register identifier callee in
addition to a property access, covering a future destructured
register(NS, 'zh'|'en', dict) call instead of silently dropping it.
A 3-arg register whose dictionary argument is a local variable is resolved
through module-scope const initializers; one that cannot be resolved to an
object literal makes the gate refuse with a named error rather than skipping
the registration and narrowing the sweep.
Also restate the FALLBACK_LOCALE rationale: the residual case points at
English because a browser naming neither shipped language is the reader
least likely to read Chinese, not because English is the copy's source
language (Chinese is; packages/client/AGENTS.md). Sync the identical claim
in the bilingual Agent Note and re-record its .i18n.yaml pairing.
The parity gate recognized only a `[['zh',{...}],['en',{...}]]` array, so the
two separate ctx.locale.register(NS, 'zh'|'en', {...}) calls in
ui-permission-presets were unchecked: deleting a key from one side left the
gate green. Pair those calls by their namespace argument. Widen the pre-filter
to admit zhSettings/accessZh spellings, which a bare \b(zh|en)\b misses and
would have skipped before parsing.
Assert document.documentElement.lang in the assembled app. The served markup
already ships lang="en", so the fr-FR scenario passes whether or not the sync
runs; the zh scenario is the discriminating half and now asserts zh-CN before
the switch and en after it.
Drop the dead vi.unstubAllGlobals() from the document-language spec, which
manages navigator with defineProperty and never calls vi.stubGlobal.
Restore @deepseek-ai/dsh-client-test-runtime in ui-settings-general: the
package still imports bindSnapshotSelector from it in
tests/components.client.spec.tsx, so removing it was manifest drift. The
earlier knip report predated that file arriving on this branch.
Swallow only ENOENT when reading a directory in the parity gate. A broad catch
treated EACCES or an I/O failure as "absent", which would narrow the sweep and
let the gate pass while checking less.
setLocale returned early when the id already matched the active locale, so
choosing the language already on screen wrote nothing. That value may be a
provisional browser-derived or fallback resolution nothing has stored, so a
different browser sharing the DSH home still resolved on its own. Write
unconditionally; keep the render publish conditional.
Broaden the dictionary parity gate to every workspace package, pair zh/en
across sibling files and inline registrations, and fail when a dictionary has
no counterpart. It previously scanned only packages/client and packages/
extensions, compared within a single module, and silently skipped unpaired
dictionaries -- so the split locales/zh.ts + en.ts common pair, the inline
directory-picker-browse dictionary, and session-log-export were unchecked.
Normalize paths at ingestion so the sweep does not narrow on Windows.
Regenerate the client API catalog and update the locale README pair: both
described the old zh fallback direction.
Add the English fallback dialog golden, and drop a dead afterEach plus the
blank lines left where the dead browser-language pins were removed.