Repository navigation
fix(runtime)!: the action route answers by who holds the name on the route, and the environment address answers its own item - #33274
Conversation
…oute WIP: holder census for the bare route, _env own-address read. Claude-Session: https://claude.ai/code/session_016WV4cyWLSMyXZGc6dwhCAu Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check11 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 30 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 9ec3573a06cdb448b721c9a560dab8879ad3c865 && git checkout 9ec3573a06cdb448b721c9a560dab8879ad3c865
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin b4624440e699395d1929b1eb7d77f60b4185c481 df8b83647c867d4e756566e0c13704549df6b044 && git checkout -B drift-repro b4624440e699395d1929b1eb7d77f60b4185c481 && git merge --no-ff df8b83647c867d4e756566e0c13704549df6b044
node scripts/docs-audit/affected-docs.mjs --json b4624440e699395d1929b1eb7d77f60b4185c481 |
… the route Every cell of the four cards in both registration orders; the #32995 object-less disabled holder; the ruling-A citation reworded; changeset. Claude-Session: https://claude.ai/code/session_016WV4cyWLSMyXZGc6dwhCAu Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentAnswering the bare route from who holds the name on the route, instead of from a by-name read that cannot see the object, is the right model for ADR-0150 D3/D4 and removes the registration-order dependence the cards describe. The narrowing row is main's own answer applied consistently and is declared. The design fails only on cost and isolation: the census must not touch the store, or change any outcome, for compositions it does not decide. With M1 fixed and pinned this is PASS. Implemented-by: VERDICT: FAIL M1 (code + pins) → delta review by review#3. N1 optional. |
…ore reading the store A name one holder holds never reads the environment's store: no scans per dispatch, and no degraded answer while the store is down. Review M1. Claude-Session: https://claude.ai/code/session_016WV4cyWLSMyXZGc6dwhCAu Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#5 · os-elon-musk · session_016WV4cyWLSMyXZGc6dwhCAu Delta for review#3 M1 (record 6879733874): composition guards run on the listing before any store read. |
|
Contract-review-claim: session_016WV4d1PGptBW3QRQNmy5e6 · head b30e9bb · 2026-11-14T17:40:46Z review#3 (delta). |
Contract reviewServed-tier: Delta over my FAIL at ① Derived judgments
② Semver levelUnchanged from the first record: ③ Boundary flags
④ Design judgmentUnchanged: answering the bare route from who holds the name on the route is the right model for ADR-0150 D3/D4. With the census now consulting the store only for the compositions it decides, its cost and failure stay inside those compositions. One-holder behaviour is unchanged in both outcome and cost. The design holds. Implemented-by: VERDICT: PASS |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43627457171 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:server#5 · os-elon-musk · session_016WV4cyWLSMyXZGc6dwhCAu Queue build 43627457171 red on a new signature:
|
# Conflicts: # packages/runtime/src/action-package-addressing.test.ts
|
domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 The queued head Local on the merged tree: |
Review carry — PASS standsHead-sha: This head is a merge of Reviewed-by: |
…aa658a CHANGELOG entry (objectstack-ai#33413) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DDwkEEJd65kqFZGFjQnzBQt)_ Refs objectstack-ai#32995 (item 3 — items 1 and 2 land in objectstack-ai#33274) Area-lease pilot objectstack-ai#33059 · area E2b · seat `domain:server#5` · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382 ## What changes One clause is removed from the released `@objectstack/runtime` 18.4.0 CHANGELOG entry for `6aa658a` (the bare action route serves the environment's own action declaration on an object no holder of the name binds): > ~~An environment item with no object answers on `lead` too, and an item bound to `lead` comes before one with no object.~~ > An environment item with no object answers on `lead` too. Docs-only. No code, no test, no changeset. ## Why objectstack-ai#32995 item 3 (epic red-line read 6842078446, text re-read 6842317355): the clause describes a case the registry cannot hold. It keeps one package-less item per action name, so the environment never has an item bound to `lead` and an object-less one at the same time, and the order between them cannot be observed. AGENTS.md (RELEASE-OWNED table, `packages/*/CHANGELOG.md`) routes a factual error in a released entry to a dedicated docs-only PR that amends that entry, never an erratum in a later one. The clause appears nowhere else on `main` (`git grep "comes before one with no object"` → this entry only). ## Verification - `git diff origin/main` — one line in `packages/runtime/CHANGELOG.md`, the clause only. - No other file states the order. Clause-②: no Metadata-protocol: none ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (n/a) - [x] 2. Every name I added uses the casing for its kind. (n/a) - [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 — n/a, docs-only amendment of a released entry. - [x] 6. `packages/spec` touched: n/a. - [ ] 7. No hand edits to `packages/*/CHANGELOG.md` — deliberate exception: AGENTS.md's dedicated docs-only amendment of a released entry. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cz4f7zEQZ2C9GTG382 Co-authored-by: Claude <noreply@anthropic.com>
…es in that package's own registry slot, so each address serves its own row in every order (ADR-0150 D3/D4) (objectstack-ai#33513) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D75mRNRrsy6GfiJD9q7La4j)_ Part of objectstack-ai#33127 (its main case and the per-package overlay slot; the card stays open for its unpinned heal items: Heal 1, Heal 2 and S1) Fixes objectstack-ai#32900 Fixes objectstack-ai#32663 Fixes objectstack-ai#32662 Refs objectstack-ai#32692 Clause-②: yes (narrowing) Metadata-protocol: semantic Skills-docs: none — `skills/**` and `content/docs/**` teach no reading of a name two packages each store a row of (grepped `?package=`, `.custom`, `409`: the hits are the pair's save door, a flow's secret refusal and a permission grant), so no taught sentence moves; the read naming no package keeps its `409` and its `?package=` remedy. ## 维护者速读 - 改了什么:注册表以前对"绑定到某个包的存储行"每个名字只留一个裸槽位,最后加载的行占住它;现在每一行进它自己包的覆盖槽位(`.custom` 配对包的行按配对规则归到它的基础包),不覆盖代码工件的条目。于是每个包的精确地址、注册表条目、配对地址都返回自己的那一行,不随保存顺序、加载顺序或重启变化。 - 为什么改:两个包同名时,一个包的 `?package=` 返回出厂项而它自己的存储行没人读(objectstack-ai#33127);写入方和对端副本的注册表条目只剩最后写的那一行(objectstack-ai#32663);配对地址重启前 404、重启后一个 200 一个 409(objectstack-ai#32662);模块的 de-DE 语言成员跟着行顺序走(objectstack-ai#32900)。 - 风险与回滚:唯一收窄:两个包只以存储行持有的同名 action,不点名包的读取重启后以前返回最后加载的那一行,现在和其它类型一样 409 点名两个包。回滚即还原本 PR,存储数据不变形。dashboard 仍按名字收敛(objectstack-ai#32663 残留 (a) 待裁决),未改。 - 先看:`packages/objectql/src/registry.ts` 的 `registerItem`(新 `storedRowPackage` 选项与槽位键)、`overlaySlotBinding` 末尾新分支、`isBundleAddition` 的 `codeMembersOf`;再看 `protocol-registry-hydration.ts` 的 `takesPackageOverlaySlot` 与 `restoreArtifactRegistryView` 的槽位清理。 - 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run --project local src/webhook-stored-row-boot-hydration.test.ts src/protocol-cluster-signal-package.test.ts -t "33127|32663|32900"`,两种注册顺序、两种行顺序全部通过。 - 需要你做的:契约复审档记录(`Clause-②: yes (narrowing)`,受管面),然后席位落地。 ## What changes `SchemaRegistry` kept ONE bare slot per name for a stored row (`registerItem` with no package), so the row saved or hydrated last took it, beside the code artifact's composite `pkg:name` entry. Every symptom in this set is that one slot. **The slot model (`packages/objectql/src/registry.ts`).** - `registerItem(type, item, keyField, packageId?, options?)` takes `options.storedRowPackage`. Without a `packageId`, a row with a stored-row package registers under a package overlay slot key, `MARK + package + MARK + bareKey`, with `MARK` the NUL character written as an escape in source. It never overwrites the bare key or a composite entry. - `bareSlotEntriesOf` reads those slots after the bare entries, so every reader that judged the bare slot (`overlaySlotBinding`, `packageScopedHoldersOf`, `getPackageScopedItem`, `boundServedActions`, `unregisterItem`) sees each row once, bound by the same rule as before. - `rankedForPackage` orders a package's bound rows as the stored-row read serves them: its pair's declared override, its own row, the package-less row, any other. - `orderedOverlayTier` orders the overlay tier of `getItem` by holder (the caller's package first, then composite order, then id), so `getItem` no longer follows row order. - `overlaySlotBinding`: a `BASE.custom` row whose base holds the name only as its own stored row binds to the base, never becoming a second holder. That is the case one bare slot never held both rows of. - `isBundleAddition(…, codeMembersOf)`: a bundle member that two packages hold only as stored rows is no clash. One bare slot used to hold one of the two rows, so the base held the name in either order (`protocol-bundle-member-base-address.test.ts` pins that answer, and it went red without this). A member either package ships in code still clashes. - `removePackageOverlaySlots(type, name, member, select)` is new and public. It drops the selected packages' slots, for the delete's heal. **Hydration (`packages/metadata-protocol/src/protocol-registry-hydration.ts`).** - `hydrateOverlayIntoRegistry` passes `storedRowPackage` for a row bound to a package of a type in `PACKAGE_SLOTTED_STORE_TYPES`, less `flow` and `permission`, which keep their own slot rules (`takesPackageOverlaySlot`). - Such a row records no sole-holder envelope. Its slot is its package's own. - `restoreArtifactRegistryView` retires the removed package's slot. Tier 1's bare-entry drop runs only when no slot was retired, and a heal with an unknown binding drops the slots of packages with no remaining row. **Reads (`packages/metadata-protocol`).** - `admitExactQualifier(…, { storedRowBases })`: a pair address of a name its bases hold only as stored rows is admitted at the base whose row is stored. Two such bases are refused naming both, as two registry bases are. - `readMetaItem` asks for it and reads that base's content. - `storedRowHoldersRefusal` serves the read naming no package at the one holder whose rows are its own and its pair's (objectstack-ai#32662 scope note b). It used to fall through to the first-stored row. **Moved answers (FROM `main` d4fbb4d → TO), per door:** | Door | FROM | TO | |---|---|---| | `GET /meta/TYPE/NAME?package=ID`, two shippers each with a stored row (tool, webhook, agent, skill), after a restart | own row only for the holder hydrated last; the other its shipped item | each holder its own row | | `getPackageScopedItem`, writer and peer, after alpha then beta saved (action, tool, email_template) | `[null, beta]` (mirror in the other order) | `[alpha, beta]` | | `GET /meta/TYPE/NAME?package=ID.custom`, name held only as stored rows (dashboard, tool, action), before a restart | 404 for both | its base's row | | same, after a restart | 200 for the row hydrated last, 409 naming one side for the other | its base's row | | `GET /meta/TYPE/NAME` (and `/published`), a package's row beside its own pair's undeclared row | plain: the pair's row when it was saved first | the package's own row, both orders | | `GET /meta/action/NAME`, two packages hold it only as stored rows, after a restart | 200 the row hydrated last | **409 `RESOURCE_CONFLICT` naming both** (the narrowing) | | `getPackageScopedItem('email_template', welcome, X, 'de-DE')`, X's pair row beside a package-less de-DE row | the row hydrated last | X's pair row, both orders | | `getPackageScopedItem('action', …)`, both shippers with a declared override (objectstack-ai#33131's carried face) | the last-saved holder's override; the other its shipped action | each holder its own override | ADR-0087: the semantic entry `stored-row-own-package-slot` (`packages/spec/src/migrations/entries/semantic/18.stored-row-own-package-slot.ts`), marker `adr-0087: registered stored-row-own-package-slot` in `.changeset/33127-stored-row-own-package-slot.md`. ## Tests Head `8d85d2b1af`. Pins, each in every registration, save and row order, with CONTROLs (one holder, one row, a package-less row: unchanged). Each pin went in as a top-level `describe` in the file that already holds its harness. - `packages/objectql/src/webhook-stored-row-boot-hydration.test.ts`: - `[objectstack-ai#33127]` covers tool, webhook, agent and skill: both holders ship the name, each stores a row. It checks the registry slot, the exact read, and that the read naming no package answers `409 RESOURCE_CONFLICT` naming both. - `[objectstack-ai#32900]` checks X's de-DE slot in both row orders. - `packages/objectql/src/protocol-cluster-signal-package.test.ts`, `[objectstack-ai#32663]`: action, tool and email_template, writer and peer, both save orders. - `packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts`, `[objectstack-ai#33127, objectstack-ai#32662]`, through `HttpDispatcher` on a booted kernel over a sqlite file, before and after a reboot: - `?package=` per holder; - each pair address `?package=ID.custom`; - scope note (b), plain read and `/published`. The `[objectstack-ai#32607 M1]` test now also pins the base row on all three faces in both orders. - Moved pins: - `protocol-flow-custom-override.test.ts` `[objectstack-ai#33131]`: the carried registry face moved to its TO. - `protocol.register-item-call-sites.test.ts`: the ledger records the new `registerItem` call shape. - `scripts/engine-double-contract.pinned.json`: ratcheted with `--write`. <details><summary>Local runs (under `scripts/pm/os-verify-lock.sh`)</summary> - Targeted: objectql, 4 files, `Tests 144 passed (144)`; runtime served-stack, `Tests 36 passed (36)`; metadata-protocol call sites, `Tests 5 passed (5)`. - Typecheck of objectql, metadata-protocol, runtime and spec: `TC_EXIT=0`. - `pnpm exec turbo run test --concurrency=2 --continue` over the 83 packages that depend on objectql, metadata-protocol or runtime, plus `@objectstack/spec`. Result: `Tasks: 186 successful, 188 total`. The two failed tasks: - `@object-ui/example-schema-catalog#test` printed `sh: 1: vitest: not found`. That example's install is missing on this box; nothing was measured (NOT MEASURED). - `@objectstack/dogfood#test` (the full battery, no shard): `Test Files 2 failed | 463 passed | 3 skipped (468)`, `Tests 2 failed | 3930 passed | 42 skipped (3974)`. Both failures were `Test timed out in 5000ms` while the box was contended: `bare-name-one-holder-ai-family` `[objectstack-ai#31985]` and `package-commit-revert-path-package` `[objectstack-ai#29414] control`. Re-run alone under the lock (`VERDICT command-exit 0`): `Test Files 2 passed (2)`, `Tests 39 passed (39)`. - The 39 packages affected only through the new spec migration entry are left to CI. - `pnpm lint` passed (`LINT_EXIT=0`). </details> <details><summary>Ablations: one per negative pin, each restored with a clean whole tree</summary> Each mutation went through `scripts/ablation-replace.mjs`. `metadata-protocol` was rebuilt and `scripts/ablation-dist-preflight.mjs` found the marker in `dist/`. After the restore it was rebuilt again and the preflight with `--absent` answered exit 0. - The hydration's `overlaySlot` forced off (marker `ABLATION_33127_SLOT`): - objectql: `27 failed | 117 passed (144)`. The red tests are exactly the `[objectstack-ai#33127]` boot pins (16), `[objectstack-ai#32663]` (6), `[objectstack-ai#33131]`'s moved pin (4) and `[objectstack-ai#32900]` pair-first (1). - runtime: `2 failed`, the two `objectstack-ai#33127` door pins. - All CONTROLs stayed green. - `readMetaItem`'s `storedRowBases` off: runtime `4 failed`, the four `objectstack-ai#32662` pair-address pins. objectql stayed green. - `storedRowHoldersRefusal`'s one-holder arm off (marker `ABLATION_33127_PLAINB`): runtime `3 failed`, the two `objectstack-ai#32662 (b)` pins and `M1`. - `isBundleAddition`'s row-only exemption off: objectql `1 failed`, `[objectstack-ai#28802] with a dependent's member at the same locale, the base's address still serves the pair's`. </details> ## Acceptance notes - The slot model also moves the face objectstack-ai#33131 carried: the registry item of an action with both shippers' overrides declared now answers each holder's own override. Its pin in `protocol-flow-custom-override.test.ts` moved to the TO, and its title no longer says carried. That card stays open for its seat to judge. - `dashboard` is still converged by name in the registry (objectstack-ai#32663 residual (a), awaiting a ruling). The objectstack-ai#32451 CONTROL stays as it was. - The layered read (`getMetaItemLayered`) at a pair address is unchanged. - An action's read naming no package before hydration (rows laid straight into the store, a state the save door does not produce) still follows save order. - objectstack-ai#33127's heal 1, heal 2 and S1 items are not separately pinned here. See the report's open question. - Function-holder parts of `registry.ts` belong to area E2b. Its open PRs (objectstack-ai#33271, objectstack-ai#33274) touch neither `registry.ts` nor any file here; objectstack-ai#33271 reads composite keys in `plugin.ts`, which this change leaves as they were. ## Verification - `pnpm check:adr-0087-registration`: `1 declared-breaking changeset(s), each carrying an ADR-0087 disposition … registered stored-row-own-package-slot`. - The derived gate families (`node scripts/pm/dispatch-gates.mjs --commands`, 102 families on this diff) were run locally. - `check:dual-build-cjs-loads` asks for a whole-repo `pnpm build` first, so it is NOT MEASURED here and left to CI. - `check:engine-double-contract` and `check:objectql-double-limit` were red on the first pass because of a new unbounded `find` double. After the fix they are exit 0. - Every other family: exit 0. - `check-nul-bytes`: OK. The overlay slot mark is written as an escape, never a raw byte. - Open E2b PRs touching `packages/objectql/src/registry.ts`: none (objectstack-ai#33271 and objectstack-ai#33274 were checked file by file). - To see the slots work: `pnpm --filter @objectstack/objectql exec vitest run --project local src/webhook-stored-row-boot-hydration.test.ts -t 33127`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn <!-- signed: domain:server#5 · os-elon-musk · session_016WV4cy1y7UNVbT2QAdmgdn --> --------- Co-authored-by: Claude <noreply@anthropic.com>
… onto the item its package holds at that (object, name) (objectstack-ai#33898) <!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbNTugWasvhTMrtCZiFGrZYK)_ Part of objectstack-ai#33456 — this PR lands the envelope half (premise 2). The holder's own route (premise 1) stays open on the card: on main it already answers wherever the engine registry lists the package-less row (objectstack-ai#33274's route census), and the one host shape where it still judges no declaration needs a change in `packages/runtime`, outside this PR's surface (see Acceptance notes). Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:按名读取 action(`GET /meta/action/NAME`、执行面 `getMetaItemForExecution`、以及 `/actions` 路由判出的声明)时,包的工件信封(`_packageId`、`_provenance: 'package'`)只嫁接到该包在同一 `(对象, 名字)` 上持有的那一项;环境自己绑在别的对象(或无对象)上的同名 action 按环境自己的项返回,不再挂别人的包名。 - 为什么改:ADR-0150 D4 把 action 键成 `(package, object, name)`;原来按名字找信封,ALPHA 绑 `account` 时,环境绑 `contact` 的同名行被当成 ALPHA 的包内项返回(卡 objectstack-ai#33456 前提 2,本 PR 在 main 上复测成立)。 - 风险与回滚:只改 `metadata-protocol` 读路径的信封嫁接,不改存储、不改路由、不改 spec;同对象的定制、两包同对象的 409、只有一个包的情形均不变(CONTROL 钉住);回滚 = revert 本 PR。 - 先看:`packages/metadata-protocol/src/protocol-artifact-lookup.ts` 的 `lookupArtifactItem`(风险 hunk:无包时按 `packageScopedHoldersOf` 找唯一同对象持有者);`protocol-meta-item-reads.ts` 的 `artifactOwnerKeyOf` 与信封调用点。 - 两分钟验证:`pnpm --filter @objectstack/rest exec vitest run src/meta-qualified-item-route.test.ts -t 33456`,预期 6 个用例全绿。 - 需要你做的:无,席位落地。 ## What changes ADR-0150 D4 keys an action by `(package, object, name)`. The by-name read looked the served item's artifact envelope up by name (`lookupArtifactItem`, which answers the first composite holding the name), so the environment's own action bound to an object no package binds the name to was served wearing the one holder's `_packageId`, `_packageVersion` and `_provenance: 'package'`. - `lookupArtifactItem` (seam body in `protocol-artifact-lookup.ts`; the private class wrapper in `protocol.ts` threads one more argument) takes an action's owner key. Given, it answers only an artifact bound to that object (or object-less for `undefined`); naming no package, the ONE package whose own artifact is bound there (`packageScopedHoldersOf`, disabled holders included, as the old composite scan was), none for zero or two. Omitted, or for any other type, it is the by-name lookup it was (`lookupArtifactItemByName`, unedited). - `readMetaItem` (both faces) passes the served item's owner key at its envelope graft, on the plain and the exact-address branch (`artifactOwnerKeyOf`). Every moved answer, FROM → TO (ALPHA, BETA two packages; `approve` the action name; the environment's item is a package-less row the store holds active): | Shape | Answer | FROM | TO | |:--|:--|:--|:--| | ALPHA on `account`, the environment's row on `contact` (mirror), both save orders | `GET /meta/action/approve` (RestServer and dispatcher), `getMetaItemForExecution`, the declaration `/actions/contact/approve` judges | the environment's item with `_packageId` ALPHA, `_provenance: 'package'` | the environment's item, no package envelope | | BETA on `contact` alone, the environment's row on `account` (single-holder cell), both save orders | same three, `/actions/account/approve` | with BETA's envelope | no package envelope | | ALPHA on `account`, the environment's row object-less | `GET /meta/action/approve` (both transports) | with ALPHA's envelope | no package envelope | Clause-② arm per row: none. Re-read against ADR-0150 D4 after the diff: each row stops stamping a package onto an item that package does not hold at its `(object, name)` ("A bucket-4 item is therefore one whose `(type, name)` no package holds", read with D4's action key `(package, objectName, name)`); no answer admits anything new and no accepted input is refused, so `Clause-②: no` holds as claimed. Not changed (CONTROLs pinned): the package-less row on the object the package binds (its customization, under that package's envelope); two packages on one object (409 naming both); one package and no package-less row (its item, its envelope); `?package=HOLDER` (the holder's own item and envelope); the route's `packageId` (unset) and the handler that runs (`ran env`); every type other than `action`; stored rows. ## Tests - `packages/metadata-protocol/src/protocol-artifact-lookup.action-owner-key.test.ts` (new, 8 cases): the seam over a registry double: mirror, single-holder cell, the one holder on the item's object among two, object-less both ways, a named package on another object; CONTROLs. - `packages/rest/src/meta-qualified-item-route.test.ts` and `packages/runtime/src/domains/meta-qualified-item-read.test.ts`, describe `objectstack-ai#33456` (6 cases each, real `SchemaRegistry` + real protocol): both transports of `GET /meta/action/approve`, three shapes × both registration orders, `?package=` holder control, and the three CONTROLs. - `packages/runtime/src/action-package-addressing.test.ts`, inside the `[objectstack-ai#32681]` describe (6 cases: real ObjectQL, real `MetadataPlugin` boot pass, `DatabaseLoader` over a writable `sys_metadata` double): mirror and single-holder cell × both save orders on the execution face, the served face and the row's route (declaration envelope, `packageId`, handler run), plus the same-object CONTROL in both orders. - `packages/metadata-protocol/src/protocol.lookup-artifact-item-call-sites.test.ts`: the four changed sites recorded with their dispositions. <details><summary>Ablation readings</summary> Seam (source-resolved suite): the owner-key rule removed (`ablation-replace.mjs`, anchor `if (owner === undefined || singular !== 'action') return artifact;` → `… || true) …`): 5 negative pins red, 3 CONTROLs green; restored, blob equals HEAD (`288b99c4f897`), `git diff HEAD` empty. Transports and route (they read `metadata-protocol`'s `dist/`): the same rule removed with a bundler-surviving marker (`|| name !== '__ablation_33456__'`), rebuilt, `ablation-dist-preflight.mjs` marker present in 2 built files: REST 3 red / 3 green, dispatcher + route 7 red / 5 green (every negative pin red, every CONTROL green); restored, rebuilt, preflight `--absent` exit 0, tree clean. A first dist attempt with the `|| true` spelling was folded away by the bundler (preflight: marker absent), so its readings were discarded and the run repeated with the marker above. BASE reading (main `1e65a389e1`, runtime objectstack-ai#32681 harness, mirror shape): execution face, served face and the row's route declaration all `["custom","contact","com.acme.alpha","package"]`; after: `["custom","contact",null,null]`; holder's exact read `["alpha","account","com.acme.alpha","package"]` both. </details> ## Acceptance notes - **Premise 1 (the holder's own route) is not closed here.** Re-measured on main `1e65a389e1`: in the objectstack-ai#32681 boot harness (protocol over a `MetadataManager` boot pass; the engine's ObjectQL registry never lists the package-less row) `/actions/account/approve` (mirror) and `/actions/contact/approve` (cell) still judge no declaration, before and after this PR. Where the engine registry lists the package-less row (the registry-hydrated composition), objectstack-ai#33274's `routeHolderCensus` already answers the holder's own declaration (pinned by "objectstack-ai#32989 — a served holder's own route", the environment's item on `lead`). The bare execution read cannot see the route's object, so the remaining fix is the route's (`packages/runtime/src/action-execution.ts`), outside this PR's surface; HTTP reach of that host shape is not measured. Carried on the card. - The merged listing (`getMetaItems({ type: 'action' })`) in the same harness lists only the holder's item, not the environment's row on the other object (measured before and after; `protocol-meta-list-reads.ts` is not touched here). Reported to the seat. ## Verification Head `64c5d88452` (origin/main `1e65a389e1` + this branch, merged with main `4b5024de52`). <details><summary>Typecheck and tests (touched packages and the dependents whose suites drive the read)</summary> - `pnpm --filter @objectstack/metadata-protocol typecheck` exit 0; `exec vitest run`: Test Files 342 passed, 9 skipped; Tests 22901 passed, 43 skipped. - `pnpm --filter @objectstack/rest typecheck` exit 0; `exec vitest run`: Test Files 417 passed; Tests 8748 passed, 355 skipped. - `pnpm --filter @objectstack/runtime typecheck` exit 0 (after building `@objectstack/driver-turso`, which the merge's closure build had not, and whose missing `dist` alone failed two untouched test files' imports); `exec vitest run`: Test Files 607 passed; Tests 12273 passed, 19 skipped. - `pnpm --filter @objectstack/objectql exec vitest run`: Test Files 597 passed; Tests 13141 passed. - `eslint --no-inline-config` over the eight touched files: exit 0. - The other nine direct dependents of `metadata-protocol` (cli, client, cloud-connection, plugin-approvals, plugin-email, plugin-security, service-automation, service-messaging, service-package) are declared to CI: the published `.d.ts` is byte-unchanged (`private lookupArtifactItem;`, no new export). </details> <details><summary>Derived gate families</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on this head: 73 families, each run with its exit captured before any pipe; `--ran` reconciliation: 73 derived, 71 run, 2 NOT MEASURED, 0 UNRUN. - 71 exit 0. - NOT MEASURED: `pnpm check:dual-build-cjs-loads` (exit 3, PREREQUISITE NOT MET: reads every package's `dist/`, this worktree built the runtime closure only); `pnpm check:type-check-debt` (exit 3: its `--re-measure` closure build never got a turn on the shared verify lock). Both are CI's. - Body gates on this text: `check-closing-keyword-parity` (event payload and `--body`) exit 0, `check-partof-closing-keyword` exit 0, `check-changeset-no-major` exit 0, `check-adr-0087-registration` exit 0. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #32996
Fixes #32995
Fixes #32989
Fixes #32988
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches how the/actionsroute answers when several holders (packages, a disabled package, the environment, the platform) share an action name.维护者速读
/actions/:object/NAME裸路由在同名动作有多个持有者时,改为只看「谁在本路由上持有该名」来回答;/actions/_env/:object/NAME在有包同名时也能答出环境自己的动作。_env精确地址在包同名时答 404(runtime action route: the environment's exact address/actions/_env/:object/NAMEanswers 404 while a package holds the same name #32988);另修 runtime action route (#32751 follow-up): stop citing ruling A for the disabled-holder answer in code, and pin a disabled package's object-less action #32995 的引文与不可观测措辞。packages/runtime/src/action-execution.ts的routeHolderCensus与readRouteHolders、resolveAddressedRouteActionDeclaration的 404 分支;然后是action-package-addressing.test.ts新增 describe。pnpm --filter @objectstack/runtime exec vitest run --project local src/action-package-addressing.test.ts,预期全部通过。What changes
The bare route
/actions/:object/NAME(no package named) used to take its declaration from the protocol's bare by-name read. That read cannot see the routed object, so when the name has a package holder beside a package-less item (the environment's own, or the platform's) or beside a disabled package, its answer depended on who else held the name and on registration order. The route now decides those compositions from who holds the name on the route: the items bound to the routed object, else the object-less ones, read from the registry's listing of every holder (disabled packages included) and the environment's own store (readRouteHolders,routeHolderCensus):The environment's exact address
/actions/_env/:object/NAMEanswers the environment's own item from the same reading when the merged listing omits it (it folds a package-less item into a stand-in for a package holder), whatever the other holders.environmentOwnerOfUnheldRoute(#32751) now reads through the same reader; its docblock no longer cites ruling 6824698376 letter A for the disabled-holder answer and grounds it in main's own answer (#32995 item 1).Moved answers, measured with a probe on BASE (
e540baf8) and on this head, each cell in both registration orders:lead, disabled D onlead(or object-less), one enabled holder elsewhere/actions/lead/NAMEleador object-less, served B oncontact, disabled A object-less/actions/lead/NAMEcontact, env item onleador object-less, with or without a disabled co-holder A/actions/contact/NAMEcontact, platform item onlead/actions/contact/NAMEaccount, disabled D and platform item onlead/actions/account/NAMEcontact, served B oncontact, disabled A registered before B/actions/contact/NAMEleador object-less, served B oncontact, disabled A on another object registered before B/actions/lead/NAMElead(or object-less), one or two package holders elsewhere/actions/_env/lead/NAME404Unchanged: one holder alone; two served packages on the route's key (refused naming both); the platform's item on the routed object (bare read's answer); every caller that names its package; every route on a host whose registry cannot list every holder or whose engine has no store.
Not fixed here, needs a decision (#32996 item 2): the registry keeps ONE package-less item per name, so a platform item bound to
leadand the environment's object-less item replace each other and the later registration stays. With two package holders elsewhere,leadanswers the environment's object-less item when the environment registered last, and no declaration when the platform did; thelead-bound handler runs in both. In the environment-last order the platform item is gone from the registry, so the route cannot see it; making both orders answer alike needs the registry to keep both (packages/objectql/src/registry.ts, out of this area's surface).#32995 item 3: the clause "an item bound to
leadcomes before one with no object" landed in the releasedpackages/runtime/CHANGELOG.mdentry for 6aa658a. Release-owned, so not edited in this code PR; the new docblock ofreadRouteHolderssays why it is unobservable (one package-less slot per name), and the correction of the released entry is owed as a docs-only PR.Tests
Pins in
packages/runtime/src/action-package-addressing.test.ts, every cell in both registration orders; ablations and gate readings in the report comment on #32996 (os-dev-report).Acceptance notes
_packageId, and its answer beside a disabled package moves with registration order. Both live inpackages/metadata-protocol(area E1); the route no longer depends on them for these compositions.Verification
Readings follow in the
os-dev-reportcomment on #32996; this body is the seat's to bring to the final head.Session: https://claude.ai/code/session_016WV4cyWLSMyXZGc6dwhCAu
Head
b30e9bb4adds review#3's M1 fix: the route's composition guards run on the listing before any store read; pinned with zero store reads and no degrade for a one-holder name when the store throws.🤖 Generated with Claude Code