Repository navigation
Commit 0c9aa82
fix(spec): the Seed.locale liveness note names the six seed-load builders and the locale each supplies (#30666)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuV5cRafodM2YQHxeDkdiWJM)_
domain:spec#2 · os-sales · session_01L6bhgVugtCCwBs98FeR27P
Fixes #30607
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:`packages/spec/liveness/seed.json` 里 `Seed.locale` 这一行的
`note` 重写为六个种子加载请求构建点各自是否带语言、语言从哪来;`verifiedAt` 改为 2026-11-05;另加一个
`@objectstack/spec` 的 patch changeset。
- **为什么改**:PR #30346
之后,市场安装、样例数据重灌、重启自愈和按组织回放都按组织语言挑选种子数据,台账却还写着"市场安装不传语言、安装是语言中立的",与代码和
`SeedSchema.locale` 的 describe(PR #30604)相反。
- **风险与回滚**:只改台账文字与日期,`status` 仍是 `live`,无代码、schema 或导出变化;回滚即 revert 本
PR。
- **先看**:① `packages/spec/liveness/seed.json` 第 53 行 note 中 "THE SCOPE
OF THIS `live`" 一段(六个构建点清单)与紧随 #17011 裁决原文之后新增的 "NARROWED 2026-11-05"
一句;② `.changeset/30607-seed-locale-liveness-note.md`。
- **两分钟验证**:`pnpm --filter @objectstack/spec check:liveness`,预期退出码
0,末尾两行均为 ✓。
- **需要你做的**:无,席位落地。
## What changes
`packages/spec/liveness/seed.json`, the `props.locale` row: `note` and
`verifiedAt` only (2 lines). `status` (`live`), `evidence`, `producer`,
`evidenceScope`, every other row and the file's `_note` parse identical
before and after. Plus one `@objectstack/spec` patch changeset.
**The builders, counted from the code at `b8929f48`.** Production
`SeedLoaderRequestSchema` parses (tests excluded) give **six** request
builders, the same number the old note gave. A control scan of every
`new SeedLoaderService(` finds three more constructions
(`marketplace-install-local-plugin.ts#sampleDataInScope`,
`#handlePurge`, `#handleSampleDataCount`). All three call only
`buildDependencyGraph`, never `load()`, so none of them is a request
builder.
| # | Builder (`path#function`) | Path(s) it serves | Locale it supplies
|
|:--|:--|:--|:--|
| 1 | `packages/runtime/src/app-plugin.ts#start` (inline boot seed) |
single-tenant boot seed | the app's `i18n.defaultLocale`
(`resolveSeedLocale`) |
| 2 | `packages/runtime/src/app-plugin.ts#registerHotReloadSeeder` | dev
hot-reload | the same, off the boot bundle |
| 3 | `packages/runtime/src/app-plugin.ts#start` (the `seed-replayer` it
registers) | per-organization replay | `resolveSeedLocaleForLoad`: the
org's `localization.locale` when set (not `source: 'default'`), then the
founder's `sys_user.locale`, then the app's `i18n.defaultLocale` |
| 4 |
`packages/cloud-connection/src/marketplace-install-local-plugin.ts#runInlineSeed`
| marketplace install and sample-data reseed (`applySideEffects`),
restart heal (`maybeHealSampleData`), the plugin's own per-org replayer
(`buildSeedReplayer`, used only where no `AppPlugin` replayer is
registered) | `resolveSeedLocaleForLoad`: the setting, then the
installing / reseeding user or the founder, then the package's
`i18n.defaultLocale` (the heal has no user; the plugin's replayer has no
app-default rung) |
| 5 | `packages/runtime/src/domains/packages.ts#applyPublishedSeeds` |
package apply | none |
| 6 |
`packages/metadata-protocol/src/protocol-publish-batch.ts#applySeedBodies`
(the body `protocol.ts#applySeedBodies` delegates to) | draft publish |
none |
**The note, FROM → TO, by sentence** (every sentence not listed is
unchanged byte for byte):
In the quotes below, PR #30346's closing line is spelled in words so
that this body points a closing keyword only at this card. The note
itself writes it in code.
1. FROM "⛔ It does NOT assert that every path which can reach
`SeedLoaderService.load()` supplies a locale — **three** do not, they
are named below, …"
TO "… — **two** do not, they are named below, …"
2. FROM "#16595 wired the THREE in `packages/runtime/src/app-plugin.ts`
— the default boot path, which is what makes authoring `locale` change
runtime behaviour and therefore what makes this row `live`."
TO "FOUR supply a locale, each named by the function that builds its
request:" followed by builders (1)–(4) above, each with its
`path#function` and its locale source, then "#16595 wired (1)–(3) in
`packages/runtime/src/app-plugin.ts` — the default boot path, which is
what makes authoring `locale` change runtime behaviour and therefore
what makes this row `live` — and PR #30346 (the PR that closed card
30281 [spelled in code in the note], merged 2026-11-05) moved (3) onto
`resolveSeedLocaleForLoad`, keeping `resolveSeedLocale` as its last
rung, and wired (4). A builder whose source answers nothing sends no
`locale` key, never an `'en'` guess."
3. FROM "The other three are publish/install-time paths and still pass
no locale: `…/packages.ts#applyPublishedSeeds` (package apply),
`…/protocol.ts#applySeedBodies` (draft publish) and
`…/marketplace-install-local-plugin.ts#runInlineSeed` (marketplace
install)."
TO "TWO are publish-time paths and still pass no locale: (5)
`packages/runtime/src/domains/packages.ts#applyPublishedSeeds` (package
apply) and (6)
`packages/metadata-protocol/src/protocol-publish-batch.ts#applySeedBodies`
(draft publish — the body
`packages/metadata-protocol/src/protocol.ts#applySeedBodies` delegates
to; the request moved out of `protocol.ts` with it)."
4. FROM "None of the three is handed the stack config, and none passes
`env` either, … and a locale has no ambient source, so it cannot be
closed the same way."
TO "Neither is handed the stack config, and neither passes `env` either,
… and a locale has no ambient source inside `load()`, so it cannot be
closed the same way: the four builders that supply one resolve it at the
call site."
5. The paragraph "RULED 2026-09-10 on #17011 (director seat, one-class
self-adjudication, option A 「不扩散」): … So this line is a DECISION, not a
to-do." is **unchanged**: 653 characters, the same bytes, found once in
the new note. ADDED right after it: "1 parent a2437b5 commit 0c9aa82
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
0 commit comments