You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 28e7e92
Browse filesBrowse the repository at this point in the historyBrowse files
fix(metadata-protocol): the customizations read lists a moved edit under the package that serves it
After a suite move (ADR-0130 D4) a tenant's edit is served at the package
that ships the item now, but listServedOverrides took the package from the
pair override's declaration: listed under the former owner after a split,
under neither after a rollback. The list now picks each item's pair row
through the served reads' own candidates and predicates
(servedOverlayRowCandidates, holdsServedOverlayCandidate,
isMovedOverrideRowOf), so a package lists the override its address serves,
and only there. The item lock already reads every stored row of the item;
a pin holds that it answers the same for a moved edit.
Claude-Session: https://claude.ai/code/session_01ADHkmPHUhgip3YbMfQh27s
Co-authored-by: Claude <noreply@anthropic.com>
fix(metadata-protocol): the customizations read lists a moved edit under the package that serves it
6
+
7
+
Clause-②: no — what the customizations list holds for a moved edit; no accept set changes
8
+
Metadata-protocol: none
9
+
10
+
When a later version of an App moves an item from one of its packages to another (an ADR-0130 D4 suite split, or its rollback), the tenant's edit of the item is served at the package that ships it now. `GET /packages/:id/customizations` (`listServedOverrides`) now lists that edit there too, and only there.
11
+
12
+
-**Before.** The list took a pair override's package from its declaration, the owner at the time of the edit. After a flat → composed split the edit was listed under the App, which no longer ships the item, and not under the module that serves it; after a rollback it was listed under neither.
13
+
-**Now.** The list picks each item's row through the served reads' own candidates and predicates (`servedOverlayRowCandidates`, `holdsServedOverlayCandidate`, `isMovedOverrideRowOf`), so a package lists exactly the pair override its address serves. Same App is read only from the install record (`appOf` over the installed manifests), never from an id prefix; a row of another App's pair, or a declaration naming another App, is never listed.
14
+
-**Unchanged.** An edit whose owner still ships the item is listed as before. The list stays the pair's rows: a row bound to a package of the App itself (saved before ADR-0146 D11) is listed under no package, before or after a move. The upgrade plan's override advice reads this list, so it follows the same rule. The item lock already reads every stored row of the item whichever package it is bound to, so it answers for a moved edit what it answers for an edit saved at the new owner; that is pinned, not changed.
15
+
-**Nothing is written.** The read moves and rewrites no row.
return{lock: r?.lock,editable: r?.editable,deletable: r?.deletable,lockReason: r?.lockReason, save };
255
+
}
256
+
257
+
describe('[#31656] the customizations read lists a moved edit under the package that serves it, and the item lock answers for it as for an edit there',()=>{
258
+
it('flat → composed: the module lists the edit saved under the App, and the App no longer does',async()=>{
259
+
constdb=tenantDb();
260
+
constflat=awaitboot(db,'flat');
261
+
awaiteditInPair(flat,APP,'6.1.0');
262
+
// CONTROL: listed under its own package, as before the move.
it('CONTROL: a pre-close row bound to the App is served at the module and listed under neither, as such a row bound to its owner is not listed today',async()=>{
0 commit comments