Skip to content

Commit c50d10c

Browse files
fix(metadata-protocol)!: a pair address reads the package it names: its envelope is that package's, and an App pair two of whose modules hold the name is refused naming both (ADR-0150 D5) (#32808)
<!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuBdS96DD1Rta7hrLt6bkwBb)_ domain:server#7 · os-sales · session_01L6bhgXYPmTrQ4KGuKWzNh7 Fixes #32501 Clause-②: yes (narrowing) — the App pair address `APP.custom`, when two enabled modules of the App hold the name and one of them is the first registered package that ships it, is refused `409 RESOURCE_CONFLICT` naming both modules where it answered with the first registered module's item, on every door that reads it: `GET /meta/TYPE/NAME?package=APP.custom` and its `/layers`, `GET /meta/dataset/NAME?callerPackage=APP.custom` naming a pair the registry does not hold (which reads as `?package=`), and the qualified path `GET /meta/TYPE/APPNS_custom/NAME` (the installed pair's namespace), on both transports; the dataset query doors `POST /analytics/dataset/query` and `/batch` with `?package=APP.custom`, or `?callerPackage=APP.custom` naming a pair the registry does not hold, under an analytics service without plugin-wired admission or for a caller admitted to both modules' datasets (nothing is run); the import doors' qualified `mappingName` `APPNS_custom/NAME` (nothing is written); and the publish probes' dataset read for a publish of an App pair the registry does not hold. On the dataset doors under plugin-wired admission the refusal is judged over the modules the caller is admitted to, the #32292 admission narrowing carried over (seat ruling 6817809380), in either registration order: admitted to one module's dataset only, that dataset runs where the first registered module's dataset reached the query's own gates (`200` with it run when it was that module's, else `403 PERMISSION_DENIED`); admitted to neither, the answer is what a name nothing holds gets, `404 NOT_FOUND` byte for byte, where it was that `403`. `/layers` at an App pair that holds a stored row of a name two of its modules ship, when one of those modules is the first registered package that ships the name, is refused the same way where it reported that module's body as the code layer. With another package registered ahead of the modules, every one of these already answered the 409. The other moved answers keep their status and name the package the address reads in place of the first registered holder: the envelope (`_packageId`, `_packageVersion`, `_provenance`) of a base's pair address and of a stored row read at an exact address. Three widen from 404 to 200: on the same doors, the pair of an enabled base and an App pair one of whose two module holders is disabled, when the disabled holder registered first; on `?package=` and its `/layers`, a row of a package that ships nothing, its only shipper disabled. Metadata-protocol: none — no key, value or metadata type an author writes changes; what moves is which package an exact read's answer names, and when it refuses. Skills-docs: none — `skills/**` and `content/docs/**` teach no read at a customization pair address of a name two packages hold; the prescription ships in the refusal text and the before → after list in the changeset. ## 维护者速读 - 改了什么:按配对地址读取元数据时(`?package=基包.custom`,或配对包命名空间的限定路径 `基包命名空间_custom/名字`),返回体的 `_packageId` / `_packageVersion` / `_provenance` 取自地址实际读的那个包,不再取最先注册的持有者;App 的两个模块都持有同名项、且其中一个是最先注册的提供者时,App 配对地址返回 409 点名两个模块,不再挑先注册的那个。读这个地址的门一起变:`/meta` 普通读与 `/layers`、`/meta` 限定路径、dataset 查询单门与 batch 门、导入门的限定 `mappingName`,以及发布探针读未注册配对包的 dataset。dataset 两个门在插件准入下沿用 #32292 / 6817809380 的准入收窄:调用方对两个模块都有准入时答 409 点名两个;只对一个有准入就执行那一个,另一个不点名;都没有准入答 404,和名字不存在时逐字节一样(main 上这三种都是先注册模块的 dataset 进到查询自己的门禁:有准入 200,没有 403)。 - 为什么:专题红线 2(歧义要报告、不许猜)。以前两个包持有同名项时,后注册那个包的配对地址答自己的内容却标成先注册包的;先注册的包被停用时,启用包的配对地址甚至答 404。 - 风险与回滚:第一方 0 处(要求两个命名空间持有同名项)。收窄只发生在 App 两个模块同持一名、且有一个模块先于其他提供者注册的配对地址,真实引擎和裸 `SchemaRegistry` 一样;另有包先注册时本来就答 409。三处 404 → 200 是放宽;插件准入下只对后注册模块有准入的调用方从 403 变成 200(执行它有准入的那个),也是放宽。回滚即 revert 本 PR。 - 先看:`packages/metadata-protocol/src/protocol-package-bindings.ts` 的 `exactAddressArtifact`;`protocol-meta-item-reads.ts` 的 `readMetaItem` 信封查找;`protocol-exact-qualifier.ts` 的 `exactQualifierItem` 早返回那一行(两个基包时落到点名拒绝)。 - 两分钟验证:`pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-legacy-pair-served.test.ts -t 32501`,预期 13 例全过(main 上 10 例红,剩下 3 例是注册顺序对照)。 - 需要你做的:无,席位落地。 ## What changes Branch head `6ff8d6912`, the landing head: one merge of `main` 386891e (`7e51f8282`), then the dataset doors pinned under plugin-wired admission and the changeset restated for them (contract review delta round 6837692940, merge notes A and B). Round 2 (contract review r1, 6836136864) added tests and prose only on top of `1d8ea4ad7`; no source line moves since `1d8ea4ad7`. The diff against `main` 386891e is 11 files, +802 / −23. Measured on `main` against this head, per answer: 2f80f28 for rounds 1 and 2, and 386891e (with #32804) for rows D2 to D2d, which the landing merge moved. What decides the FROM of the App-pair refusal is the registration shape, not the composition: on the real ObjectQL engine with an SQL store and on the bare `SchemaRegistry` composition alike, the App pair whose two modules are the only shippers of the name (so a module is the first registered one) answered 200 with the first registered module's item, and with another package registered ahead of the modules it already answered 409. | # | state | door | FROM (`main` 2f80f28) | TO (this head) | arm | |:--|:--|:--|:--|:--|:--| | L2 | two enabled modules M1, M2 of App P hold NAME, a module the first registered shipper (either module order), no stored row; both compositions | `GET /meta/TYPE/NAME?package=P.custom` and its `/layers`; for a dataset, `GET /meta/dataset/NAME?callerPackage=P.custom` naming a pair the registry does not hold (it reads as `?package=`); the qualified path `GET /meta/TYPE/PNS_custom/NAME` (pair installed) | 200, the first registered module's item | 409 `RESOURCE_CONFLICT` naming M1 and M2 | narrowing | | L2′ | the same, another package registered ahead of the modules | the same doors | 409 (already) | 409 | none | | D2 | the same as L2, for a dataset; an analytics service without plugin-wired admission (built by hand, its gates inactive) | `POST /analytics/dataset/query?package=P.custom` and the same query in `/batch`; `?callerPackage=P.custom` naming a pair the registry does not hold; the pair installed or not for `?package=` | 200, the first registered module's dataset run | 409 naming M1 and M2, nothing run (`/batch`: that query's entry) | narrowing | | D2a | the same, plugin-wired admission, the caller admitted to both modules' datasets; the #32292 admission narrowing (seat ruling 6817809380) carried over | the same doors and spellings | 200, the first registered module's dataset run (admission not asked) | 409 naming M1 and M2, nothing run | narrowing | | D2b | the same, admitted to the first registered module's dataset only | the same | 200, that dataset run | the same | none | | D2c | the same, admitted to the other module's dataset only | the same | `403 PERMISSION_DENIED`: the first registered module's dataset reached the query's own gates | 200, the admitted module's dataset run; the other module never named | widening | | D2d | the same, admitted to neither | the same | `403 PERMISSION_DENIED` (the same) | `404 NOT_FOUND`, byte for byte the answer for a name nothing holds; neither module named, nothing run | refusal to refusal | | D2′ | the same, the pair installed | `?callerPackage=P.custom` | the caller arm's refusal: 409 naming both without plugin-wired admission; with it, already judged as D2a to D2d's TO (#32292) | the same | none | | I2 | the same as L2, for a mapping, the pair installed | `POST /data/OBJECT/import` with `mappingName: PNS_custom/NAME` | 200, rows imported through the first registered module's mapping | 409 naming M1 and M2, nothing written | narrowing | | B2 | the same as L2, for a dataset | the publish probes' dataset read, publishing package P.custom not registered | the first registered module's dataset probed | refused naming M1 and M2 (the widget is reported not probed) | narrowing | | B2′ | the same, P.custom registered | the publish probes' dataset read | refused (already: the caller arm) | the same | none | | L2r | App pair `P.custom` holds a stored row; M1, M2 ship NAME, a module the first registered shipper (real engine) | `/layers?package=P.custom` | 200, that module's body as `code` | 409 naming M1 and M2 | narrowing | | L2r′ | the same, another package registered ahead of the modules | `/layers?package=P.custom` | 409 (already: #32497 judges the code layer through `exactQualifierItem`) | 409 | none | | L1 | A and B enabled hold NAME, B registered first | `?package=A.custom`; the qualified path at `ANS_custom` | 200 A's body under B's `_packageId` | 200 A's body under A's | moved answer | | L1′ | the same | `/layers?package=A.custom`; the dataset and import doors | A's code layer, A's dataset run, A's mapping imported (already) | the same | none | | L1d | B disabled and registered first | `?package=A.custom` and its `/layers`; the qualified path; the dataset doors; the import door at `ANS_custom`; the publish probes for an unregistered A.custom | 404 (import: `404 MAPPING_NOT_FOUND`; probes: nothing found) | 200 A's item, run, imported, probed | widening | | L2d | M2 disabled and registered first | the same doors at `P.custom` / `PNS_custom` | 404 (the same spellings) | 200 M1's item, run, imported, probed | widening | | L1d-i / L2d-i | the import door alone, at the pair namespace of L1d and L2d (B or M2 disabled and registered first) | `POST /data/OBJECT/import` with `mappingName: ANS_custom/NAME` or `PNS_custom/NAME` | `404 MAPPING_NOT_FOUND`, nothing written | 200, rows written through A's (or M1's) mapping | widening (listed on its own per the epic delta read 6839753325; pinned by the two import pins; the changeset row rides #32874) | | R1 | A's pair override row at `A.custom`, B registered first | `?package=A.custom` | the row under B's `_packageId`, `_packageVersion`, `_provenance` | under A's | moved answer | | R2 | a row bound only to G, which ships nothing; either shipper order | `?package=G` | the row under the first registered shipper's envelope (`_provenance: package`) | its own stamp (`_packageId: G`), no artifact envelope | moved answer | | R2′ | the same | `/layers?package=G` | `code: null` (already) | the same | none | | R3 | the row bound to G, its only shipper disabled | `?package=G` and its `/layers` | 404 (withheld by the disabled shipper's grafted stamp) | 200, the row under its own stamp | widening | | R4 | the App pair's own row, two modules ship NAME, any order | `?package=P.custom` | the row under the first registered shipper's envelope | its own stamp (`P.custom`) | moved answer | Rows D2a to D2d hold in either module order, on the single door and the `/batch` entry, for `?package=P.custom` (the pair installed or not) and `?callerPackage=P.custom` naming a pair the registry does not hold. They are measured over a double whose admission admits by the dataset's object and whose query refuses an object the caller is not admitted to with `PERMISSION_DENIED` / 403, as the real service's gates do; the FROM column is that double on `main` 386891e, the TO column on this head. The epic seat ruled that running the one admitted module (D2c) is the #32292 admission narrowing, not a pick under red line 2, so it is declared as measured. On the widened rows L1d and L2d a dataset the address now resolves meets the query's own gates: under plugin-wired admission a caller admitted to it gets it run, any other caller its `403 PERMISSION_DENIED` (measured at this head by a probe; a name the read resolves keeps its answer under #32292). `GET /meta/dataset/NAME?callerPackage=P.custom` naming a pair the registry does not hold was measured by the contract review's delta round (probe 6) at `9fb9034c0`, whose source this head keeps: 409 naming both, both orders; with the pair installed the caller arm already refused. The other readers of the exact read, swept: the import job door `POST /data/OBJECT/import/jobs` parses through the same `prepareImportRequest` and mapping read as the sync door (read, not run); `/meta`'s other sub-resources take no `?package=` GET (the contract review's probe 2); the publish probes read a registered publishing package's dataset through the caller arm, which resolves to the holder's own address (unchanged) or refuses (unchanged), so only an unregistered publishing package moves; the permission save door's held-grants read is refused before it at the App pair, identically on both sides (the contract review's probe 3). The list scoped to an exact address does not move (follow-up card, below). **The fix** (three source hunks, unchanged since the card's development round): 1. **F1, the strict envelope** (`protocol-package-bindings.ts` `exactAddressArtifact`, called from `readMetaItem`). At an admitted exact address the artifact envelope is looked up at the one package the address reads (the named package when it holds the name, else its one admitted base) and kept only when it is that package's own (`_packageId` equal to it). Two admitted bases, or none, leave the body its own stamp. Before, the lookup asked at the pair id, which ships nothing, so `getArtifactItem`'s any-composite tier answered the first registered package that ships the name. 2. **F2, two admitted bases** (`protocol-exact-qualifier.ts` `exactQualifierItem`, one line). An item of one of TWO admitted bases (two modules of one App sharing its pair) no longer returns early; it falls through to the refusal naming both. Every door above shares this judge. 3. **F3 is no longer this card's.** The round-1 hunk that sent the `/layers` code layer through `exactQualifierItem` is on `main` already: #32497 carries the same call (its #32407 lines), so the merge took `main`'s file and this card no longer edits `protocol-meta-layered-reads.ts`. Compositions: the transport pins (`packages/rest/src/meta-qualified-item-route.test.ts`, `packages/runtime/src/domains/meta-qualified-item-read.test.ts`) and the dataset door pins (`packages/rest/src/analytics-routes.test.ts`) drive the real protocol over a real `SchemaRegistry`; the stored-row and no-row App pair pins (`packages/runtime/src/domains/meta-legacy-pair-served.test.ts`) and the import pins (`packages/rest/src/import-integration.test.ts`) drive the real ObjectQL engine with an SQL store. The stored rows are inserted straight into `sys_metadata`; the contract review measured the hydrated rows answering the same. ## Merges with main #32497 landed squashed as `0763bf6ec`. Its tree delta is byte-identical to `776474e8b..28b37fb` (the blocker's landed head): same 53 files, same `git patch-id --stable`. So the branch takes that head first and `main` second, both as merges, no rebase: - `6e575e3a` merges `28b37fbb7`. Conflicts, each resolved to the blocker's side for what #32497 owns: `protocol-meta-layered-reads.ts` (taken whole; see F3), and the REST and runtime test files where both sides appended a top-level `describe` at the same spot (both kept, the blocker's first). - `040e2d62` merges `main` 2f80f28. The only conflicts were three hunks where this card edits lines #32497 added (the #32501 location 1 pin flips below); each is the branch's side, which is `main`'s text plus the flip. - `git show --remerge-diff` of each merge touches only this card's files: `6e575e3a` → `protocol-meta-layered-reads.ts`, the REST and runtime `meta-qualified-item-*` tests; `040e2d62` → `package-scoped-exact-qualifier.test.ts` and the same two tests. - `1d8ea4ad` re-measures on `main` 2f80f28: the changeset drops the two `/layers` moves #32497 already made and narrows the App-pair-row `/layers` claim to the module-first shape; the three widening pins assert `/layers` beside the plain read; the stored-row App pair pin gains the two module-first cases. - Round 2, on the contract review r1 (6836136864): `667c39373` pins the dataset single and batch doors, the publish probes' dataset read, the import door's qualified `mappingName` with `GET /meta`'s qualified path at a pair namespace, and the no-row App pair on the real engine (S1); `0f9681d21` rewrites the changeset's declaration by registration shape and names every door (B1, B2, N4), and pins the publish probes' widenings; `9fb9034c0` adds the dispatcher's qualified path at the installed pair's namespace to the no-row pins. - The landing merge, on the delta round 6837692940: `7e51f8282` merges `main` 386891e (the PR went dirty after #32804). One conflict, `packages/rest/src/analytics-routes.test.ts`: both sides appended a top-level `describe` at the end of the file (this card's pair-address dataset doors, #32292's refusal-arm admission); both kept, this card's first (merge note A). `git show --remerge-diff 7e51f82` touches only that file (+3 / −3, the conflict's closing lines), and the diff against `main` was the same 11 files, +721 / −23, as before the merge. `a26140d22` pins the dataset doors under plugin-wired admission (merge note B; rows D2a to D2d, D2′); `72c4f9b18` and `6ff8d6912` restate the changeset's dataset clause, its BREAKING bullet and its widenings per admission case, and fix N5 and N6. ## Accepted deviation: pins of #32183 flipped Epic note 6820163174 asks this card to flip #32183's pins of location 1 when it lands: - `packages/objectql/src/package-scoped-exact-qualifier.test.ts` (`e9e2227e`): `?package=ENABLED.custom` beside a package-less row with the other holder disabled was pinned 404 when the disabled holder registered first; it is the row in both orders now. - `packages/rest/src/meta-qualified-item-route.test.ts` and `packages/runtime/src/domains/meta-qualified-item-read.test.ts` (in the resolution of merge `bb1ab33d`): the CONTROL "the enabled holder's pair serves its item" ran in the enabled-first order only; it runs in both orders now. ## Tests Red/green per leg (cases failed / cases in the group). Legs: **head**; **main** = the three source files put back at `main` 2f80f28's blobs, tests at head; **F1 off**, **F2 off**, **F1 strict off** = one hunk ablated through `scripts/ablation-replace.mjs` with a string-literal marker. Every leg rebuilt `@objectstack/metadata-protocol` (the REST, runtime and objectql suites read its `dist/`) and proved the marker reached `dist/` with `scripts/ablation-dist-preflight.mjs` (the main leg: `exactAddressArtifact` absent from every built file); every restore is blob == HEAD with `git diff HEAD` empty, and the final rebuild carries none of the three markers (`--absent`, exit 0 each). Round 1 pins, measured at `1d8ea4ad` (the contract review reproduced head 0, main 236, F1 off 170, F2 off 66): | pin group (file) | head | main | F1 off | F2 off | F1 strict off | |:--|:--|:--|:--|:--|:--| | REST `#32501` two enabled holders, both orders, plain + `/layers` (16 types × 2) | 0/32 | 32/32 | 32/32 | 0/32 | 0/32 | | REST other holder disabled, disabled first, plain + `/layers` | 0/16 | 16/16 | 16/16 | 0/16 | 0/16 | | REST other holder disabled, enabled first (order control) | 0/16 | 0/16 | 0/16 | 0/16 | 0/16 | | REST two modules of one App, both orders, plain + `/layers` | 0/32 | 32/32 | 0/32 | 32/32 | 0/32 | | REST one module disabled and first, plain + `/layers` | 0/16 | 16/16 | 16/16 | 0/16 | 0/16 | | REST CONTROL single holder | 0/16 | 0/16 | 0/16 | 0/16 | 0/16 | | REST #32183 CONTROL, disabled first (flipped) | 0/16 | 16/16 | 16/16 | 0/16 | 0/16 | | runtime dispatcher: the same seven groups | 0/144 | 112/144 | 80/144 | 32/144 | 0/144 | | runtime stored row: A's pair row, B first / A first (order control) | 0/2 | 1/2 | 1/2 | 0/2 | 0/2 | | runtime stored row: G's row, both orders; G's row, shipper disabled | 0/3 | 3/3 | 3/3 | 0/3 | 3/3 | | runtime stored row: App pair row, another package first (×2) | 0/2 | 2/2 | 2/2 | 0/2 | 2/2 | | runtime stored row: App pair row, a module first, no other shipper (×2) | 0/2 | 2/2 | 2/2 | 2/2 | 2/2 | | objectql #32183 location 1 arm, disabled first (flipped) | 0/2 | 2/2 | 2/2 | 0/2 | 0/2 | | metadata-protocol `lookupArtifactItem` call-site ledger | 0/2 | 2/2 | 0/2 | 0/2 | 0/2 | | **every test in the five files** | **0/783** | **236/783** | **170/783** | **66/783** | **7/783** | Round 2 pins, measured at `9fb9034c0`: | pin group (added in round 2) | head | main | F1 off | F2 off | F1 strict off | |:--|:--|:--|:--|:--|:--| | dataset single + batch: two enabled modules the only holders, `?package=` and `?callerPackage=` the App pair, both orders, pair installed or not | 0/4 | 4/4 | 0/4 | 4/4 | 0/4 | | dataset: CONTROL another package registered ahead (×2) | 0/2 | 0/2 | 0/2 | 0/2 | 0/2 | | dataset + publish probes: `?package=A.custom`, the other holder disabled first | 0/1 | 1/1 | 1/1 | 0/1 | 0/1 | | dataset + publish probes: the same, enabled first (order control) | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 | | dataset + publish probes: the App pair, one module disabled first | 0/1 | 1/1 | 1/1 | 0/1 | 0/1 | | dataset + publish probes: the same, disabled second (order control) | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 | | publish probes: a publish of the App pair the registry does not hold, both orders | 0/2 | 2/2 | 0/2 | 2/2 | 0/2 | | import + `GET /meta` qualified: `suite_custom/NAME`, two modules the only holders, both orders | 0/2 | 2/2 | 0/2 | 2/2 | 0/2 | | import: CONTROL another package registered ahead | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 | | import + `GET /meta` qualified: one module disabled first | 0/1 | 1/1 | 1/1 | 0/1 | 0/1 | | import + `GET /meta` qualified: one module disabled second (order control) | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 | | import + `GET /meta` qualified: `alpha_custom/NAME`, other holder first, then disabled | 0/1 | 1/1 | 1/1 | 0/1 | 0/1 | | import + `GET /meta` qualified: the same, base first (order control) | 0/1 | 0/1 | 0/1 | 0/1 | 0/1 | | runtime real engine: no stored row, a module first, no other shipper, `?package=`, `/layers` and the qualified path (×2) | 0/2 | 2/2 | 0/2 | 2/2 | 0/2 | | runtime real engine: no stored row, alpha ahead (×2, order control) | 0/2 | 0/2 | 0/2 | 0/2 | 0/2 | | **the 23 cases added in round 2** | **0/23** | **14/23** | **4/23** | **10/23** | **0/23** | Landing head pins, measured at `a26140d22` (the changeset commits after it change no test or source). The main leg puts the three source files back at `main` 386891e's blobs, which equal 2f80f28's: | pin group (added on the landing head) | head | main | F1 off | F2 off | F1 strict off | |:--|:--|:--|:--|:--|:--| | dataset single + batch, plugin-wired admission, `?package=` the App pair, both orders, the pair installed or not; each case admitted to both, to each module alone, to neither | 0/4 | 4/4 | 0/4 | 4/4 | 0/4 | | the same, `?callerPackage=` naming the App pair the registry does not hold, both orders | 0/2 | 2/2 | 0/2 | 2/2 | 0/2 | | CONTROL: the same, `?callerPackage=` naming the installed App pair (the caller arm), both orders | 0/2 | 0/2 | 0/2 | 0/2 | 0/2 | | **the 8 cases added on the landing head** | **0/8** | **6/8** | **0/8** | **6/8** | **0/8** | | every `#32501` case in the three files above (rest analytics and import, runtime pair-served) | 0/40 | 28/40 | 12/40 | 18/40 | 7/40 | The 32 cases of round 2's three files measure on the merged tree as they did at `9fb9034c0`: head 0, main 22, F1 off 12, F2 off 12, F1 strict off 7. Run per leg: `pnpm --filter PKG exec vitest run --maxWorkers=2 FILE` for `metadata-protocol` (`src/protocol.lookup-artifact-item-call-sites.test.ts`), `objectql` (`src/package-scoped-exact-qualifier.test.ts`), `rest` (`src/meta-qualified-item-route.test.ts`, and `-t 32501` over `src/analytics-routes.test.ts` and `src/import-integration.test.ts`), `runtime` (`src/domains/meta-qualified-item-read.test.ts`, `src/domains/meta-legacy-pair-served.test.ts`), each under `scripts/pm/os-verify-lock.sh`. ## Verification No source line moves from `1d8ea4ad7`. Per the epic's economy rule (Sales, revised 11-12, on the epic #31527 card page), after the landing merge only the gates the merge and the landing commits affect rerun (AGENTS.md multi-agent discipline §10), and the full dogfood battery runs once, on the landing head, this being a narrowing arm. Each heavy command under `scripts/pm/os-verify-lock.sh` (its VERDICT line read). Landing head `6ff8d6912`. The suites, typechecks and dogfood ran from `72c4f9b18`; `6ff8d6912` changes one sentence of the changeset and no test or source, and the changeset gates reran on it. - Rebuild after the merge (multi-agent discipline §9 and §10): `turbo run build` of the closure of `rest` and `runtime`, 37 tasks, VERDICT command-exit 0. `pnpm-lock.yaml` did not move. `packages/spec` moved on `main`'s side: `pnpm --filter @objectstack/spec check:generated` exit 0, 14 of 14 artifacts current against the merged build. - Delta against `main`: the same 11 files as before the merge; `git show --remerge-diff 7e51f82` touches only `analytics-routes.test.ts`. - The five legs of the landing pins (head, main, F1 off, F2 off, F1 strict off) at `a26140d22`: every ablation restored blob == HEAD with `git diff HEAD` empty; the last rebuild carries none of the three markers (`--absent`, exit 0 each). - The incoming commits touch the packages and the door this diff touches (`metadata-protocol`, `objectql`, the REST dataset door, `runtime`), so their suites and typechecks reran. `pnpm --filter @objectstack/metadata-protocol test`: 337 files passed, 7 skipped; 22786 tests passed, 36 skipped. `pnpm --filter @objectstack/rest test`: 407 files passed; 8285 tests passed, 332 skipped (round 2: 8257; #32292's describe and the 8 landing pins). `objectql` `src/package-scoped-exact-qualifier.test.ts`: 182 passed. `runtime` `src/domains/meta-legacy-pair-served.test.ts` and `src/domains/meta-qualified-item-read.test.ts`: 312 passed. Typecheck of `metadata-protocol`, `objectql`, `rest` and `runtime`: exit 0 each (the runtime test layer holds 27 files / 183 errors / 66 pinned signatures, unchanged). - Affected gates. `dispatch-gates.mjs --commands` derives the same 70 commands as round 1; rerun are the 19 whose inputs the merge or the landing commits touch (the changeset, the REST test file, the issues they cite): `check-adr-0087-registration --base origin/main`, `check-changeset-no-major --base origin/main`, `check-empty-changeset --base origin/main`, `check:changeset-gate-self-tests`, `check-closing-keyword-parity`, `check-issue-citations.mjs` and `check:issue-citations`, `check:nul-bytes`, `docs-audit/check-affected-docs`, `docs-audit/check-drift-comment`, `check:cross-package-test-inputs`, `check:test-source-alias`, `check:rest-log-spy-declared`, `check:route-envelope`, `check:dispatcher-error-vocabulary`, `check:error-status-conformance`, `check:type-check-coverage`, `check:type-check-debt` (under the lock; 0 entries re-measured above their number) and ESLint over `analytics-routes.test.ts`: exit 0 each. The three changeset gates and `check:nul-bytes` reran on `6ff8d6912`: exit 0 each. - Full dogfood battery on the landing head (`turbo run build --filter='@objectstack/dogfood^...'`, 70 tasks, then `pnpm --filter @objectstack/dogfood test`): VERDICT command-exit 0; 456 files passed, 3 skipped; 3831 tests passed, 42 skipped; no failure. Round 2, on head `9fb9034c0` unless noted: - The five legs above (head, main, F1 off, F2 off, F1 strict off): VERDICT command-exit 0; every ablation restored blob == HEAD, `git diff HEAD` empty, and the final rebuild carries none of the three markers (`--absent`, exit 0 each); tree == HEAD after the run. - `pnpm --filter @objectstack/rest test`: 407 files passed; 8257 tests passed, 332 skipped (round 1: 8238; the 19 added cases). - `vitest run src/domains/meta-legacy-pair-served.test.ts` (runtime): 19 passed; `src/domains/meta-qualified-item-read.test.ts` with it at `0f9681d21` (the file is unchanged since round 1): 312 passed over the two files. - `pnpm --filter @objectstack/rest typecheck` (at `0f9681d21`; no rest file changed after it) and `pnpm --filter @objectstack/runtime typecheck`: exit 0 each (the runtime test layer holds its 27 files / 183 errors / 66 pinned signatures, unchanged). - `pnpm lint` (at `0f9681d21`): exit 0; ESLint over the three test files changed after it: exit 0. - `node scripts/pm/dispatch-gates.mjs --commands`: the same 70 commands as round 1 (734 changed lines at `0f9681d21`). The sweep was stopped at 41 of 70 when the economy rule arrived, every one of the 41 exit 0; the battery runs whole on the landing head. Round 1, on head `1d8ea4ad7` (source identical to this head): - `dispatch-gates.mjs --ran` reconciliation: 70 derived, 70 run, 0 NOT-MEASURED, every exit 0 (`check:plugin-teardown-shape --self-test` after fetching its pinned fixture commit; `check:dual-build-cjs-loads` after building the seven packages outside this card's closure that had no `dist/`). - Changeset gates (`check-changeset-no-major`, `check-empty-changeset`, `check:changeset-gate-self-tests`) and `check-adr-0087-registration --base origin/main`: exit 0 each. The contract review re-ran the ADR-0087 gate at `--base 2f80f28`: exit 0. - `pnpm --filter @objectstack/metadata-protocol test`: 22786 passed, 36 skipped. Typecheck of `metadata-protocol`, `objectql`, `rest`, `runtime`: exit 0 each. - Full dogfood battery (`pnpm --filter @objectstack/dogfood test`): VERDICT command-exit 0; 455 files passed, 3 skipped; 3817 tests passed, 42 skipped; no failure. ## Acceptance notes - A single holder's pair address, every non-pair exact address, a module's own address, the bare read and the qualified path at a non-pair namespace answer as before (the CONTROL groups above, green on every leg). - `Metadata-protocol: none` stands: the epic red-line read 6835343873 amended ruling 6817871252's line to `none`, and the contract review r1 6836136864 agrees (nothing a metadata author can write is refused; the save door's read is refused before it, identically on both sides). - Ruling 6817992172's last paragraph (the source of round 1's composition sentence) was measured with another package registered ahead of the modules; the seat amends it on the card thread. The registration shape is stated above instead. - Seat ruling 6817992172 option B (taking the `/layers` code layer from a stored row's declared `overrides`) is not made here; the epic seat sees it at the red-line read. - #32662 (a sub-card of this one) stays open: the pair address of a name held only by stored rows of two enabled packages after a reboot is not touched here. - The dataset doors under plugin-wired admission (rows D2a to D2d) follow the #32292 admission narrowing (seat ruling 6817809380), which #32804 landed; the epic seat ruled on the card thread that running the one admitted module is that narrowing, not a pick, so the behaviour is declared as measured. - Follow-up card #32874 under #32501 (the epic read's nits, the review's N1 to N3, and the delta round's N7 and N8): the list scoped to an exact address still wears the first registered shipper's envelope (`readFlattenedMetaItems`), the stale `envelopePackageId` docblock and ledger `why`, and the refusal's "dependency closure" wording for the bases that share a pair. - Branch name `claude/project-thread-3jrz5i` is the card thread's harness-pinned branch (claim 6817588127), not `claude/issue-32501-…`. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` untouched.) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: n/a. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgXYPmTrQ4KGuKWzNh7)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgXYPmTrQ4KGuKWzNh7 <!-- signed: domain:server#7 · os-sales · session_01L6bhgVSjQBHNkZd6Eqx2XX --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent a2cb3aa commit c50d10c

11 files changed

Lines changed: 802 additions & 23 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@objectstack/metadata-protocol': patch
3+
---
4+
5+
fix(metadata-protocol)!: a pair address (`?package=<base>.custom`, or the pair namespace's qualified path) reads the package it names, so its envelope is that package's and an App pair two of whose modules hold the name is refused naming both, never answered by the first registered holder (ADR-0150 D5, #32501)
6+
7+
Clause-②: yes (narrowing) — the App pair address `<App>.custom`, when two enabled modules of the App hold the name and one of them is the first registered package that ships it, is refused `409 RESOURCE_CONFLICT` naming both modules where it answered with the first registered module's item, on every door that reads it: `GET /meta/:type/:name?package=<App>.custom` and its `/layers`, `GET /meta/dataset/:name?callerPackage=<App>.custom` naming a pair the registry does not hold (which reads as `?package=`), and the qualified path `GET /meta/:type/<App namespace>_custom/:name` (the installed pair's namespace), on both transports; the dataset query doors `POST /analytics/dataset/query` and `/batch` with `?package=<App>.custom`, or `?callerPackage=<App>.custom` naming a pair the registry does not hold, under an analytics service without plugin-wired admission or for a caller admitted to both modules' datasets (nothing is run); the import doors' qualified `mappingName` `<App namespace>_custom/<name>` (nothing is written); and the publish probes' dataset read for a publish of an App pair the registry does not hold. On the dataset doors under plugin-wired admission the refusal is judged over the modules the caller is admitted to, the #32292 admission narrowing carried over (seat ruling 6817809380), in either registration order: admitted to one module's dataset only, that dataset runs where the first registered module's dataset reached the query's own gates (`200` with it run when it was that module's, else `403 PERMISSION_DENIED`); admitted to neither, the answer is what a name nothing holds gets, `404 NOT_FOUND` byte for byte, where it was that `403`. `/layers` at an App pair that holds a stored row of a name two of its modules ship, when one of those modules is the first registered package that ships the name, is refused the same way where it reported that module's body as the code layer. With another package registered ahead of the modules, every one of these already answered the 409. The other moved answers keep their status and name the package the address reads in place of the first registered holder: the envelope (`_packageId`, `_packageVersion`, `_provenance`) of a base's pair address and of a stored row read at an exact address. Three widen from 404 to 200: on the same doors, the pair of an enabled base and an App pair one of whose two module holders is disabled, when the disabled holder registered first; on `?package=` and its `/layers`, a row of a package that ships nothing, its only shipper disabled.
8+
Metadata-protocol: none
9+
Skills-docs: none — `skills/**` and `content/docs/**` teach no read at a customization pair address of a name two packages hold; the prescription ships in the refusal text and the before → after list below.
10+
11+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped, and no export changes shape. The moved answers are reads of registered items and stored rows at an address, so there is nothing for a migration to rewrite and no tombstone. -->
12+
13+
**BREAKING** answer narrowing at the exact read (`@objectstack/metadata-protocol`), for the pair address of an App two of whose modules hold the name, on every door that reads that address.
14+
15+
- **Before → after, served → refused.** The App pair address, two enabled modules of the App holding the name and one of them the first registered package that ships it: 200 with the first registered module's item → `409 RESOURCE_CONFLICT`, `ambiguous-in-closure`, naming both modules. This holds on the real ObjectQL engine and on the bare `SchemaRegistry` composition alike; what decides the before is the registration shape: with another package registered ahead of the modules, the address already answered this 409. The doors that read the address, each with the same before and after:
16+
- `GET /meta/:type/:name?package=<App>.custom` and `GET /meta/:type/:name/layers?package=<App>.custom`; for a dataset, `GET /meta/dataset/:name?callerPackage=<App>.custom` naming a pair the registry does not hold reads as `?package=` and moves with it (with the pair installed, the caller arm already refused);
17+
- the qualified path `GET /meta/:type/<App namespace>_custom/:name`, which names the same address once the pair is installed;
18+
- `POST /analytics/dataset/query?package=<App>.custom` and the same query in `/analytics/dataset/query/batch` (that query's entry), and `?callerPackage=<App>.custom` naming a pair the registry does not hold, which reads as `?package=` and moves with it (with the pair installed, the caller arm already refused). Under an analytics service without plugin-wired admission (built by hand, its gates inactive), and for a caller admitted to both modules' datasets: the first registered module's dataset was run → nothing is run. Under plugin-wired admission the refusal is judged over the modules the caller is admitted to, the #32292 admission narrowing carried over (seat ruling 6817809380), in either registration order: admitted to the first registered module's dataset only, 200 with it run → the same; admitted to the other module's dataset only, `403 PERMISSION_DENIED` (the first registered module's dataset reached the query's own gates) → 200 with the admitted module's dataset run, the other module never named; admitted to neither, that `403` → `404 NOT_FOUND`, byte for byte what a name nothing holds answers, neither module named, nothing run;
19+
- the import doors `POST /data/:object/import` and `/import/jobs` with the qualified `mappingName` `<App namespace>_custom/<name>`: the rows were imported through the first registered module's mapping → nothing is written;
20+
- the publish probes' dataset read, for a publish of an App pair the registry does not hold: the first registered module's dataset was probed → the widget is reported not probed. A publish of a registered pair resolves through the caller arm, which already refused.
21+
22+
`/layers` at the App pair when the pair holds a stored row and two modules hold the name, one of them the first registered package that ships it: 200 with that module's body as `code` → the same 409; the plain read keeps serving the row, which is the pair's own and unambiguous, while the code layer has two holders. First-party callers: 0.
23+
- **Before → after, same status, another package named.** A base's pair address (`?package=<base>.custom`, or the qualified path at `<base namespace>_custom`), another enabled holder of the name registered first: the base's body under the other holder's `_packageId`, `_packageVersion` and `_provenance` → under the base's. A stored row at an exact address: the base's override row at its pair, the same; a row bound only to a package that ships nothing, under the first registered shipper's envelope → its own stamp, no artifact envelope; the App pair's own row beside two module holders, under the first registered shipper's envelope → its own stamp. `/layers` at the base's pair and at a package that ships nothing already answered the base's code layer, or `code: null`, and does not move. The dataset and import doors run and import the same item as before, and the publish probes probe it. First-party callers: 0.
24+
- **Before → after, widening.** A base's pair address, the base enabled and another holder of the name disabled and registered first: 404 → 200 with the base's item. The App pair address, one of two module holders disabled and registered first: 404 → 200 with the enabled module's item. Both on every door above: the dataset doors run the item where they answered 404 (under plugin-wired admission, for a caller admitted to that dataset; any other caller meets the query's own `403 PERMISSION_DENIED`, as a name the read resolves does under #32292), the import doors import through it where they answered `404 MAPPING_NOT_FOUND`, and the publish probes, for a pair the registry does not hold, probe it where they found nothing. `?package=<P>` and its `/layers`, where P ships nothing and holds a stored row of the name, its only shipper disabled: 404 (withheld by the disabled shipper's grafted stamp) → 200 with the row under its own stamp (pinned on these two doors; the dataset and import doors read the same address). The dataset doors under plugin-wired admission, the App pair, a caller admitted to the dataset of the module that did not register first only: `403 PERMISSION_DENIED` → 200 with that dataset run (above). First-party callers: 0.
25+
26+
**The remedy.** Read an item two modules of an App hold at the module's own address (`?package=<module>`, or the module's namespace in a qualified path or `mappingName`), as the refusal names.

‎packages/metadata-protocol/src/protocol-exact-qualifier.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ export function exactQualifierItem(
405405
}
406406
return item;
407407
}
408-
if (served === address.packageId || address.registryHolders.includes(served)) return item;
408+
// [#32501] An item of one of TWO admitted bases (two modules of one App
409+
// sharing its pair) is no more the address's than the other's: it falls
410+
// through to the refusal naming both below, never the first registered.
411+
if (served === address.packageId || (address.registryHolders.length === 1 && address.registryHolders[0] === served)) return item;
409412
// [#32076] A pair of the package the address names, or of a base it admitted, serves on that base's address
410413
// when the row is that base's (epic ruling on #31699 F2; {@link pairRowOnAddress}, the one owner check).
411414
const installed = installedManifestsOfEngine(host.engine);

‎packages/metadata-protocol/src/protocol-meta-item-reads.ts‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import { canonicalizeMetaRequestType } from './protocol-meta-type-schema.js';
5858
import {
5959
bundleMemberOf,
6060
envelopePackageId,
61+
exactAddressArtifact,
6162
mergeArtifactProtection,
6263
withRowBinding,
6364
} from './protocol-package-bindings.js';
@@ -1214,9 +1215,16 @@ export async function readMetaItem(host: Pick<ProtocolHost, 'artifactLockLayerAt
12141215
// [#23074] …and at the served item's own bundle member, whose artifact
12151216
// alone may lend it an envelope ({@link mergeArtifactProtection}): a
12161217
// member the package does not ship is served as the environment's own.
1217-
const artifactItem = host.lookupArtifactItem(
1218-
request.type, request.name, envelopePackageId(request.packageId, item), bundleMemberOf(request.type, item),
1219-
);
1218+
// [#32501] …and, at an admitted exact address, at the package that
1219+
// address reads, strictly ({@link exactAddressArtifact}): never the
1220+
// first registered holder the pair id's lookup fell back to.
1221+
const artifactItem = exactAddress
1222+
? exactAddressArtifact(exactAddress, (packageId) => host.lookupArtifactItem(
1223+
request.type, request.name, packageId, bundleMemberOf(request.type, item),
1224+
))
1225+
: host.lookupArtifactItem(
1226+
request.type, request.name, envelopePackageId(request.packageId, item), bundleMemberOf(request.type, item),
1227+
);
12201228
// [#21738] The lock is the one item-lock resolution's, over the layers
12211229
// this read resolved from its address: [#21803] every installed
12221230
// package that ships the name ({@link artifactLockLayerAt}), never the

‎packages/metadata-protocol/src/protocol-package-bindings.ts‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,33 @@ function envelopePackageId(requestedPackageId: string | undefined, served: unkno
238238
return requestedPackageId ?? (served as { _packageId?: string } | null | undefined)?._packageId;
239239
}
240240

241+
/**
242+
* [#32501, ADR-0150 D5, epic red line 2] The artifact envelope a read at an
243+
* admitted exact address wears: the artifact of the ONE package that address
244+
* reads, and only when it is that package's OWN (`_packageId` is it, the check
245+
* `shippedArtifactsOf` makes). That package is the one the address names when
246+
* it holds the name, else the one base it was admitted at; two admitted bases
247+
* (two modules of one App sharing its pair), or none (a row bound only to the
248+
* named package), leave the address no package to read an envelope from, so
249+
* the body keeps its own stamp.
250+
*
251+
* {@link envelopePackageId} looked the artifact up at the named package, a
252+
* pair id that ships nothing, so `registry.getArtifactItem`'s any-composite
253+
* tier answered the first registered package that ships the name: the pair
254+
* address of the second holder served its base's body under the first
255+
* holder's `_packageId`, `_packageVersion` and `_provenance`, and, the first
256+
* holder disabled, the item face withheld it by that stamp (404).
257+
* `lookup(packageId)` is the read's own artifact lookup at that package.
258+
*/
259+
function exactAddressArtifact(
260+
address: { readonly packageId: string; readonly registryHolders: readonly string[] },
261+
lookup: (packageId: string) => unknown,
262+
): unknown {
263+
const reads = address.registryHolders.length === 1 ? address.registryHolders[0] : address.packageId;
264+
const artifact = lookup(reads);
265+
return (artifact as { _packageId?: unknown } | null | undefined)?._packageId === reads ? artifact : undefined;
266+
}
267+
241268
/**
242269
* [#28831, #22024, ADR-0146 D8] The artifact envelope an item of the
243270
* per-package layer ({@link ObjectStackProtocolImplementation.getMetaItemsPerPackage})
@@ -509,6 +536,7 @@ export {
509536
bundleMemberOf,
510537
declinesBorrowedEnvelope,
511538
envelopePackageId,
539+
exactAddressArtifact,
512540
isShippedViewItem,
513541
mergeArtifactProtection,
514542
perPackageLayerEnvelope,

‎packages/metadata-protocol/src/protocol.lookup-artifact-item-call-sites.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@ function sitesOf(source: string, header: RegExp): Site[] {
116116
return sites;
117117
}
118118

119-
type Disposition = 'definition' | 'served-package envelope' | 'no';
119+
/**
120+
* [#32501] `exact-address envelope`: the by-name read at an admitted exact
121+
* address looks its envelope up at the one package that address reads, and
122+
* keeps the artifact only when it is that package's own
123+
* (`exactAddressArtifact`), so no first-registered fallback reaches it.
124+
*/
125+
type Disposition = 'definition' | 'served-package envelope' | 'exact-address envelope' | 'no';
120126

121127
/**
122128
* The recorded disposition of every site. `noPackage`: it passes no package,
@@ -130,6 +136,8 @@ const SITES: ReadonlyArray<Site & { readonly noPackage: boolean; readonly dispos
130136
why: '[#25467 cut 15] the definition\'s body, the function the class member delegates to' },
131137
{ file: ITEM_READS_FILE, member: 'readMetaItem', args: 'request.type, request.name, envelopePackageId(request.packageId, item), bundleMemberOf(request.type, item)', noPackage: true, disposition: 'served-package envelope',
132138
why: 'the by-name read\'s envelope: naming no package, the package of the item it serves (the list\'s rule); [#23074] at the served item\'s own bundle member' },
139+
{ file: ITEM_READS_FILE, member: 'readMetaItem', args: 'request.type, request.name, packageId, bundleMemberOf(request.type, item)', noPackage: false, disposition: 'exact-address envelope',
140+
why: '[#32501] the by-name read\'s envelope at an admitted exact address: the package the address reads, its own artifact only (`exactAddressArtifact` drops another package\'s), never the pair id\'s first-registered fallback' },
133141
{ file: LIST_READS_FILE, member: 'readFlattenedMetaItems', args: 'request.type, itemName, itemPackageId, bundleMemberOf(request.type, it)', noPackage: true, disposition: 'served-package envelope',
134142
why: 'the list\'s envelope: each item\'s own package, the rule the by-name read shares; [#23074] at each item\'s own bundle member' },
135143
{ file: ITEM_READS_FILE, member: 'readMetaItem', args: 'request.type, request.name, request.packageId', noPackage: true, disposition: 'no',

‎packages/objectql/src/package-scoped-exact-qualifier.test.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,17 +1145,15 @@ describe('[#31699] a package-less row of a name two packages hold is no holder\'
11451145
// 409 `ambiguous-in-closure` naming both. Re-enabled, as FROM.
11461146
const PAIR_B = `${B}.custom`;
11471147
const ROW_LABELS: Record<string, string> = { 'the environment\'s item': 'env dashboard', 'a package-less stored row': 'stored dashboard' };
1148-
it.each(HOLDER_ORDERS.flatMap(([order, ids]) => PACKAGE_LESS_ROWS.map(([row, add]) => [order, row, ids, add] as const)))('[#32183] dashboard (%s, beside %s): `?package=<enabled>.custom` serves the row as the enabled holder\'s customization, or 404 while #32501 location 1 stands; re-enabled, refused naming both', async (_order, row, order, addRow) => {
1148+
it.each(HOLDER_ORDERS.flatMap(([order, ids]) => PACKAGE_LESS_ROWS.map(([row, add]) => [order, row, ids, add] as const)))('[#32183] dashboard (%s, beside %s): `?package=<enabled>.custom` serves the row as the enabled holder\'s customization in both orders; re-enabled, refused naming both', async (_order, row, order, addRow) => {
11491149
for (const id of order) ship('dashboard', 'dup', id);
11501150
addRow();
11511151
registry.disablePackage(A);
11521152
const answer = await protocol.getMetaItem({ type: 'dashboard', name: 'dup', packageId: PAIR_B } as never);
1153-
// [#32501 location 1] With the disabled holder registered first, the pair
1154-
// address's envelope falls back to the first holder that ships the name,
1155-
// the disabled one, so the face withholds it (404), as the same fallback
1156-
// does on `main`. ⚠️ Flip this arm to the row (200) when #32501 lands.
1157-
if (order[0] === A) expect([labelOf(answer), /(env|stored|alpha|beta) dashboard/.test(JSON.stringify(answer ?? null))]).toEqual([undefined, false]);
1158-
else expect(labelOf(answer)).toBe(ROW_LABELS[row]);
1153+
// [#32501 location 1] The pair address's envelope is the package it reads
1154+
// (the enabled holder), never the first registered holder, so the disabled
1155+
// holder registered first no longer withholds the row (was 404).
1156+
expect(labelOf(answer)).toBe(ROW_LABELS[row]);
11591157
registry.enablePackage(A);
11601158
const err = await refusalOf(() => protocol.getMetaItem({ type: 'dashboard', name: 'dup', packageId: PAIR_B } as never));
11611159
expect([err.status, err.refusal.reason, sortedCandidates(err)]).toEqual([409, 'ambiguous-in-closure', [A, B]]);

0 commit comments

Comments
 (0)