|
1 | 1 | --- |
2 | 2 | '@objectstack/metadata-protocol': patch |
| 3 | +'@objectstack/spec': patch |
3 | 4 | --- |
4 | 5 |
|
5 | | -fix(metadata-protocol)!: a package commit's revert plan and its revert address the committing package's own row; a revert whose row was deleted asks the package-less close, as the per-item rollback does |
| 6 | +fix(metadata-protocol)!: a package commit's revert plan and its revert address the committing package's own row, and a restore into a `.custom` pair's row is judged by the override write gate |
6 | 7 |
|
7 | | -Clause-②: no (narrowing) — the commit revert (`POST /api/v1/packages/:id/commits/:commitId/revert`) and the package rollback (`POST /api/v1/packages/:id/rollback`) no longer restore a stored version into the package-unbound row when the committing package's own row of the item is gone, on an item of the five overlay types one installed read-only package ships, where `os migrate packageless-overlays` would move such a row into the base's paired `<base>.custom`; they inserted that package-less row before. The per-item rollback on the same package-less address has refused it since `packageless-overlay-write-closed`. |
| 8 | +Clause-②: no (narrowing) — the commit revert (`POST /api/v1/packages/:id/commits/:commitId/revert`) and the package rollback (`POST /api/v1/packages/:id/rollback`) no longer restore a stored version into a `<base>.custom` pair's row unless the version declares the override the pair's save requires, and no longer restore into another package's row of the name, or into a package-less row, when the committing package's own row was deleted since: they restore into the committing package's row, so a commit of an installed read-only package itself whose row is gone is refused by the close naming the pair. They restored into whichever row of the name the store returned first, or inserted a package-less row, before. |
8 | 9 |
|
9 | 10 | Metadata-protocol: none |
10 | 11 |
|
11 | | -Skills-docs: none needed — `skills/objectstack-platform/SKILL.md` already says the package-less save, reset and rollback of a movable row are refused once movable (D11), and places every customization of an installed base in its paired `.custom`; nothing it says becomes false. |
| 12 | +Skills-docs: none needed — `skills/objectstack-platform/SKILL.md` places every customization of an installed base in its paired `.custom`, declaring `overrides`, and says a pair row is honoured only when declared; nothing it says becomes false. |
12 | 13 |
|
13 | | -<!-- adr-0087: not-required (already-registered packageless-overlay-write-closed) That entry, unreleased and shipping in the same release, already prescribes this change's TO for every package-less write onto an item an installed read-only package ships: write it into the base's paired `<base>.custom` with `PUT /api/v1/meta/<type>/<name>?package=<base>.custom` and the `overrides` declaration (its replacement), because the customization lives there (its reason, ADR-0146 D1, D2, D11). This change closes the commit doors' restore into the package-less row, the one package-less write the per-item rollback already refuses and the commit revert still made, onto the same TO. No stored row is rewritten or moved, so `objectstack migrate meta` has nothing new to do. --> |
| 14 | +<!-- adr-0087: not-required (already-registered packageless-overlay-write-closed) That entry, unreleased and shipping in the same release, already prescribes this change's TO for every customization of an installed package: write it into the base's paired `<base>.custom` with `PUT /api/v1/meta/<type>/<name>?package=<base>.custom` and the `overrides` declaration (its replacement), because the customization lives there (its reason, ADR-0146 D1, D2, D11). Its surface and reason now name the commit doors as further addresses of the rollback it closes (text only, no new id). No stored row is rewritten or moved, so `objectstack migrate meta` has nothing new to do. --> |
14 | 15 |
|
15 | | -**BREAKING** write narrowing at the commit doors (`@objectstack/metadata-protocol`), shipped as `patch` (`Metadata-protocol: none`). |
| 16 | +**BREAKING** write narrowing at the commit doors (`@objectstack/metadata-protocol`), shipped as `patch` (`Metadata-protocol: none`). `@objectstack/spec` carries the text widening of the `packageless-overlay-write-closed` upgrade entry. |
16 | 17 |
|
17 | | -The plan a package publish records (`POST /api/v1/packages/:id/publish-drafts`, the commit's `existedBefore` and `prevVersion` per item) now reads the publishing package's own active row, and the revert removes or restores that row only. Before, both read any package's active row of the name: the first publish of a `<base>.custom` pair's declared override beside a row bound to the base (stored before the write naming the base was closed) was recorded as an edit of the base row's version, and its revert addressed the base row, refused there instead of removing the pair's row. It now removes the pair's row, and the row bound to the base is served again. Commits recorded before this change keep the plan they recorded. |
| 18 | +The plan a package publish records (`POST /api/v1/packages/:id/publish-drafts`, the commit's `existedBefore` and `prevVersion` per item) now reads the publishing package's own active row, and the revert removes or restores that row only. Before, both read any package's active row of the name: the first publish of a `<base>.custom` pair's declared override beside a row bound to the base (stored before the write naming the base was closed) was recorded as an edit of the base row's version, and its revert addressed the base row and was refused there instead of removing the pair's row. It now removes the pair's row, and the row bound to the base is served again. |
| 19 | + |
| 20 | +A pair commit recorded before this change beside such a row still names the base row's version as the pair's pre-commit state. Its revert now restores into the pair's own row, so the restored body meets the override write gate exactly as the pair's per-item rollback does: the base row's body declares no override, so the item is refused per item (`403 NOT_OVERRIDABLE`, the save door's sentence) and the pair's declared row stays as it is. |
18 | 21 |
|
19 | 22 | ### Migration: FROM → TO |
20 | 23 |
|
21 | | -FROM, undoing a commit of the installed package `com.acme.crm` (recorded before the write naming it was closed) that edited a customization whose row was deleted since: |
| 24 | +FROM, undoing a pair commit recorded before this change beside a row bound to the installed package `com.acme.crm`: |
22 | 25 |
|
23 | 26 | ```http |
24 | | -POST /api/v1/packages/com.acme.crm/commits/cmt_123/revert |
| 27 | +POST /api/v1/packages/com.acme.crm.custom/commits/cmt_123/revert |
25 | 28 | ``` |
26 | 29 |
|
27 | | -It now answers `200` with `success: false`, and the item in `failed[]` with `code: NOT_OVERRIDABLE` and the sentence the per-item rollback gives; nothing is written. TO, write the version you want back into the base's paired `.custom`, declaring what it overrides: |
| 30 | +It answers `200` with `success: false`, and the item in `failed[]` with `code: NOT_OVERRIDABLE`; nothing is written. TO, write the version you want into the pair, declaring what it overrides, or remove the pair's row to serve what is under it: |
28 | 31 |
|
29 | 32 | ```http |
30 | 33 | PUT /api/v1/meta/view/account_list?package=com.acme.crm.custom |
31 | 34 | { "name": "account_list", "label": "My accounts", "overrides": { "package": "com.acme.crm", "basedOn": "1.4.0" } } |
| 35 | +
|
| 36 | +DELETE /api/v1/meta/view/account_list?package=com.acme.crm.custom |
32 | 37 | ``` |
33 | 38 |
|
34 | | -- **Now refused, per item.** The restore of a commit item whose row in the committing package is gone, of a `view`, `dashboard`, `report`, `translation` or `email_template` one read-only package ships, where the package-less close applies (the row would be one `os migrate packageless-overlays` moves). The commit's other items still revert, and `POST /api/v1/packages/<id>/rollback` reports the item in its `failed[]` and continues. |
35 | | -- **Still open.** Every restore into a row the committing package holds (a writable package's in place, the pair's in place), every removal, and every package-less restore the close leaves open (a name no read-only package ships, or one several ship). |
| 39 | +FROM, undoing a commit of `com.acme.crm` itself (recorded before the write naming it was closed) that edited a customization whose row was deleted since: the restore wrote a package-less row. It now restores into the row bound to `com.acme.crm`, which the close refuses (`NOT_OVERRIDABLE`, the rollback sentence naming the pair); TO, the same `PUT …?package=com.acme.crm.custom` with the `overrides` declaration. |
| 40 | + |
| 41 | +- **Now refused, per item.** A restore into a `<base>.custom` pair's row of a version that does not declare the override the pair's save requires (the override write gate). A restore of a commit of a read-only package itself into its row bound to the package, now also when that row was deleted since (the close naming the pair). The commit's other items still revert, and `POST /api/v1/packages/<id>/rollback` reports each refused item in its `failed[]` and continues. |
| 42 | +- **Now restored into the committing package's row.** A commit whose row was deleted since, of a writable package or of the pair (a declared version): the row is created again under that package, never as a package-less row. |
| 43 | +- **Still open.** Every restore into a row the committing package holds that the gate admits (a writable package's in place, the pair's declared version in place), and every removal. |
0 commit comments