Skip to content

fix(metadata-protocol): an action's artifact envelope is grafted only onto the item its package holds at that (object, name) - #33898

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/area-E1-33456
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/area-E1-33456

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #33456 — this PR lands the envelope half (premise 2). Premise 1 (the holder's own route) was measured on a real composed boot after this PR opened (showcase dev boot, main 63e47feeca, four cells over HTTP; os-dev-report on the card) and does not reach: a package-less row over a managed package's name is refused at save (403 NOT_OVERRIDABLE) or sealed and unserved at boot (metadata_sealed_overlay_unserved, ADR-0131 D6); over a runtime-authored package the engine registry lists the row and the holder's route judges the holder's declaration; and a package-less save of a name one writable package holds is re-addressed into it. The shape only the #32681 harness composes needs no runtime change, so the card closes with this PR (area ruling, option C).

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 的包内项返回(卡 metadata-protocol: an action's route beside a package-less row on another object judges no declaration for the holder's own object, and serves the row under the holder's envelope (ADR-0150 D4) #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 #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 [#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.
Ablation readings

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 #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.

Acceptance notes

  • Premise 1 (the holder's own route): unreachable on a real boot, closed with this PR. In the metadata: a package-less object-bound action row is keyed per (package, name) by DatabaseLoader but per (object, name) by the registry, so the boot pass files it as one holder's customization #32681 boot harness (the engine's ObjectQL registry never lists the package-less row) /actions/account/approve (mirror) and /actions/contact/approve (cell) judge no declaration, before and after this PR. No real boot builds that host: measured on the showcase dev boot (main 63e47feeca), a managed package's name refuses a package-less save (403 NOT_OVERRIDABLE) or leaves an earlier row sealed and unserved after an upgrade (boot diagnostic metadata_sealed_overlay_unserved); a runtime-authored package's name keeps the row in the engine registry (Registered action: bare slot beside the overlay slot, on save and at boot), where the holder's route judges the holder's declaration and the row's route the environment's item; a package-less save of a name one writable package holds is re-addressed into that package. No change to packages/runtime/src/action-execution.ts is made.
  • 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).

Typecheck and tests (touched packages and the dependents whose suites drive the read)
  • 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).
Derived gate families

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.

Generated by Claude Code

🤖 Generated with Claude Code

… at the served item's own owner key

ADR-0150 D4 keys an action by (package, object, name). The by-name read
looked the served item's artifact envelope up by name alone, so a
package-less action bound to one object wore the envelope of the one
package that binds the name to another object.

Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com>
… item's owner key, and record the moved call sites

Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com>
…vironment's on both transports, both faces and its route

Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com>
…und holder; add the changeset

Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol, touching 6 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/concepts/metadata-lifecycle.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/kernel/cluster.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

⛔ 2 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 53260281929a49c759557304757e534c283cd402 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 7d0aaae9fa84381d80e725b297fcde281e51531b — the merge of head 64c5d884523166bff685565f8623203d205ed0a5 into base 53260281929a49c759557304757e534c283cd402, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 7d0aaae9fa84381d80e725b297fcde281e51531b && git checkout 7d0aaae9fa84381d80e725b297fcde281e51531b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 53260281929a49c759557304757e534c283cd402 64c5d884523166bff685565f8623203d205ed0a5 && git checkout -B drift-repro 53260281929a49c759557304757e534c283cd402 && git merge --no-ff 64c5d884523166bff685565f8623203d205ed0a5

node scripts/docs-audit/affected-docs.mjs --json 53260281929a49c759557304757e534c283cd402

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 53260281929a49c759557304757e534c283cd402 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

Request: review · PR #33898 · area S4 (E1) · Part of #33456 · head 64c5d88

Clause-② no · Metadata-protocol none · patch changeset. Report on #33456 (6895263237). Reviewer: review-b. Premise 2 (the envelope graft keyed by (object, name)) is fixed here. Premise 1 (the holder's route on a host whose engine registry never lists the package-less row) stays open on #33456: the area chose the report's option C, to measure reach on a real boot first, before any runtime edit. protocol.ts edit is limited to the private lookupArtifactItem wrapper.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review claim · head 64c5d88 · 2026-11-15T13:50Z

review (review-b, areas S2+S4). Verdict follows on this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review — PASS

Head-sha: 64c5d884523166bff685565f8623203d205ed0a5

review (review-b, areas S2+S4) · 2026-11-15T13:51Z

I read the full diff at this head against GitHub: 9 files, +442/−12, of which source is +78/−12 over 3 files. I also read card #33456, the claim's file surface and report 6895263237. check-governed-merges --pr 33898 reports NOT governed.

Correctness (premise 2, the envelope graft)

  1. lookupArtifactItem gains an owner key, used only for action.
    • The by-name body moves unedited into lookupArtifactItemByName. Every other type, and every caller passing no owner, answers exactly as before.
    • For an action:
      • the by-name artifact is kept only if boundObjectOf(artifact) === owner.object;
      • naming a package with a mismatch returns no envelope, never another item's;
      • naming no package, the envelope is the ONE holder whose own artifact is bound to that object. None, or two, give no envelope, so an ambiguity is not guessed (red line 2).
    • Disabled holders count (includeDisabledPackages: true), so the binding does not move with a reversible disable (ADR-0150 D3).
  2. readMetaItem passes artifactOwnerKeyOf(type, item) on both envelope paths, by-name and the admitted exact address. So the key is the SERVED item's own (object, name), which is ADR-0150 D4's action key.
  3. The call-site census pin (protocol.lookup-artifact-item-call-sites.test.ts) is updated row for row. The list call site keeps the by-name lookup, and its items carry their own package.
  4. Pins:
  5. Ablations:
    • src: 5 red, 3 CONTROLs green;
    • dist, marker present in 2 built files: REST 3 red, dispatcher and route 7 red;
    • each restored, with blob == HEAD and the preflight absent.
    • The first dist attempt, which the bundler folded, is reported and discarded. Good discipline.

Declarations

Clause-②: no and Metadata-protocol: none hold:

  • no export or type moves (ArtifactOwnerKey is reached only through the private wrapper, and the dist .d.ts is unchanged);
  • no accepted input is refused, and no answer admits anything new: each moved answer drops a package stamp from an item that package does not hold at its (object, name);
  • no author has to act, and stored rows are untouched.

This is the same footing as #33815 (verdict 6894129336). The changeset lists each FROM→TO, as the card's Do asked.

Scope and deviations

Check-runs at this head (read at review time)

  • 17 success, 16 skipped.
  • 15 still running: Build Core, Test Core 1–8/8, Type Check · workspace, consumer gates and debt ledger, two Lint jobs, and Live E2E UI. None had failed.
  • Arm only once all of them are green; Test Core carries the nine dependents.

Author. objectstack-fleet[bot] (relay write).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ

席位核对

ACCEPT · area S4 (E1) · Head-sha: 64c5d884523166bff685565f8623203d205ed0a5

Landing under the area authorising line: ready + auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 14:15
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 68e726d Nov 15, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-E1-33456 branch November 15, 2026 15:18
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…ad beside a package-less action on another object (objectstack-ai#34073)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbBePzY6g11h3hyWk5ud4vWy)_
Part of objectstack-ai#33904 — this PR lands the card's measurement and its pins: the
HTTP reach of item 1 (not reached; the card regrades to p3) and item 2
(closed on main by objectstack-ai#33898, pinned here). The listing seam itself
(`readFlattenedMetaItems`) is not changed and stays on the card at p3.

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:只加测试,不改产品代码。一是真实启动的 showcase 上,经 HTTP
钉住"动作列表与按名读取答同一项"(包先存、环境先存两种顺序);二是钉住"停用包在另一个对象上持有同名动作时,环境自己的动作按名读取照常返回、不挂停用包的包名"(objectstack-ai#33898
已在 main 修好)。
- 为什么改:卡 objectstack-ai#33904 要求先测 HTTP 能否遇到"列表漏掉环境自建动作"。实测 HTTP
走不到这个形状:托管包的同名动作在另一个对象上保存会被 403 拒绝;可写包则保存后只剩一条,列表和按名读取一致。所以按卡的规则降为 p3
并补钉子。
- 风险与回滚:零产品风险,只多两个测试用例块和一个 dogfood 测试文件;回滚即还原本 PR。
-
先看:`packages/qa/dogfood/test/action-list-packageless-other-object.dogfood.test.ts`(HTTP
一致性钉子);`packages/rest/src/meta-qualified-item-route.test.ts` 中 `[objectstack-ai#33904]
a disabled holder on another object`。
- 两分钟验证:`pnpm --filter @objectstack/rest exec vitest run
src/meta-qualified-item-route.test.ts -t 33904`,预期 2 个用例通过。
- 需要你做的:无,席位落地。

## What changes

Tests only; no product file moves.

1. **Item 1, HTTP reach (measured first, as the card asks).** On a real
showcase boot (`bootShowcase`, admin session), the card's shape (a
package's action on one object and the environment's package-less row of
the same name on another, both stored) is not reached over HTTP:
- managed code package (`showcase_open_docs` on `showcase_task`): `PUT
/api/v1/meta/action/showcase_open_docs` with `objectName:
showcase_product` and no `?package=` answers `403 NOT_OVERRIDABLE`; the
list and the by-name read keep answering the package's item;
- Studio-created writable package, both save orders: each save answers
200, and the store ends with ONE item of the name. The list, `?names=`,
`?package=` and the by-name reads all answer that one item.

So the listing and the by-name read agree on every HTTP-reachable state
measured, and the card regrades to p3 (its rule 3).
`action-list-packageless-other-object.dogfood.test.ts` pins that
agreement in both orders.
2. **Item 2 (the seat's addition).** A package-less action on `contact`
beside a DISABLED holder of the name on `account`: the objectstack-ai#33385 fold's
harness probe reported the by-name read stamping the disabled holder's
`_packageId`, so the face withheld the item (404). Re-run on main with
objectstack-ai#33898 (`68e726d631`): served (200), `objectName: contact`, no
`_packageId`, no package provenance, in both registration orders, for
the environment's own item and for a registry-only package-less item.
Pinned as a nested describe in the objectstack-ai#33456 block of the REST harness, and
ablated (below). The reading is also on the card.

No answer moves, so there is no FROM→TO table.

## Tests

- `packages/rest/src/meta-qualified-item-route.test.ts`, describe
`[objectstack-ai#33904] a disabled holder on another object` (2 cases × 2 registration
orders; real `SchemaRegistry`, real protocol, real `RestServer` route
table).
-
`packages/qa/dogfood/test/action-list-packageless-other-object.dogfood.test.ts`
(new, isolated project; 2 cases, one per save order).

## Acceptance notes

- Not changed here, carried on the card at p3: below HTTP the merged
list slots an action by name alone (`mergePackageAwareOverlay`), and the
sealed-managed decline (`declinesStoredRow`,
`isStoredEntryOfDeclinedName`) judges an action by name, not by
`(object, name)`. A package-less row stored beside a package's action on
another object (the boot harness shape) is therefore left out of the
list while the bare by-name read serves it. No HTTP save reaches that
state today (above). NOT MEASURED: an environment row authored BEFORE a
managed package that ships the same name on another object is installed.
- Reported to the seat, not fixed here: with a writable package holding
`qa_x` on `showcase_task`, a package-less `PUT /meta/action/qa_x` on
`showcase_product` answers 200 and the package's own address then serves
the product body (the package's action moved object); in the other order
the package's save takes the environment's item over. Both read against
ADR-0150 D4's `(package, object, name)` key; the save door is outside
this PR's surface.

## Verification

Head `ab5aeb0cfd` (origin/main `159757abc` merged in).

<details><summary>Tests and typecheck (touched packages: rest,
dogfood)</summary>

- Closure build `pnpm --filter "@objectstack/dogfood^..." build` under
the verify lock: exit 0.
- `pnpm --filter @objectstack/rest exec vitest run
src/meta-qualified-item-route.test.ts`: Test Files 1 passed; Tests 325
passed. `pnpm --filter @objectstack/rest typecheck`: exit 0.
- `pnpm --filter @objectstack/dogfood exec vitest run
test/action-list-packageless-other-object.dogfood.test.ts`: Test Files 1
passed; Tests 2 passed. `pnpm --filter @objectstack/dogfood typecheck`:
exit 0.
- `eslint --no-inline-config` over the two files: exit 0.
- Diff is test-only (no source, no published file): no dependent suite
is owed; the full dogfood battery is CI's (no `!`, no narrowing arm).

</details>

<details><summary>Ablation of the item 2 pin</summary>

`packages/metadata-protocol/src/protocol-artifact-lookup.ts`: objectstack-ai#33898's
owner-key rule bypassed through `scripts/ablation-replace.mjs` (anchor
`if (owner === undefined || singular !== 'action') return artifact;`
gains `|| name !== '__ablation_33904__'`, x0 to x1), `metadata-protocol`
rebuilt, `ablation-dist-preflight.mjs` marker present (exit 0). `-t
'33456|33904'`: 5 red of 8, both new cells `[404, undefined, undefined,
false]` against `[200, 'contact', undefined, false]`, the three objectstack-ai#33456
shapes red with the holder's envelope; the three CONTROLs green.
Restored: blob equals HEAD (`288b99c4f897`), `git diff HEAD` empty,
rebuilt, preflight `--absent` exit 0, 8 of 8 green. The dogfood pin is a
positive agreement pin and is not ablated.

</details>

<details><summary>HTTP reach readings (the probe, not
committed)</summary>

Real showcase boot, admin session, head `ac6ab305c5`:

- Managed package: `PUT /meta/action/showcase_open_docs` (`objectName:
showcase_product`, no `?package=`) answered 403 `NOT_OVERRIDABLE`; list,
`?names=`, `?package=com.example.showcase` and the by-name read all
answered `["showcase_task","Open
Docs","com.example.showcase","package"]`.
- Writable package, the package's save first: both PUTs 200; list,
`?names=`, `?package=` and the bare and `?package=` by-name reads all
answered `["showcase_product","env on product","com.example.qaprobe"]`.
- Writable package, the environment's save first: both PUTs 200; every
read above answered `["showcase_task","pkg on
task","com.example.qaprobe"]` (and `/_env/` too).

</details>

<details><summary>Derived gate families</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at `ab5aeb0cfd`: 54 families. 52 run
locally, each exit 0 captured before any pipe; `--ran` reconciliation:
54 derived, 52 run, 0 NOT-MEASURED, 2 UNRUN. Declared to CI: `pnpm
check:dual-build-cjs-loads` and `pnpm check:type-check-debt` (the latter
takes the shared lock; the diff moves no tsconfig, package manifest or
source).

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jUcj2x2Wr4UErwBi12)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…s hold refuses as the plain read does, naming the holders as details.candidates (ADR-0150 D3/D5) (objectstack-ai#33885)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbNTugWasvhTMrtCZiFGrZYK)_

Fixes objectstack-ai#32622
Fixes objectstack-ai#32914

Clause-②: no (narrowing) — narrowed: a layered read naming no package,
of a name two or more served packages register in code, no longer serves
the holder that registered first. The REST `/layers` door on a host that
wires no engine for its door chain goes from 200 to 409 naming the
holders, and the in-process `getMetaItemLayered` goes from resolving to
throwing `PackageScopedNameRefusedError`. The REST `/published` door on
a host with no `objectQLProvider` goes to 409 without
`details.candidates`. Before, it served the name's package-unbound
active row (200) when one stands, and otherwise its published exit (the
metadata service's `getPublished` answer, or 501 when the host resolves
none). The dispatcher's `/published` swallows the refusal. With no such
row it serves its snapshot as before; with one, it moves from that row
to the code snapshot (read from the tree). A name one package holds, and
every read naming the package, answer as before.
Metadata-protocol: none
Skills-docs: none — no skill under `skills/` names the layered or
published door, and the docs that do (`content/docs/ui/apps.mdx`,
`content/docs/references/api/rest-server.mdx`,
`content/docs/concepts/metadata-lifecycle.mdx`,
`content/docs/plugins/adding-a-metadata-type.mdx`) name the routes
without teaching how a name two packages hold is answered there, so no
sentence there turns false; the generated
`content/docs/references/api/protocol.mdx` describes `packageId` as
scoping a same-name collision, which still holds.

## 维护者速读

- 改了什么:按名字读元数据的分层视图(`GET /meta/TYPE/NAME/layers`,以及进程内的
`getMetaItemLayered`),遇到两个包都持有同名项、又没指定包时,现在和普通读一样答 409,并在
`details.candidates` 里列出两个包;以前 REST 在某些部署形态下、以及进程内调用,会悄悄返回先注册的那个包。
- 为什么改:同一个名字,普通读答 409 点名两包,分层读却按注册顺序挑一个(或只给一句话不给结构化候选),调用方无法知道该选哪个包,违反
ADR-0150 D3/D5“歧义要报告、不许猜、要列候选”。
- 风险与回滚:这是收窄(BREAKING):没给 door chain 接引擎的部署上,两包同名、不指定包的 `/layers` 由
200(先注册包的分层)变为 409;进程内 `getMetaItemLayered` 由返回先注册包变为抛
`PackageScopedNameRefusedError`,调用方需改为指定包。只影响“两个包同名且没指定包”的分层读;单一持有者、带
`?package=` 的读、存储行持有者在禁用包旁的进程内读都不变;第一方触达 0。回滚即 revert 本 PR。
-
先看:`packages/metadata-protocol/src/protocol-meta-layered-reads.ts`(`getMetaItemLayered`
新增的 `resolveItem` 判定,和
`withPackageCandidates`);`packages/rest/src/meta-item-read-routes.ts`(`/layers`
路由 catch 加
`packageScopedCandidates`);`packages/rest/src/meta-layers-ambiguous-package.test.ts`
新增的 describe。
- 两分钟验证:`pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2
src/meta-layers-ambiguous-package.test.ts`,预期 12 个用例全绿(两包同名的 `/layers`
两种写法答 409 带 `details.candidates`,进程内读抛同样的拒绝,单持有者照常返回)。
- 需要你做的:无,席位落地。

## What changes

**BREAKING** (`Clause-②: no (narrowing)`, patch level,
`Metadata-protocol: none`): three answers move, the three bold rows of
the table below. FROM 200 with the first-registered holder's layers TO
409 `RESOURCE_CONFLICT` with `details.candidates`, on REST `/layers`
where no engine is wired for the door chain; FROM resolving the
first-registered holder TO throwing `PackageScopedNameRefusedError`, in
process; FROM the package-unbound active row (200) or the published exit
TO 409 without `details.candidates`, on REST `/published` where no
`objectQLProvider` is wired (review-b F1 and review#2 S3, measured
below). The fix for a caller: name the package. The changeset carries
the banner and `adr-0087: not-required (no-migration-prescription)`: no
key, stored row, layer or export changes shape.

Measured first on `main` `a557fa38` (real `RestServer`, real protocol,
real `SchemaRegistry`; two packages registering the dashboard `sales`,
no stored row):

| door | before | after |
|---|---|---|
| plain `GET /meta/dashboard/sales` | 409 `RESOURCE_CONFLICT` with
`details.candidates` | unchanged |
| REST `/layers`, engine wired for the door chain | 409, sentence only
(no `details`) | 409 with `details.candidates` |
| REST `/layers`, no engine wired (no service copy, or a service copy of
one holder) | **200, the first-registered holder's layers** | 409 with
`details.candidates` |
| in process `getMetaItemLayered({ type, name })` | **resolves, the
first-registered holder's layers** | throws
`PackageScopedNameRefusedError` (409, `refusal.candidates` naming both)
|
| REST `/published`, no `objectQLProvider` | **the published exit: the
metadata service's `getPublished` answer, or 501 `NOT_IMPLEMENTED` when
the host resolves no metadata service** | 409 `RESOURCE_CONFLICT`, no
`details` |
| REST `/published`, no `objectQLProvider`, the name also has a
package-unbound active row | **200, that row** | 409
`RESOURCE_CONFLICT`, no `details` |
| REST `/published`, engine wired | 409 `RESOURCE_CONFLICT`, no
`details` | unchanged |
| dispatcher `/published`, engine registry not reachable, no
package-unbound row | the snapshot (the throw is swallowed) | unchanged
(not pinned) |
| dispatcher `/published`, the same, with a package-unbound active row |
**that row** (read from the tree) | the code snapshot: the throw is
swallowed (read from the tree, not pinned) |
| `?package=` of either holder, and a name one package holds | served |
unchanged |

- **`getMetaItemLayered` (objectstack-ai#32914, and the REST pick folded into objectstack-ai#32622
from objectstack-ai#32624).** Naming no package, a type addressed by package is judged
by the registry's package-scoped resolver (`registry.resolveItem(type,
name, null, member)`), as `getMetaItem` judges it
(`packagelessScopedRead`), before any layer is read and whatever the
metadata service holds. Only the judgment is taken; a name one holder
holds keeps the layers it had. Stored-row holders are not this
judgment's: the door refuses them in step 1c, as contract review S1 on
objectstack-ai#33130 settled, and the in-process read in that state still resolves
(the `[objectstack-ai#32354]` pin is unchanged and green).
- **REST `/layers` catch (objectstack-ai#32622).** `handleRouteError(res, error,
undefined, { packageScopedCandidates: true })`, as the plain read's
catch (objectstack-ai#32201). The deprecated `?layers=true` spelling already answered
through that catch. The dispatcher already carried the candidates
(`errorFromThrown`).
- **Step 1c's refusal (objectstack-ai#32622).** The package-less writes' refusal the
layered door answers for a name whose active rows two packages hold
(objectstack-ai#28337) keeps its sentence, code, status and `?package=` remedy, and
now carries its holders as a package-scoped refusal by shape
(`refusal.status: 'refused'`, `candidates` in the `/actions` shape), so
both transports answer `details.candidates`. The save and delete doors
do not move. This is the item the objectstack-ai#32607 seat re-ruling left to this
card ("Carrying `details.candidates` on `/layers` remains objectstack-ai#32622's job",
6820653691).
- `protocol.ts`: docblock only (9 lines, under the seat's 14:45Z rule
change). `packagelessLayeredReadRefusal`'s docblock now says the refusal
carries its holders as `refusal.candidates`, and that
`getMetaItemLayered`'s in-process readers meet the registry's refusal of
a name two packages register in code. The emitted `dist/index.js` and
`dist/index.cjs` differ from `HEAD~1`'s in those comment lines alone
(two builds, raw diff). A later commit adds the `@throws` for the
two-holder refusal to `getMetaItemLayered`'s docblock (review-b N2, 4
lines).

## Tests

- `packages/rest/src/meta-layers-ambiguous-package.test.ts`, new
describe `[objectstack-ai#32622, objectstack-ai#32914] a name two packages register, read naming no
package`: 3 compositions (engine wired; no engine wired; no engine wired
with a metadata-service copy of the first holder) x 2 registration
orders, both spellings answer 409 `RESOURCE_CONFLICT` with both holders
as `details.candidates` and serve neither holder; in process the layered
read refuses (`code` + `status` + `refusal.candidates`) in every
composition and each `packageId` read still serves its holder; CONTROL:
a name one package registers is served in process and on both spellings,
and `?package=` serves its holder.
- `[objectstack-ai#28337]` pins on both transports
(`rest/.../meta-layers-ambiguous-package.test.ts`,
`runtime/.../meta-layers-ambiguous-package.test.ts`, RestServer and
hono): the envelope is now the writes' envelope plus `details`, with
both holders as `details.candidates`; the writes' answer is asserted to
carry no `details`.
- `[objectstack-ai#32354]` ruling-Q2 pins
(`rest/.../meta-disabled-package-doors.test.ts`,
`runtime/.../meta-disabled-holder-served-stack.test.ts`): `/layers` now
asserts `details.candidates` naming only the served holders.
-
`metadata-protocol/.../protocol.packageless-layered-read-refusal.test.ts`:
the step-1c refusal carries `refusal.candidates`; the save's refusal
carries none.
- `rest/.../meta-qualified-item-route.test.ts`, new top-level describe
`objectstack-ai#32622 — the other /layers refusal exits carry details.candidates`
(review#2 S1). It covers two exits. The bare action read with the
platform's item beside A's answers `[A, platform]`. `/layers?package=`
of a package holding none answers `[A]`. Each is asserted equal to the
item read's candidates. The stale `objectstack-ai#32365` comment there is corrected:
`/layers` carries the candidates, `/published` its text. S1 ablation
(the `/layers` catch without `packageScopedCandidates`, rest source):
both new cases red (`AssertionError: {"error":"The action \"approve\" is
held by 2 holders …` and `… is not held by package \"com.acme.gamma\"
…`), 2 failed of 325; restored with blob equal to HEAD and `git diff
HEAD` empty; baseline 325/325.

<details><summary>Ablations (each leg restored; blob == HEAD proven by
ablation-replace)</summary>

HEAD `6e50dbd5c7`. Baseline green: rest 62/62, metadata-protocol 3/3,
runtime 367/367 (the three files above per package).

- **A2, the `/layers` catch without `packageScopedCandidates`** (rest
source, read from `src`): 9 red, e.g. `/layers: expected [] to deeply
equal [ 'package:app.alpha_demo', …(1) ]` and the ruling-Q2 pin
`expected [] to deeply equal [ Array(2) ]`; the in-process and CONTROL
cases stay green, as expected.
- **A1, `getMetaItemLayered` without the resolver judgment**
(metadata-protocol rebuilt, marker `ABLATED_32914` present in 2 built
files): 6 red, the no-engine cases `/layers: … "label":"app.alpha_demo
code" …: expected [ 200, … ] to deeply equal [ 409, 'RESOURCE_CONFLICT'
]` and the in-process cases `expected [ undefined, undefined ] to deeply
equal [ 'RESOURCE_CONFLICT', 409 ]`; the engine-wired cases stay green
(the door's owner step refuses there), as expected.
- **A3, step 1c's refusal without its candidates** (metadata-protocol
rebuilt, marker `ABLATED_32622` present): metadata-protocol `expected
undefined to be 'refused'`; rest `expected [ 'code', 'error' ] to deeply
equal [ 'code', 'details', 'error' ]`; runtime RestServer and hono twins
red the same way (hono: `[ 'code', 'httpStatus', 'message' ]`). A first
A3 attempt was refused by `ablation-replace` (its replacement contained
the anchor, so the anchor count did not drop) and restored at once; its
green readings were a no-op and are discarded.
- Restore leg: metadata-protocol rebuilt, both markers absent from all
24 built files, working tree clean.

</details>

## Acceptance notes

- review-b F1 is closed on the prose faces: the `/published` rows are in
the changeset banner, the `Clause-②` line and the table. Its follow-up
card objectstack-ai#34101 was filed, then closed as not planned by triage under the p3
standard. So the REST and dispatcher `/published` answers stay different
(REST 409 without `details.candidates`; the dispatcher swallows the
throw and serves the snapshot), and neither is pinned. Recorded here as
accepted.
- review-b N1 / review#2 N1: `echoSecurityCatalogMutation` recovers from
the refusal only when the event names no address. At a package-unbound
address of a `permission` name two packages register, the echo now
throws where it used to read and skip; the projector runner and the boot
pass catch it and warn. No grant, lock or served answer changes (read).
Its carrier objectstack-ai#34101 is closed, so it is recorded here as accepted.
- review#2 S1 is folded (Tests above). review#2 S3 is folded: the
stored-row FROM and the dispatcher row are in the changeset, the
`Clause-②` line and the table. REST was measured (see the S3 block under
Verification); the dispatcher rows are read from the tree.
- review#2 S2 (read, not measured): "Step 1c's `details.candidates` are
the packages the active rows are bound to
(`packagelessAddress().candidates`), not the holders the plain read
judges." Where a package's row stands beside its own customization
pair's row (the objectstack-ai#32662 scope-note (b) state), the plain read serves that
package's row, while bare `/layers` answers 409 and now names the pair
as `{ kind: 'package' }`; a row the reads decline is named the same way.
Not folded and no card, under the p3 standard.
- review#2 S4 (read, not measured): "The layered read takes the
resolver's judgment and not its answer." For a name that an overridable
baseline and one other package both hold (`email_template`, baseline
`com.objectstack.service.email`), the plain read serves the other
package. With no metadata-service copy, the layered read's code layer is
still the artifact lookup's first composite, by registration order. Not
introduced by this diff. Not folded and no card, under the p3 standard.
- review#2 N2 (pin breadth: candidates compared sorted, `dashboard`
only, no bundle member, no dispatcher pin on a boot with no service
copy) is recorded as accepted. N3 (body staleness) is fixed in this
body.
- Declaration re-read after the diff, on the area seat's order: the
claim declared `Clause-②: no`; measured, two answers move (the bold rows
above), so the PR body and the changeset now declare `Clause-②: no
(narrowing)` with the BREAKING banner, the `!` title and the ADR-0087
marker, after the objectstack-ai#33646 precedent. On the composition that wires the
engine (the default `RestServer` host) the door already answered 409. No
gate reads the claim comment's line (the queue and level gates read this
body and the changesets), so the claim comments were not amended.
- The in-process readers already handle the refusal: the
packaged-permission-set lock gate and the security catalog echo catch a
409 naming package candidates and read each holder at its package
(ADR-0150 D4, objectstack-ai#31698).
- `git merge-tree --write-tree --name-only` of this head against the
open PRs sharing a file and `origin/main`: objectstack-ai#33898 (`64c5d88452`, shares
`protocol.ts` and `meta-qualified-item-read.test.ts`), objectstack-ai#33889
(`bdb3a20a71`, shares `meta-disabled-holder-served-stack.test.ts`) and
`origin/main` (`895783a1e8`) each exit 0, no conflicted path. objectstack-ai#33898's
`protocol.ts` hunks sit near lines 322 and 7089; the docblock here is
near line 4205.

## Verification

<details><summary>REST /published FROM and TO (review-b F1), measured at
e516f35</summary>

A throwaway probe beside the REST pins, not committed. It used the same
real protocol and real `SchemaRegistry`, with two packages registering
the dashboard `sales`, `GET /meta/dashboard/sales/published` naming no
package, both registration orders. TO is the head as built. FROM is the
head with `getMetaItemLayered`'s resolver call ablated
(`ablation-replace` landed, the marker present in 2 built files, then
restored: blob equal to HEAD, marker absent from all 24 built files).

| composition | FROM | TO |
|---|---|---|
| engine wired (`objectQLProvider`) | 409 `RESOURCE_CONFLICT`, `details`
null | 409 `RESOURCE_CONFLICT`, `details` null |
| no `objectQLProvider`, no metadata service | 501 `NOT_IMPLEMENTED`
("Nothing is runtime-published for this item, and this kernel has no
code/package store …") | 409 `RESOURCE_CONFLICT`, `details` null |
| no `objectQLProvider`, the protocol's service holding a copy of the
first holder (two shapes) | 501 `NOT_IMPLEMENTED` (the REST host
resolves no metadata service of its own) | 409 `RESOURCE_CONFLICT`,
`details` null |

The FROM on a host whose REST metadata service has `getPublished` (the
service's answer, served 200) was NOT MEASURED. The probe shape for it,
which stubs the host's `resolveMetadataService`, never got the verify
lock: four 540 s waits behind pid 16926, a `pnpm --filter
@objectstack/dogfood exec vitest run --maxWorkers=1` holding over 60
minutes. That row is read from the tree (`meta-item-history-routes.ts`,
the fallthrough after the overlay read). Each VERDICT command-exit 0.

</details>

<details><summary>REST /published with a package-unbound active row
(review#2 S3), measured at 9dd398c</summary>

A throwaway probe beside the REST pins, deleted and never committed.
Same real protocol and `SchemaRegistry`. A package-less `saveMetaItem`
stores the dashboard `sales` as a package-unbound active row (`[sales,
null, active]`). Then two packages register `sales` in code, both
registration orders, and the RestServer has no `objectQLProvider`. TO is
the head as built. FROM is the head with the resolver call ablated: the
marker was present in 2 built files, then restored, with the blob equal
to HEAD and the marker absent from all 24 built files.

| door | FROM | TO |
|---|---|---|
| `GET /meta/dashboard/sales/published` | 200, the package-unbound row
(`env row`) | 409 `RESOURCE_CONFLICT`, `details` null |
| `GET /meta/dashboard/sales` (plain read) | 409 with
`details.candidates` naming both | the same |

VERDICT command-exit 0. The dispatcher rows are read from the tree, not
measured.

</details>

<details><summary>Dogfood battery, on fa7fb66</summary>

Built `@objectstack/dogfood^...` (turbo, VERDICT command-exit 0), then
under the lock `pnpm --filter @objectstack/dogfood test` with no
`OS_TEST_SHARD` and no path: VERDICT command-exit 0, Test Files 467
passed, 3 skipped (470); Tests 3959 passed, 42 skipped (4001). The final
head adds only the `protocol.ts` docblock commit; the emitted JS differs
from `fa7fb66a7c`'s in comment lines alone, so the battery reading
covers the head's executable bytes. The final head adds a changeset edit
and the 4-line `@throws` docblock, again comment-only.

</details>

<details><summary>Packages, on head 6e50dbd (before merging main) and
on 02d6109 (after it)</summary>

On `6e50dbd5c7`, under the verify lock (VERDICT command-exit 0):
typecheck and test green for metadata-protocol (22883 passed), rest
(8451), runtime (10874), plugin-security (6681), objectql (13110),
service-automation (3976), client (812), cloud-connection (1217),
plugin-auth (5465), plugin-email (1018), service-messaging (966),
service-package (144), plugin-dev tests (89). organizations,
plugin-approvals, verify, cli and three typechecks went red there on
`Cannot find module` / `Failed to resolve entry` for packages this
worktree had not built (build state, not this diff).

On `02d6109dde` (one merge of `origin/main`, no conflict, no touched
file moved upstream), after building the whole closure of those packages
(turbo exit 0), under the lock (VERDICT command-exit 0): the targeted
files rest 62/62, metadata-protocol 3/3, runtime 367/367; typecheck
green for all 17 packages (metadata-protocol, rest, runtime,
plugin-security, objectql, service-automation, client, cloud-connection,
organizations, plugin-approvals, plugin-auth, plugin-dev, plugin-email,
service-messaging, service-package, verify, cli); tests green for
service-automation (3977), organizations (252), plugin-approvals (1652),
plugin-dev (89), verify (439), cli unit (6000).

</details>

<details><summary>Gates</summary>

The derived set (`dispatch-gates.mjs --commands`, 70 commands) ran on
`d0a5dbd220`: 67 exit 0. `check:test-source-alias` was red on a runtime
pin file this PR edits (a dynamic `@objectstack/metadata` load in a
clocked window); fixed in `6e50dbd5c7` (module-top import), re-run exit
0. `check:dual-build-cjs-loads` and `check:type-check-debt`:
PREREQUISITE NOT MET locally (no full build; the lock queue), so NOT
MEASURED here; CI runs both. PR body gates on this body:
closing-keyword-parity, partof-closing-keyword, changeset-no-major and
adr-0087-registration exit 0. ESLint on the changed files exit 0. The
union on the final head is cited in the report on objectstack-ai#32622.

On `e516f3534b`, re-derived (74 commands, the `protocol.ts` touch adds
`check:adr-symbol-anchors`, `check:facade-delegation-only`,
`check:filter-alias-parity`, `check:wildcard-fallthrough`): 73 exit 0;
`check:type-check-debt` exit 3 PREREQUISITE NOT MET (its build lost the
lock queue), NOT MEASURED, CI runs it. `dispatch-gates --ran`: 74
accounted, 73 run, 1 NOT-MEASURED, 0 UNRUN. `check-platform-checklist
--changed-from origin/main` exit 0. On this body: changeset-no-major
(LEVEL AXIS reads `no (narrowing)` + `none` at patch),
adr-0087-registration (1 declared-breaking changeset, `not-required
(no-migration-prescription)`), closing-keyword-parity and
partof-closing-keyword exit 0.

On the final head `e57e7c0566` (the `/published` banner row and the
`@throws` docblock): the 74 derived commands again gave 73 exit 0, with
`check:type-check-debt` exit 3 PREREQUISITE NOT MET, so NOT MEASURED.
`--ran` accounted for 74 (73 run, 1 NOT-MEASURED, 0 UNRUN).
`check-platform-checklist --changed-from origin/main` exit 0. Changeset
gates (adr-0087-registration, changeset-no-major, empty-changeset,
changeset-fixed, nul-bytes) exit 0. `git merge-tree --write-tree
--name-only` against `origin/main` `e71ecc1b32` exit 0, so it still
merges clean now that objectstack-ai#33898 is merged; objectstack-ai#33889 `bdb3a20a71` exit 0. CI
`Test Core (3/8)` on `e57e7c0566` failed twice: run 43743965993, job
132903743253, and the lane's one re-run, job 132914286588. Both times
the only failed task was `packages/qa/scenarios` `run-date.test.ts`, on
vitest's 5000 ms timeout. The first run failed `2028-03-31` at 6278 ms.
The re-run failed `2028-02-28` at 5619 ms and `2028-02-29` at 6907 ms,
while `2028-03-31` passed there at 4615 ms. A different case each time,
and no assertion failed. The test imports only `@objectstack/spec` and
the scenarios package's own sources, which this diff does not touch. The
same file failed the same way on `main` without this PR: the merge-queue
run of the unrelated objectql-only objectstack-ai#33902 (run 43747969462, job
132917233366, Test Core 4/8) failed `2028-02-28` at 5719 ms. `main`'s
push run does not run scenarios at all (affected-only shards). Locally,
on the branch merged with `origin/main` at `9dd398cda0`, the file passed
3 of 3 runs (34/34 each, about 5.4 s of tests). The scenarios closure is
byte-identical to `main` there (`git diff origin/main --
packages/qa/scenarios packages/spec docs/qa` is empty). Read: a load
timeout that is `main`'s, not this PR's. No rerun from here.

On the final head `a2b29893d0`, two merges of `origin/main` landed, both
clean. `9dd398cda0` came first. `a2b29893d0` contains objectstack-ai#34104
(`e9fb09871d`), the fix for those run-date timeouts (p0 objectstack-ai#34081). Under
the lock, at that head:
- build closure exit 0;
- targeted pins: metadata-protocol 3/3, rest 389/389 (the S1 describe
included), runtime 421/421, scenarios `run-date.test.ts` 35/35;
- typecheck exit 0 for metadata-protocol, rest and runtime.

Between the two merges, the runtime typecheck went red once, on
`meta-object-publish-column-changes.test.ts` (`TursoDriver` not
assignable to `SqlDriver`). The cause was build state:
`@objectstack/driver-turso` is a peer dependency, so it is outside
`runtime^...`, and its `dist` was older than `driver-sql`'s. It went
green once `driver-turso` was built.

Derived gates on that head:
- 75 commands, 74 exit 0;
- `check:type-check-debt` exit 3 PREREQUISITE NOT MET, so NOT MEASURED;
- `--ran` exit 0;
- `check-platform-checklist` exit 0;
- changeset gates exit 0;
- `git merge-tree` against `origin/main` `bf594ebd72` exit 0.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- signed: domain:server#5 · zhuangjianguo ·
session_01QsR2jTkZnXtRhuEiiyidvJ -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant