|
| 1 | +--- |
| 2 | +'@objectstack/objectql': minor |
| 3 | +--- |
| 4 | + |
| 5 | +fix(objectql)!: every reader of the registry's overlay slot binds a row of an App's customization pair by the exact read's owner rule (ADR-0150 D4) |
| 6 | + |
| 7 | +Clause-②: yes (narrowing) — two refusals where a registration was admitted before. First, with the bare-name holders sealed, a package whose only members of an email template's name are locales the App ships none of, while the App's pair stores a row of that locale declaring another package of the App as its base (`overrides.package`), is refused `422 NAMESPACE_CONFLICT` naming the App as an addition to the App's template (#28802), where it was admitted because the pair's row counted as the App's own member. First-party packages in that position: 0. Second, with the holders sealed, a package of another namespace whose dependencies reach a package X that holds an email template's name alone (or that X's dependencies reach), shipping only a locale X ships none of, while a package-less row of that locale (a legacy overlay in the environment's slot) customizes X's template, is refused `422 NAMESPACE_CONFLICT` naming X as an addition to X's template, where it was admitted because that row counted as X's member; once admitted, the row bound to neither package and the cold boot's seal reported the package. The doors now count the arriving package as the seal counts it (listed below). First-party packages in that position: 0. The bare-name gate does not move the other way: where a row of the App's pair now binds to X, it lends X no locale at the doors or the seal, so a package of another namespace on X shipping only that locale is still refused and reported, in either registration order (listed below; admitting it is #32899). Beside them, a read withholds a row it served: with every package of the App that holds the name disabled, a row of the App's pair is that disabled holder's, so the bare read and an addition's address withhold it as they withhold any name only disabled packages hold (listed below). |
| 8 | +Metadata-protocol: narrowed |
| 9 | + |
| 10 | +<!-- adr-0087: registered pair-row-locale-addition-refused --> |
| 11 | + |
| 12 | +**BREAKING** for two registrations. A package that ships only a locale of an email template the App does not ship, while the App's pair overrides that locale for another package of the App, is now refused as an addition to the App's template. A package of another namespace on a package X that holds a template alone (or that X depends on), shipping only a locale X does not ship while a package-less row of that locale customizes X's template, is now refused as an addition to X's template. For either: ship a locale the holder ships too (declared in the manifest, or registered first), or rename the template. Nothing in the workspace is in either position. |
| 13 | + |
| 14 | +`SchemaRegistry`'s per-package overlay slot (`overlaySlotBinding`) read a row stored in a customization pair (`<app>.custom`) by the pair's per-package base only, never by the App whose pair it is (ADR-0146 D3: one pair per App, shared by every package of the App) and never by the base the row declares (`overrides.package`, ADR-0146 D2). The exact read (`?package=`, `pairRowOnAddress` in `@objectstack/metadata-protocol`) has read both since the epic's ruling on #31699 F2; its other readers now bind the row the same way: the holder the row declares, when the pair customizes it; else the App whose own pair it is (#28390 ruling A); else the one package of the App holding the name, counted as the exact read counts holders: over every holder of the name, each with the rows bound to it, so a bundle addition to another holder (of the App or outside it) holds no name (#28802) unless it ships the row's own locale, which the row may customize, and a package a row of the pair is declared for holds that row's locale; else, with two or more, no package. A row whose count would read an undeclared row of another shared pair (whose binding waits on that pair's own count) binds to no package. A declaration naming a package the pair does not customize, or one that holds no item of the name, binds it to no package. A row of a pair no holder of the name is customized by keeps its per-package reading. |
| 15 | + |
| 16 | +What each reader answers now, with a package X of App A holding the name and a row of `A.custom` (each line says what moves FROM what TO what): |
| 17 | + |
| 18 | +- `SchemaRegistry#packageScopedHoldersOf`: FROM the pair counted as a holder of its own when the App holds no item of the name TO the pair never a holder. A bare read (`GET /meta/TYPE/NAME`, `resolvePackageScopedName`) of a name one package of the App holds moves FROM `409 RESOURCE_CONFLICT` (`ambiguous-in-environment`, naming X and the pair) TO the row, X's customization (widening), except that, with the row (of locale L) declared for X and a package W of the App holding the name through L and a locale X ships too, W disabled, the bare read of L moves FROM `409` TO withheld (no loosening); with two packages of the App holding it, the bare read and `?package=A` still refuse `409`, now naming the two packages without the pair. |
| 19 | +- `SchemaRegistry#getPackageScopedItem` naming X: FROM X's own shipped item (none, for an added locale) TO the row, when the row declares X or X is the one package of the App holding the name — what `?package=X` already served. Naming the pair: FROM the row TO none (the pair is no holder; `?package=A.custom` serves the row as before). |
| 20 | +- A holder's bundle members (`bundleMembersHeldBy`, read by the bundle-addition rule of the bare read): FROM the row's locale counted as the App's when the row declares X, and as the pair's when the App holds no item of the name, TO counted as X's (declared, or the one package holding it) or as no holder's (two). |
| 21 | +- The bare-name gate (the item door, the package door and the cold boot's seal) reads a holder's members its own way: a row of a customization pair counts for a holder only where the per-package reading counts it for that holder too (the pair's base when it holds the name, else the pair itself). Where the binding moved the row (to X, from the App or the pair), the gate counts it for no holder. The App no longer holds a locale it ships none of through a row declared for X: the first refusal above. X does not gain the row's locale at the gate either, so nothing moves for a package of another namespace whose dependencies reach X and that ships only L, with the App holding no item of the name: it is refused `422 NAMESPACE_CONFLICT` naming X at both doors and reported by the seal against X, as before, whether the row declares X or X is its one owner and whether the package is of the App or outside it; with that package holding L first, X arriving is refused naming it and the seal reports X against it, as before. Admitting that package waits on the by-name read following the binding (#32899). |
| 22 | +- A package-less row (no package stamp, or `sys_metadata`) of locale L over a name X alone holds: it binds to X only while X is the one package holding the name, and the doors now count the arriving package as a holder. A package of another namespace whose dependencies reach X (or that X's dependencies reach) and that ships only L moves FROM admitted at the item door and the package door (after which the row bound to neither package, X's address no longer served it, and the cold boot's seal reported the package against X) TO refused `422 NAMESPACE_CONFLICT` naming X, an addition to X's template, with X keeping the row (narrowing). The seal's answer over the same state is unchanged: it reports the package against X before and after. |
| 23 | +- A row declaring a package the pair's holders do not include (one that holds no item of the name, or one the pair does not customize): FROM bound to the App (or to the pair, when the App holds no item of the name) TO no package. `?package=A` moves FROM the row TO the App's own item: the exact read had already judged the row no member of A's address and fallen back to A's registry item, which was the row again. A bare read of a name one package of the App holds moves FROM `409` naming that package and the pair TO that package's own item. |
| 24 | +- With a disabled holder (a disabled package holds no name, ADR-0150 D3): the binding counts every holder, disabled or not, so a disable never moves it. With every package of the App that holds the name disabled, the bare read of the row's member moves FROM the row (the pair, an enabled holder of its own) TO the disabled holder's withheld item, as for any name only disabled packages hold; so does the address of a package of the App whose holding is an addition to the disabled one (`?package=Z`). |
| 25 | +- `SchemaRegistry#getEnvironmentScopedItem`: unchanged. A pair's row is never the environment's item, before or after (measured on every case above). |
| 26 | + |
| 27 | +One shape still reads apart, and the registry is the side that does not guess: an undeclared row of the very locale a bundle addition of another package of the App ships binds to no package here (it may customize that addition's member), while `?package=X` serves it, because the exact read's holder count leaves the addition out. So does a row of a pair while another shared pair stores an undeclared row of the name: the registry binds it to no package, where the exact read may serve it or refuse it. And so does an undeclared row of a pair two holders share while one of them is disabled: the registry binds it to no package, while `?package=X` of the enabled one serves it, because the exact read counts the served holders. The exact read adopting these counts is #32561. |
| 28 | + |
| 29 | +Unchanged: apart from the `?package=A` move above, the exact read of every address (`?package=X`, `?package=Y`, `?package=A`, `?package=A.custom`) serves or refuses as before, measured on the protocol for the same cases; the App's own address keeps an undeclared row of its pair (#28390 ruling A); a row stored under a package that holds the name in its own slot, or under a pair whose holders include none it customizes, binds as before. |
0 commit comments