Repository navigation
Commit c9a9981
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XSVGL7WRVYEMMdxciqrWsuF)_
Refs #28779
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:只加了一个 dogfood 测试,把今天的实测结果钉住:依赖包(不是
`.custom`)用基础包模板的名字发布一个基础包没有的语言(showcase
的任务完成邮件,`fr-FR`),各个读取今天返回什么。没有任何产品代码改动。
- **为什么改**:#28777
合并后这种写入被当作「新增」放行了,评审要求实测基础包名下的读取会不会把依赖包的内容当成基础包的。实测结果:按名读取(指定基础包、或不指定包)会返回依赖包的法语正文(标注的是依赖包自己的包
id);但列表和真正发邮件用的执行列表都看不到它,法语收件人收到的是英文原版。两条路说法不一致。
- **风险与回滚**:零运行时风险,只新增一个测试文件;回滚即删文件。标了 SHAPE
的用例记录的是「今天的形状」,不是「正确的形状」,裁定后应随裁定改。
-
**先看**:`packages/qa/dogfood/test/email-template-dependent-unshipped-locale-read.dogfood.test.ts`
的文件头(实测结论)与两个 SHAPE 用例。
- **两分钟验证**:`pnpm --filter @objectstack/dogfood exec vitest run
test/email-template-dependent-unshipped-locale-read.dogfood.test.ts`,预期
6/6 通过。
- **需要你做的**:无,席位决定后续(证据已贴 #28390,卡留开着等席位裁定)。
## What changes
One new dogfood file, a shape pin over the real showcase and its HTTP
doors. No product change. The card has two endings; this PR takes the
second (`Refs`, not `Fixes`) because a read naming the base serves the
dependent's body:
| read | dependent's `fr-FR` (showcase ships `en-US` only) |
|:--|:--|
| `GET /meta/email_template/NAME?package=DEPENDENT&member=fr-FR` |
served, `_packageId: DEPENDENT` (expected) |
| `GET …?package=BASE&member=fr-FR` | **served, the dependent's body**,
`_packageId: DEPENDENT`, `_provenance: org` |
| `GET …?member=fr-FR` (package-less) | **served, the dependent's
body**, same stamps |
| `GET /meta/email_template` (env-wide), `?package=BASE`,
`getMetaItemsForExecution` | `fr-FR` absent |
| `IEmailService.renderTemplate({ locale: 'fr-FR' })` | the base's
`en-US` |
Nothing stamps the dependent's body with the base's package id, but the
base's address answers it on the by-name reads, and the lists (and so
the email send path) do not. Mechanism, read from code at `8f294e04`:
- By-name: the served-row candidates for the base's address are the
pair's declared override, the base's row and the package-unbound row
(`servedOverlayRowCandidates`); none exists at `fr-FR`, and the code
layer has no `fr-FR`, so the read falls to `SchemaRegistry.getItem(type,
name, BASE, 'fr-FR')`, whose last tier is the legacy first composite
match across packages (ADR-0048 §3.3) and holds the dependent's `fr-FR`.
`registry.getArtifactItem` at the same arguments answers nothing.
- Lists: the env-wide narrowing (`protocol.ts`,
`soleShippingPackage(this.shippedArtifactsOf(type, itemName, …))`) keeps
a name one code package ships to that package's items at NAME grain, so
any other package's member of that name is dropped, whatever its locale.
Controls pinned: before the dependent writes, `fr-FR` is 404 on both
base-named reads; the base's own `en-US` reads as the base's on every
read; the dependent's `en-US` save is refused `403 NOT_OVERRIDABLE` (the
#28777 gate); the pair's declared override of `en-US` reads as the
override on the by-name reads, the list and the render.
## Tests
-
`packages/qa/dogfood/test/email-template-dependent-unshipped-locale-read.dogfood.test.ts`:
6/6 pass at `0127ab1f` (tree identical to the head `64d937f0`). The
cases named `SHAPE` record today's answer and are meant to move with the
seat's ruling.
- No red-first and no ablation: the diff changes no product behaviour,
and a shape pin records the current behaviour.
## Acceptance notes
- **Ending chosen: Refs, hand back.** The order's first ending needs the
dependent's item "served only under its own package", and the read
naming the base serves it too. Evidence is posted on #28390 in product
words; the seat decides.
- **The seat's added measurement (the pair's own new locale, no
`overrides`), measured on main `8f294e04`, own boot:** admitted at save
and publish; the read naming the pair, the read naming the base and the
package-less read all serve the pair's `fr-FR` (stamped `_packageId:
com.example.showcase.custom`); the list scoped to the pair lists it; the
env-wide list, the base-scoped list and `getMetaItemsForExecution` leave
it out; `renderTemplate({ locale: 'fr-FR' })` renders the base's
`en-US`. So since #28777 a `fr-FR` the customer adds in `.custom` is
read but never sent. Same seam as the dependent's case (the list's
NAME-grain narrowing). Not fixed here: making the list member-aware
would also start sending the dependent's `fr-FR` for the base's
template, which is the open question above. Readings:
`pm-orders/server/evidence/28779/probe3-readings.log` in the project
files.
- The layered view (`/layers?package=BASE&member=fr-FR`) answered 404 in
every state measured; not pinned, noted only.
## Verification
Gate sweep at `0127ab1f`, the same tree as the head `64d937f0` (only the
commit trailer was reworded, tree `565c66dc` on both): `dispatch-gates
--commands` derived 51 families; 51 run, all exit 0 (`dispatch-gates
--ran` reads "51 run, 0 NOT-MEASURED", a derived zero). Two first ran
exit 3 on a prerequisite and were re-run green:
`check-plugin-teardown-shape --self-test` (its fixture commit was absent
from the shallow clone) and `check:dual-build-cjs-loads` (seven packages
outside the dogfood closure were unbuilt). `check-nul-bytes` OK. The
record is `pm-orders/server/28779-gates-ran.txt` in the project files.
No changeset: the only file is in the private `@objectstack/dogfood`
package, so the PR carries `skip-changeset`. CI families are read from
this PR's check-runs, not re-run here.
<details><summary>Probe readings (dependent case)</summary>
```
PROBE after-dep base fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon","_provenance":"org"}
PROBE after-dep dep fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon"}
PROBE after-dep packageless fr-FR {"status":200,"subject":"Addon FR: {{title}}","locale":"fr-FR","_packageId":"com.example.showcaseaddon","_provenance":"org"}
PROBE after-dep list {"status":200,"rows":[["en-US","com.example.showcase","✅ Task done: {{title}}"]]}
PROBE after-dep list?package=com.example.showcaseaddon {"status":200,"rows":[["fr-FR","com.example.showcaseaddon","Addon FR: {{title}}"]]}
PROBE after-dep render fr-FR "✅ Task done: T"
PROBE after-dep exec-list [["en-US","com.example.showcase","✅ Task done: {{title}}"]]
PROBE after-dep registry.getItem base fr {"_packageId":"com.example.showcaseaddon","_provenance":"org","subject":"Addon FR: {{title}}"}
PROBE after-dep registry.getArtifactItem base fr {}
```
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5pFHjQjFRsVAurERSJ)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01FEkQ5pFHjQjFRsVAurERSJ
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 516119d commit c9a9981
1 file changed
Lines changed: 190 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
0 commit comments