Repository navigation
fix(metadata-protocol): the merged list files a stored row's copy under its package column, not its body's _packageId - #38699
Conversation
…er its package column (#38573) The `metadata` service merge in getMetaItems slotted a hosted kernel's primed copy of a stored row by the `_packageId` its body carries, so a row bound to P with a body stamped Q was listed under P and Q, a list scoped to Q served it as Q's, and a legacy row with no column was listed as Q's. Read the service through listPackageBindings when it offers it and restate each row-held item's binding from the row's column (withRowBinding), as the stored rows are served. Pins on skill and agent. Claude-Session: https://claude.ai/code/session_01JQwxbYAjtLtucYL4W61z6Q Co-authored-by: Claude <noreply@anthropic.com>
…runtime-merge harness (#38573) Claude-Session: https://claude.ai/code/session_01JQwxbYAjtLtucYL4W61z6Q Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin de2303303273151b5294340c2750c124913912f2 && git checkout de2303303273151b5294340c2750c124913912f2
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e130fd43b6f8ff5ce7744ab39e22abd09e0314fe b9f066554af02b20354b7edd503d9d2bc43ee91a && git checkout -B drift-repro e130fd43b6f8ff5ce7744ab39e22abd09e0314fe && git merge --no-ff b9f066554af02b20354b7edd503d9d2bc43ee91a
node scripts/docs-audit/affected-docs.mjs --json e130fd43b6f8ff5ce7744ab39e22abd09e0314fe
|
|
repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu 维护者速读
席位核对ACCEPT · L1 · area o2-A · Head-sha
|
|
repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu 2026-11-30T07:10Z · Landing · seat ACCEPT 7270724673 at
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46371865560 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
…rvice's list footing (#38573) The merged list read asked listPackageBindings on every call, uncached. Inside a package move's transaction a flow re-sync waited up to 281 ms for it, so the moved flow was armed after the move answered and the dogfood move-in A3 read 404 at the package's address (queue build 46371865560). Memoize the binding read per (service, type) on the service's revision counter (ADR-0156 D2) and the service's own list bounds (30 s, 2 s degraded); a service without a revision is read every time. Claude-Session: https://claude.ai/code/session_01JQwxbYAjtLtucYL4W61z6Q Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-warren · session_01JQwxbYAjtLtucYL4W61z6Q Patch round · head b9f0665 (merge of origin/main 751e839 at aca2c1d)Patch round after the queue ejection (build 46371865560, Pins and runsPatch round pins, Patch-round runs (head b9f0665, merged with origin/main 751e839)
Correction to the PR body's Acceptance notesThe first note ("one more loader walk … uncached") no longer holds: the binding read is memoized on the service's |
|
repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu 维护者速读
席位核对ACCEPT · L1 · area o2-A · Head-sha Supersedes ACCEPT 7270724673 (at
|
|
repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu 2026-11-30T08:55Z · Re-landing · seat ACCEPT 7273503695 at
|
… that name no package give the answer the read names (objectstack-ai#38752) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9BzWvmsAKskRGFXQ4iwDJDW)_ Fixes objectstack-ai#34452 Refs objectstack-ai#34346, objectstack-ai#34417, objectstack-ai#33904, objectstack-ai#34258 (the fold's members, closed into objectstack-ai#34452 on 2026-11-20) and objectstack-ai#33127 (heal 2 only) Clause-②: no (narrowing) Metadata-protocol: none Skills-docs: none — no key an author writes changes; the moved answers are writes, a restart and action reads that name no package, which the skills already teach as "name the package" ## 维护者速读 - 用户能看到什么变化:同名元数据在不点名包时,写入、重启后的读取、动作的读取,都和读取给出同一个答案:停用包当作不存在,环境自己的条目先答,不再随保存或注册顺序变化。 - 为什么做:这是同名读取折叠组 objectstack-ai#34452 的写门与水合半边(读门半边是已合并的 objectstack-ai#38640),合并即关 objectstack-ai#34452;四张成员卡与 objectstack-ai#33127(只修第二处 heal 2)随折叠组关闭。 - 出错会怎样:不点名包、去写或读共享名字的调用方,会改拿 409 冲突或环境自己的条目;点名包就能拿回原来那份。改动可以整体撤回。 - 要你做什么:无(契约复审由席位送审)。 ## What changes Five criteria, one commit each, on `main` after objectstack-ai#38640: 1. **objectstack-ai#34346** (9d731b0): two enabled packages ship a name, and its stored rows are bound to a disabled package D and to one of them, E. The bare publish save, the bare draft save and the bare delete now refuse 409 naming the two enabled holders, as the bare read does. They never name D, and they write or remove nothing. `?package=E` saves and deletes as before. Before, the publish save wrote E's row (200), and the draft save and the delete refused naming E and D. (packages/metadata-protocol/src/protocol-save.ts, protocol-diff-delete-load.ts) 2. **objectstack-ai#34417** (0a14e90, criterion rewritten by the seat to ruling 6942962369): the environment's package-less doc row, hydrated after the artifacts registered (`loadMetaFromDb`), answers first on every bare door, on both transports and in both registration orders. Each holder's exact address (the plain read and `/layers`) reads that holder's own doc. Before, the hydrator grafted the first registered holder's envelope onto the row, so `?package=FIRST` served the environment's row under that holder's name and the bare doors refused 409. (protocol-registry-hydration.ts) 3. **objectstack-ai#33127 heal 2** (a8bf411, `Refs`): for the three healed overlay types, a package-less row with no holder served wears no envelope and is recorded with no holder, by the hydrator and by the heal alike. The enable that later serves one holder builds the row under that holder's envelope, as the hydrator lays it then. Before, the lookup that names no package answered a disabled holder's artifact, and the heal dropped the record. No door's answer moves (registry-only; the pins are in packages/objectql/src/package-scoped-exact-qualifier.test.ts). 4. **objectstack-ai#33904** (616d76d, b61bcd2, 73c2de8 and 9910fbc, ADR-0150 D4, ruling 6942962369): a package's action of a name on one object, and the environment's own package-less action of the name on another object that no package's action of the name binds, are separate items at D4's key `(package, objectName, name)`. One predicate, `holdsEnvironmentOwnAction` (sys-metadata-repository.ts), reads the environment's own action off the item's active rows. The read naming no package serves its row and version, the merged list slots an action by `(name, object)` where a package's action of the name binds that object, an object-less action being a key of its own (elsewhere, by name as on `main`, so a platform item and the environment's object-less row of its name stay one slot, which `/actions/_env/OBJECT/NAME` reads as the platform item's key: runtime action-package-addressing.test.ts), and the delete naming no package removes the environment's row and retires the registry's bare-slot entry it left. With no such row, every door answers as before. Before, the plain read, `/layers` `effective` and `/published` served the package's item, the list named only it, and the delete removed the package's row. The same holds with the package's action object-less and the environment's on an object (73c2de8; before it, the list named only the package's). **List cells with no environment-own action** (73c2de8, declared in the changeset bullet "The merged action list where a package binds the object" and in the `environment-action-on-another-object-answers-first` entry). Two packages P1 on `account` and P2 on `contact`, a package-less row on `account`: FROM the row listed under both packages and P2's own action dropped, TO the row listed as P1's customization and P2's own action listed. A list scoped to a code package on `account`, the environment's row on `contact` passed as a stand-in: FROM the package's slot serving the environment's body, TO the package's own action. A platform action of the name (no package, no stored row) on `lead`, or object-less, beside a package's action on `account` or object-less (9910fbc, the contract review's S3): FROM the platform action dropped, TO both listed (the bound variant moved at 616d76d, the object-less one at 73c2de8); the bare read already refuses that name 409 naming both, so the list now names the two candidates the refusal names. Pins: packages/metadata-protocol/src/protocol.action-list-slot-key.test.ts, red on `main` (8) and on b61bcd2 (3: the object-less cells). 5. **objectstack-ai#34258** (fa54140, ADR-0150 D3/D4): a package-less action row is withheld or served by the holders at its own `(object, name)` key, not the name's. With two or more holders bound to the key, the envelope lookup (`lookupArtifactItem`, protocol-artifact-lookup.ts) lends the ONE enabled holder's envelope; with two enabled holders, or none, it answers as before. The face's withhold judges the key's holders (`actionKeyHoldersOf`, protocol-meta-item-face.ts). Before, a disabled and an enabled holder on the row's object made the row wear the disabled one's envelope when it registered first, and the read withheld it (404). And an enabled package holding the name on another object kept a key whose every holder is disabled served. **Narrowing cell.** Every holder on the row's object disabled (A and B on `account`), an enabled C holding the name on `contact`, the environment's row on `account`: the read naming no package moves FROM 200 serving the row (the name's holders were judged, and C is enabled) TO 404, as a key whose every holder is disabled answers with no other holder of the name. The `!` and `Clause-②: no (narrowing)` cover it. Pin: rest `[objectstack-ai#34258]` "A and B disabled on `account`, C enabled on `contact`" (the "objectstack-ai#34258 key" ablation arm turns it red). The changeset bullet, the `package-less-action-row-judged-at-its-key` entry and the pin title give it as FROM 200 → TO 404 (b0e3f1d, text only). Plus (10c011f) four ADR-0087 semantic entries under step 19: `bare-write-beside-disabled-row-refused-naming-shippers`, `hydrated-doc-row-wears-no-holder-envelope`, `environment-action-on-another-object-answers-first` and `package-less-action-row-judged-at-its-key`. Also the changeset `.changeset/34452-same-name-writes-and-hydration.md` (BREAKING banner, FROM and TO per criterion; objectstack-ai#33127 heal 2 noted as moving no door). What `Fixes objectstack-ai#34452` leaves open, each with its home: - objectstack-ai#34452's scope appendix 7259555802 listed an `_env` cell (the `_env` draft and layered reads answering 409 naming the disabled registry holder). It is moved out of this PR on the seat's ruling, because it is a different mechanism: `admitEnvironmentQualifier` falls back to registry holders, disabled ones included. Filed as objectstack-ai#38753. - objectstack-ai#33127 heal 1 (see Acceptance notes): filed as objectstack-ai#38754. - A bare read of a name whose every holder is disabled answers 404: not to be done, ruled on objectstack-ai#34348 (7187668758). - With ONE enabled shipper beside a disabled one, the bare draft save and the bare delete still refuse 409 naming the disabled package: filed by the seat as objectstack-ai#38769, closed as a duplicate into objectstack-ai#38753 (the `packagelessHolderRefusal` docblock names it as a known gap, citing objectstack-ai#38753). - The hydrated doc row's envelope with one shipper: filed by the seat as objectstack-ai#38770. ## Tests Flipped pins (each pinned the FROM the criterion moves): - packages/runtime/src/domains/meta-disabled-holder-artifact-door.test.ts: the review M1 CONTROL that pinned objectstack-ai#34417's FROM is replaced by the criterion's `[objectstack-ai#34417]` pin. - packages/metadata-protocol/src/protocol.packageless-save-address.test.ts: the objectstack-ai#33904 FROM pins (the read and the delete naming no package answering P's item) now assert the TO. - packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts and action-list-packageless-other-object.dogfood.test.ts: the objectstack-ai#33904 FROM legs (read, delete, list) now assert the TO. New pins: - `[objectstack-ai#34346]` in packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts: the three bare writes refuse naming the two shippers and nothing moves, plus a `?package=E` CONTROL. - `[objectstack-ai#34417]` in meta-disabled-holder-artifact-door.test.ts: both transports, both registration orders. - `[objectstack-ai#33127 heal 2]` in packages/objectql/src/package-scoped-exact-qualifier.test.ts: the enable while no holder is served, and the hydrator run in that state. - packages/runtime/src/domains/meta-environment-action-other-object-33904.test.ts (new file): every door naming no package, the list, a restart, the delete, the version, plus CONTROLs with no environment row. - packages/metadata-protocol/src/protocol.action-list-slot-key.test.ts (new file, 73c2de8): the list's slot key, cell by cell with each FROM in the title, plus five CONTROLs (a platform action on the package's object sharing its slot, a customization on the package's object, an object-less customization, a platform item with the environment's object-less row kept one slot, another type slotted by name). - `[objectstack-ai#33904] P's action OBJECT-LESS, the environment's on \`task\`` in protocol.packageless-save-address.test.ts (73c2de8): the list names both, the bare read serves the environment's, the bare delete removes the environment's row. - `[objectstack-ai#34258]` in packages/rest/src/meta-qualified-item-route.test.ts: two disabled holders on the key beside an enabled one on another object (404, both orders), plus the card's CONTROL (one disabled and one enabled on the key: served as C's customization). ## Acceptance notes - objectstack-ai#33127 heal 1 (S1) is not done, on the seat's ruling (objectstack-ai#38754): an install sends no notice, so there is no trigger for it. With an install in that state, every door answers 409 naming E and F in all three states. Only the registry's scoped read of E and the execution list keep the row until the next unscoped hydration. Reported to the seat. - objectstack-ai#34258: the name-grain stored-row check (`enabledRowHolds`) stays as on `main`. A key-grain filter was written and ablated. It turned no pin red, because a sealed holder's rows are declined first (`declinesStoredRow`), so it was dropped as unreachable. - The envelope lookup keeps its earlier answer for two enabled holders at one key (`protocol-artifact-lookup.action-owner-key.test.ts` CONTROL, unchanged). The bare read refuses that name before any envelope. - Rebased over objectstack-ai#38594 (merged), which added `rollback` to the disabled-holders verb. The two helpers this PR adds (`enabledHoldersRefusal`, `disabledRowHoldersRefusal`) take every verb but `rollback`: no rollback door calls them, and the 409 message has no rollback wording. ## Verification Head 5db4acc. It adds two commits to 73c2de8: 9910fbc (the contract review's S3: the platform-action list cell declared in the changeset bullet and the `environment-action-on-another-object-answers-first` entry, the count corrected to three cells, three pins and a CONTROL; no code moves) and 5db4acc (N5: the known-gap note cites objectstack-ai#38753). On them, under the lock (`VERDICT command-exit 0` each): spec build, `gen:migration-registry` no diff, spec migrations 209/209, spec `test:repo` 1608/1608, the two metadata-protocol list and save-address files 120/120 (the list file 13/13), typecheck of metadata-protocol and spec; gate families 1 to 81 of the 103 ran on 9910fbc and 82 to 103 plus `check-issue-citations` on 5db4acc (the two differ by one comment), every one exit 0, `dispatch-gates --ran`: 103 derived, 103 run, 0 NOT-MEASURED; overlap-check `VERDICT clean exit 0` against `origin/main` 6ba8ddd. On 73c2de8 every CI check passed, `Dogfood battery (opt-in)` included (66 success, 13 skipped); a new run is owed on this head. On 73c2de8, on `main` cb8d853 (after objectstack-ai#38640, objectstack-ai#38594, objectstack-ai#38699 and objectstack-ai#38712), in this container, heavy runs under `scripts/pm/os-verify-lock.sh` (shared box). 73c2de8 answers the contract review (S1, S2, N1 to N3): a package's object-less action is a list key of its own, the two list cells that moved are measured, pinned and declared FROM and TO, and three text fixes (the `packagelessHolderRefusal` docblock keeps its known gap; the bare-write entry's surface excludes a stored package-less row; the hydrated-doc entry counts a disabled shipper). On it, under the lock (`VERDICT command-exit 0`, held 1h27m40s): `pnpm build` 123/123; `gen:migration-registry` no diff; spec migrations 209/209; metadata-protocol 23813 passed / 45 skipped; runtime, the whole package, 658 files, 12568 passed / 27 skipped; rest 9099 / 351 skipped; objectql 14570; the two dogfood files 6/6; `test:repo` of objectql, rest, runtime, spec, core and types; typecheck of metadata-protocol, runtime, rest, spec and objectql; all 103 derived gate families exit 0 (`dispatch-gates --ran`: 103 derived, 103 run, 0 NOT-MEASURED); overlap-check `VERDICT clean exit 0` against `origin/main` bb86347. b61bcd2 fixes two CI reds of b0e3f1d, both from objectstack-ai#33904's list slot: the local helper's name `actionObjectKey` was the objectstack-ai#14878 dead member the tree-wide repo pins refuse (renamed `actionSlotSuffix`), and slotting EVERY action by object split a platform item from the environment's object-less row of its name, so `/actions/_env/lead/approve` served the platform item instead of 404 (runtime action-package-addressing.test.ts; bisected with rebuilt dists: `main` and the first three commits green, 616d76d red). On b61bcd2, under the lock (`VERDICT command-exit 0`): metadata-protocol 23803 passed / 45 skipped; runtime, the WHOLE package, 658 files, 12568 passed / 27 skipped; `test:repo` of runtime, objectql, rest, spec, core and types; rest 9099 / 351 skipped; the two dogfood files 6/6; typecheck of metadata-protocol and runtime; `check:issue-citations`, `check-nul-bytes`, `check:adr-symbol-anchors`, `check:slot-lookup`, `check:type-check-debt`, `check:query-options-erasure`, `check:undeclared-dep-imports`, each exit 0; overlap-check clean. The earlier local runtime reading covered `src/domains` only, which is how this cell was missed. b0e3f1d (the L1 delta) changes text only: the changeset bullet, the entry, a pin title and two docblocks. On it, under the lock (`VERDICT command-exit 0`): spec build, `gen:migration-registry` (no diff), spec migrations 209/209, the CLI `migrate-meta-engine-guidance` pin 3/3, `check-adr-0087-registration`, `check-changeset-no-major`, `check-empty-changeset`, rest `meta-qualified-item-route.test.ts` 439/439, metadata-protocol typecheck, `check:upgrade-guide`, `check:issue-citations`, `check-nul-bytes`, each exit 0; overlap-check clean. <details><summary>Suites</summary> Under the verify lock: `VERDICT command-exit 0` (held 1h12m59s). | run | exit | result | |:--|:--|:--| | `pnpm install --frozen-lockfile` | 0 | | | `pnpm --filter @objectstack/spec gen:migration-registry` | 0 | no diff | | `pnpm --filter @objectstack/spec exec vitest run src/migrations` | 0 | 5 files, 209 tests | | `pnpm build` | 0 | 123/123 tasks | | `pnpm --filter @objectstack/metadata-protocol test` | 0 | 376 passed, 9 skipped files; 23803 passed, 45 skipped tests | | `pnpm --filter @objectstack/objectql test` | 0 | 641 files, 14570 tests | | `pnpm --filter @objectstack/rest test` | 0 | 442 files; 9099 passed, 351 skipped tests | | `pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains` | 0 | 245 files; 7487 passed, 6 skipped tests | | dogfood, the two files this PR changes (`action-save-packageless-other-object`, `action-list-packageless-other-object`) | 0 | 2 files, 6 tests | | `typecheck` of metadata-protocol, runtime, rest, spec, objectql | 0 each | | The full dogfood battery is not run locally: this PR's title carries `!`, so it is owed by the opt-in CI lane (`Dogfood battery (opt-in)`) on this head. For reference, an earlier full dogfood run on the same commits over `main` 830ff8b passed: 495 passed and 3 skipped files, 4187 passed and 68 skipped tests. That earlier run also found three type errors after the rebase onto objectstack-ai#38594 (the verb above, and an `undefined` narrowing in `lookupArtifactItem`). They were fixed in the commits that introduced them, and the runs above are on the fixed head. </details> <details><summary>Ablation (dev-ablation.md: commit first, mutate with ablation-replace, rebuild, dist preflight, run, restore from HEAD, prove an empty git diff HEAD, rebuild, preflight --absent)</summary> Run on the branch before the rebuild from `main`. The code is the same, apart from the two type-only fixes named under Suites, which move no runtime path. | arm | mutation | pins red | restored | |:--|:--|:--|:--| | objectstack-ai#34346 | the bare-write refusal beside a disabled binding made conditional (two guards in protocol-save.ts) | runtime `[objectstack-ai#34346]` 4 | diff empty, marker absent | | objectstack-ai#34417 | the hydrated environment doc grafts the holder's envelope again | artifact-door `[objectstack-ai#34417]` 2 | diff empty, marker absent | | objectstack-ai#33127 heal 2 | the no-holder-served branch and its record made conditional | objectql `[objectstack-ai#33127 heal 2]` 2 | diff empty, marker absent | | objectstack-ai#33904 predicate | `holdsEnvironmentOwnAction` answers false | metadata-protocol 3, runtime 3 | diff empty, marker absent | | objectstack-ai#33904 list slot | the list slots actions by name again | metadata-protocol 2, runtime 2 | diff empty, marker absent | | objectstack-ai#33904 list slot, b61bcd2 | arm A: by name again; arm B: every bound object joins the slot (the b0e3f1d rule) | A: metadata-protocol 2, runtime 2, dogfood list 2; B: runtime `action-package-addressing` 1 | each: `git status --porcelain` empty, rebuilt, marker absent | | objectstack-ai#33904 list slot, 73c2de8 | an object-less action is no key of its own again (the b61bcd2 rule) | metadata-protocol 3 (the two object-less list cells and the object-less pin in packageless-save-address); runtime 0 | `git status --porcelain` empty, rebuilt, marker absent | | objectstack-ai#33904 delete heal | the bare-slot entry is not retired on delete | runtime 1 | diff empty, marker absent | | objectstack-ai#34258 lookup | the one enabled holder at the key no longer lends the envelope | rest `[objectstack-ai#34258]` 1 (the CONTROL) | diff empty, marker absent | | objectstack-ai#34258 key | the face's key-grain withhold made conditional | rest `[objectstack-ai#34258]` 1 | diff empty, marker absent | | objectstack-ai#34258 stored rows | a key-grain filter on `enabledRowHolds` (since dropped) | 0: unreachable, see Acceptance notes | diff empty, marker absent | The lookup leg was run again after the fix kept the earlier answer for two enabled holders (the lookup CONTROL in metadata-protocol had gone red in the full suite): 1 red, restored. An `ablation-dist-preflight --absent` reading exits 3 while untracked files are in the tree, even when the dist reading passes; the final readings were taken on a clean tree. </details> <details><summary>Gates</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 103 families for this diff. All 103 ran on 73c2de8, again across 9910fbc and 5db4acc (see Verification), and before them on 10c011f, after the build above, each with `< /dev/null`, and every one exited 0. This includes `check:type-check-debt`, `check:query-options-erasure` and the `migrate-meta-engine-guidance` CLI pin. `dispatch-gates --ran`: 103 derived, 103 run, 0 NOT-MEASURED, 0 UNRUN. `node scripts/pm/overlap-check.mjs`: merges cleanly with `origin/main` 6ba8ddd, `VERDICT clean exit 0`. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmQmQ1jpFsNcARMbY56 <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmQmQ1jpFsNcARMbY56 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Warren · project thread
Fixes #38573
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
getMetaItemslays the storedsys_metadatarows over the items themetadataservice lists (protocol-meta-list-reads.ts, the runtime merge). On a hosted kernel that service is a primedMetadataManager: itslistanswers the BODY of each stored row it read, and a body can carry a_packageIdstamp naming another package than the row's package column. The stored rows themselves are served with the column's binding (withRowBinding), but the service's copy re-entered under its body stamp, so for a row bound to P with a body stamped Q:The merge now reads the service through
IMetadataService.listPackageBindings(#37039) when the service offers it, and restates each item a stored row holds (source: 'row') with that row's column throughwithRowBinding, the rule every other read of a stored row already states its package by. An item no stored row holds (source: 'registration') keeps its body unchanged, so #7654's package-less override over a code baseline still stands in for the code package. A service withoutlistPackageBindingsis read throughlistas before (the contract says such a service cannot tell the two apart).Responsibility: the runtime merge slotted service items by
item._packageIdsince before #37039 added a binding read; the fix and its consumer contract both live in this repository, and cloud'sSkillRegistry(cloud PR #5223) already reads the protocol's merged list as the row binding.Tests
New top-level
describein the existing harnesspackages/metadata-protocol/src/protocol.meta-list-runtime-baseline-dedup.test.ts(the runtime-merge harness), pins onskillandagent:listPackageBindingsstill reads bodies (both slots, as before).Red on
origin/main5ac1ee0 with only the test added: 4 failed / 13 passed (the env-wide and Q-scoped cases on both types; the received list wasdiffers|com.example.crm,differs|com.example.policy,legacy|com.example.crm). Green with the fix: 17/17.Local runs (heads 36ab001 and 88569ee)
pnpm --filter @objectstack/metadata-protocol test: Test Files 374 passed, 9 skipped; Tests 23698 passed, 45 skipped; lock VERDICT command-exit 0.pnpm --filter @objectstack/metadata-protocol typecheck: VERDICT command-exit 0.dispatch-gates.mjs --commands, 67,--ranreconciled 67/67) at 36ab001: 63 exit 0;check:test-source-aliasexit 1 (this harness reached the protocol's lazy@objectstack/lintload inside a case), fixed in 88569ee with a module-top import and re-run exit 0.check:dual-build-cjs-loadsandcheck:lean-entry-closureneed every package'sdist/(no full build in this container);check-plugin-teardown-shape.mjs --self-testneeds an unshallow clone (checker health only, not a PR verdict). CI runs all three.Acceptance notes
getMetaItemscall with ametadataservice that offerslistPackageBindingsnow runs one more loader walk for row columns (MetadataManager.listPackageBindingsis uncached;DatabaseLoaderreads through its row cache). Not measured on a live kernel.readItemFromMetadataService) was not examined for the same body-stamp question; this PR changes the list only.Verification
pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.meta-list-runtime-baseline-dedup.test.ts— expect 17 passed; revert the source hunk and expect 4 failed.Generated by Claude Code