Repository navigation
Commit 8dcd6a4
committed
fix(spec): derive the migration TODO's group list from the schema, not a literal
The semantic migration entry for `translation-per-app-settings-platform-only`
enumerated nine of the ten groups the per-app face declares and omitted
`settingsCommon` — the nearest legitimate neighbour for an author who has just
had `settings` refused. `os migrate meta --from 17` prints this string verbatim
to the operator (`packages/cli/src/commands/migrate/meta.ts` renders
`surface → replacement`), so the omission reached a user-facing surface.
Correcting the literal would leave the construct that produced it. A
hand-maintained copy of a schema's key set already drifted here once, through a
full review of the surrounding change, so the copy is deleted rather than
pinned: `replacement` is now a getter that reads
`Object.keys(TranslationDataSchema.shape)`. There is one spelling of the set,
and a group added to the per-app face reaches this message the day it is
declared, with nothing to remember. Ordered remedy — delete the construct that
permits the error before reaching for a check that only reddens it.
`Object.keys` on a zod object shape returns the declaration order of the literal
it was built from, which is the order the sentence promises; the separator and
the shape of the sentence are unchanged, so the rendered paragraph reads as it
did. A getter rather than an eager template because importing the registry must
not force the lazy translation schema at module load.
The registry is generated by concatenating entry literals, and the generator
treats a file's imports as scaffolding — so `registry.ts` carries its own
hand-written value import outside the generated regions, with a comment saying
why. Verified: it survives `gen:migration-registry`, and
`system/translation.zod.ts`'s own 26-module closure reaches nothing under
`migrations/`, so the edge adds no cycle.
The changeset gains one sentence naming `settingsCommon` as unaffected. The
declared semver level is untouched — both packages stay `minor`; two prose
corrections and one derivation move no published signature.
Claude-Session: https://claude.ai/code/session_01UDXER3sdqfeVYpEWZs5mZx
Co-authored-by: Claude <noreply@anthropic.com>1 parent b1e7984 commit 8dcd6a4
3 files changed
Lines changed: 61 additions & 22 deletions
File tree
- .changeset
- packages/spec/src/migrations
- entries/semantic
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
Lines changed: 26 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 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 | + | |
24 | 39 | | |
25 | 40 | | |
26 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
| |||
12238 | 12245 | | |
12239 | 12246 | | |
12240 | 12247 | | |
12241 | | - | |
12242 | | - | |
12243 | | - | |
12244 | | - | |
12245 | | - | |
12246 | | - | |
12247 | | - | |
12248 | | - | |
12249 | | - | |
12250 | | - | |
12251 | | - | |
| 12248 | + | |
| 12249 | + | |
| 12250 | + | |
| 12251 | + | |
| 12252 | + | |
| 12253 | + | |
| 12254 | + | |
| 12255 | + | |
| 12256 | + | |
| 12257 | + | |
| 12258 | + | |
| 12259 | + | |
| 12260 | + | |
| 12261 | + | |
| 12262 | + | |
| 12263 | + | |
| 12264 | + | |
| 12265 | + | |
| 12266 | + | |
| 12267 | + | |
| 12268 | + | |
| 12269 | + | |
| 12270 | + | |
| 12271 | + | |
| 12272 | + | |
12252 | 12273 | | |
12253 | 12274 | | |
12254 | 12275 | | |
| |||
0 commit comments