Repository navigation
Commit c50d10c
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
File tree
- .changeset
- packages
- metadata-protocol/src
- objectql/src
- rest/src
- runtime/src/domains
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
409 | 412 | | |
410 | 413 | | |
411 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
1214 | 1215 | | |
1215 | 1216 | | |
1216 | 1217 | | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1220 | 1228 | | |
1221 | 1229 | | |
1222 | 1230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
241 | 268 | | |
242 | 269 | | |
243 | 270 | | |
| |||
509 | 536 | | |
510 | 537 | | |
511 | 538 | | |
| 539 | + | |
512 | 540 | | |
513 | 541 | | |
514 | 542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
| |||
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| 139 | + | |
| 140 | + | |
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | | - | |
| 1148 | + | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
1159 | 1157 | | |
1160 | 1158 | | |
1161 | 1159 | | |
| |||
0 commit comments