Skip to content

Commit ee212c2

Browse files
committed
docs(metadata-protocol): remedies name only the doors that do what they say
The foreign-declaration remedy says remove the key (a package-less save that keeps a corrected overrides is refused by the override write gate); the shadowed wording says the pair's row is served only when it declares the override; a failed move keeps its package-less write only when the error names the pair or the base's missing version; the changeset names the one widening (the pair's own declared row rolls back as its override). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5ni5yjiTswP6crgAkX
1 parent a54ef14 commit ee212c2

3 files changed

Lines changed: 26 additions & 19 deletions

File tree

‎.changeset/28576-packageless-overlay-write-closed.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
fix(metadata-protocol)!: a write naming no package onto an installed package's view, dashboard, report, translation or email template is refused where `os migrate packageless-overlays` can move its row, naming the base's `.custom` pair and the command
99

10-
Clause-②: yes (narrowing) — the metadata save, publish, delete and rollback doors refuse a write that names no package onto an item of the five overlay types that one installed read-only package ships, where the ceremony would classify the row (or the first write's body) `movable` and its move can succeed; they accepted it before as a package-unbound Setup row. Every row the ceremony lists and does not move keeps that write. Nothing is widened.
10+
Clause-②: yes (narrowing) — the metadata save, publish, delete and rollback doors refuse a write that names no package onto an item of the five overlay types that one installed read-only package ships, where the ceremony would classify the row (or the first write's body) `movable` and its move can succeed; they accepted it before as a package-unbound Setup row. Every row the ceremony lists and does not move keeps that write. One write is widened: a rollback of the `.custom` pair's own declared row of an item its base ships (#28644 item 1) is judged as the pair's declared override, where the store sealed it as an artifact override before, on every type the pair can override (a page or flow pair row included).
1111

1212
Metadata-protocol: narrowed (the `allowEnvironmentOverlay` flag of `view`, `dashboard`, `report`, `translation` and `email_template` no longer opens a package-less write onto a packaged item the ceremony can move; it stays the predicate the migration ceremony, the read of an unmigrated row and every row the ceremony leaves use)
1313

@@ -21,11 +21,11 @@ Skills-docs: updated here — `skills/objectstack-platform/SKILL.md`'s ADR-0146
2121

2222
The preview lists five dispositions; only `movable` rows are moved, and every other row keeps its package-less write:
2323

24-
- `movable`: `--apply` moves it into the pair. A move that ends `failed` keeps the row as it was; fix what the error names and re-run.
25-
- `multi_shipped` (several packages ship the name): delete it naming no package, then save it into the pair of the package it customizes if it is still wanted.
24+
- `movable`: `--apply` moves it into the pair. A move that ends `failed` keeps the row as it was; fix what the error names and re-run. When the error names the pair (it cannot be ensured, or it refuses the row) or the base's missing version, the row also keeps its package-less write and may be left.
25+
- `multi_shipped` (several packages ship the name): delete it naming no package, then save it into the pair of the package it customizes if it is still wanted (the pair's override is then served at that base's address, `?package=<base>`; a read naming no package is not pinned to it while several packages ship the name).
2626
- `no_pair` (the base's id forms no pair): nothing to do.
27-
- `foreign_declaration` (its `overrides` names another package): correct or remove the key with a save naming no package, then re-run.
28-
- `shadowed` (the pair already holds the item, and that row is served): nothing to do to keep the pair's; or restore the package original (`DELETE …?package=<base>.custom`) and re-run to move this one.
27+
- `foreign_declaration` (its `overrides` names another package): remove the key with a save naming no package, then re-run: the move declares the right override. (A package-less save that keeps a corrected `overrides` is refused by the override write gate.)
28+
- `shadowed` (the pair already holds the item; the pair's row is served when it declares the override, otherwise this row still is): nothing to do to keep the pair's declared override; or restore the package original (`DELETE …?package=<base>.custom`) and re-run to move this one.
2929

3030
### Migration: FROM → TO
3131

‎packages/cli/src/commands/migrate/packageless-overlays.ts‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,22 @@ function reasonOf(row: CensusRow): string {
5959
case 'multi_shipped':
6060
return `several packages ship this name (${row.shippers.join(', ')}), so it overlays none of them for certain. `
6161
+ 'Left as it is: delete it (a delete naming no package removes it while no package holds a row of '
62-
+ 'this name), then, to keep the customization, save it into the pair of the package it customizes.';
62+
+ 'this name), then, to keep the customization, save it into the pair of the package it customizes '
63+
+ '(served then at that package\'s address, ?package=<base>).';
6364
case 'no_pair':
6465
return `'${row.base}' has no paired .custom package id, so there is nowhere to move it. Left as it is.`;
6566
case 'foreign_declaration':
6667
return `its body already carries an \`overrides\` key that does not name '${row.base}'. Left as it is: `
67-
+ 'correct or remove the key, then re-run.';
68+
+ 'remove the key with a save naming no package, then re-run: the move declares the right override.';
6869
case 'shadowed':
69-
return `'${row.pair}' already ${row.shadowDeclares ? 'overrides this item (a customization made in Studio)' : 'holds a row of this name'}, `
70-
+ 'and that row is the one served — this row is never merged into it. Left as it is: to keep the Studio '
71-
+ 'customization, nothing is owed (this row is not served while that one stands); to make this row the '
72-
+ `customization instead, use "Restore package original" in Studio to delete '${row.pair}''s row, then `
73-
+ 're-run this command to move this one.';
70+
return (row.shadowDeclares
71+
? `'${row.pair}' already overrides this item (a customization made in Studio), and that row is the one `
72+
+ 'served — this row is never merged into it. Left as it is: to keep the Studio customization, nothing '
73+
+ 'is owed (this row is not served while that one stands); to make this row the customization instead, '
74+
: `'${row.pair}' already holds a row of this name that declares no override, so this row is still the one `
75+
+ 'served, and the ceremony does not move it beside that row. Left as it is: to have it moved, ')
76+
+ `use "Restore package original" in Studio to delete '${row.pair}''s row, then re-run this command to `
77+
+ 'move this one.';
7478
default:
7579
return '';
7680
}

‎packages/spec/src/migrations/entries/semantic/18.packageless-overlay-write-closed.ts‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ export const entry: SemanticMigration = {
2929
+ '<base>.custom` to restore the package original. Every row the preview lists and does not '
3030
+ 'move keeps its package-less write: `multi_shipped` (several packages ship the name): delete '
3131
+ 'it naming no package, then save it into the pair of the package it customizes if it is still '
32-
+ 'wanted; `no_pair` (the base\'s id forms no pair): nothing to do; `foreign_declaration` (its '
33-
+ '`overrides` names another package): correct or remove the key with a save naming no package, '
34-
+ 'then re-run; `shadowed` (the pair already holds the item, and that row is served): nothing to '
35-
+ 'do to keep the pair\'s, or restore the package original (the DELETE above) and re-run to move '
36-
+ 'this one; a `failed` move (the pair cannot be ensured, the base records no version, or the '
37-
+ 'pair refuses the row, such as an email template locale the base does not ship): fix what the '
38-
+ 'error names and re-run, or leave the row, which keeps its package-less write',
32+
+ 'wanted (the pair\'s override is then served at that base\'s address, `?package=<base>`); '
33+
+ '`no_pair` (the base\'s id forms no pair): nothing to do; `foreign_declaration` (its '
34+
+ '`overrides` names another package): remove the key with a save naming no package, then '
35+
+ 're-run: the move declares the right override; `shadowed` (the pair already holds the item; '
36+
+ 'the pair\'s row is served when it declares the override, otherwise this row still is): '
37+
+ 'nothing to do to keep the pair\'s declared override, or restore the package original (the '
38+
+ 'DELETE above) and re-run to move this one; a `failed` move: fix what the error names and '
39+
+ 're-run; when the error names the pair (it cannot be ensured, or it refuses the row, such as '
40+
+ 'an email template locale the base does not ship) or the base\'s missing version, the row '
41+
+ 'may also be left, as it keeps its package-less write',
3942
reason:
4043
'A customization of an installed package lives in its paired `.custom` package, where it is '
4144
+ 'a declared override that is exported with the pair and judged against the base\'s version '

0 commit comments

Comments
 (0)