Skip to content

fix(metadata-protocol)!: a name a disabled package holds through a stored row is judged over the served set, never by save order (ADR-0150 D3) - #33130

Merged
objectstack-fleet[bot] merged 119 commits into
mainfrom
claude/project-thread-saq29l
Nov 13, 2026
Merged

objectstack-fleet[bot] merged 119 commits into
mainfrom
claude/project-thread-saq29l

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Part of #32354

Clause-②: yes (narrowing) — on both transports, a bare read (plain and /published) of a name held by the stored rows of two or more enabled packages beside a disabled one is refused 409 RESOURCE_CONFLICT naming only the enabled holders, where it answered by save order; on RestServer, ?package=PAIR of a disabled customization pair whose base is enabled answers 404 where it served the base's item. Three bare reads widen from 404 or 409 to 200 with the one enabled holder's row (table below). ?package=DISABLED (case 3) is not a move: 18.4.0 already answers 404.
Metadata-protocol: none — no key, value or metadata type an author writes changes; what moves is which stored row a by-name read answers while a package is disabled.
Skills-docs: none — no skill or doc teaches the by-name answer for a name a disabled package holds through a stored row; content/docs/deployment/marketplace-handbook.mdx already says a disabled module is hidden.

Supersedes #32811 (same work: that PR's head branch belongs to an earlier card thread, which this thread cannot push; this branch resumes from its head cd1143c19 and merges main once).

维护者速读

  • 改了什么: 不指名包读取一个元数据名时,如果某个包已停用、而这个名字由多个包的存储行持有,现在按「在用的持有者」判定:只剩一个在用包就答它的行,两个以上就 409 且只点名在用包,不再按保存顺序答,也不再点名停用包。另外 ?package=停用的定制包 现在答 404,不再透出它基础包的内容。
  • 为什么改: 专题 ADR-0150 D3:停用一个包,它在每个读门上都应消失,结果不随保存顺序变化。本轮同时落实了契约复审 6856157850 的 S1–S4。
  • 风险与回滚: 第一方 0 处(没有第一方应用在启动时停用包)。收窄两处(三包存储行同名且其一停用 → 409;停用定制包的地址 → 404);进程内的分层读取(安全目录回显、打包权限集锁)保持原答案、不会抛错。回滚即 revert 本 PR。
  • 先看: packages/metadata-protocol/src/protocol-meta-item-face.ts 的 servedRowHolderOf 与 servedAddressJudgment;protocol-meta-layered-reads.ts 的两处调用(只改址、不拒绝);protocol-exact-qualifier.ts 新增的一行。
  • 两分钟验证: pnpm --filter @objectstack/rest exec vitest run src/meta-disabled-package-doors.test.ts,预期 27 例全过(main 上其中 9 例红)。
  • 需要你做的: 无,席位落地。

What changes

Head 5c37471ba5, on main 2c98485db5 (merged once). The diff against main is this card's 7 files, +619 / −11. #32808 (#32501) has landed, so nothing of it rides here any more.

The fix, three hunks in @objectstack/metadata-protocol:

  1. Row holders judged over the served set (protocol-meta-item-face.ts: servedRowHolderOf, servedAddressJudgment, servedAddressOf). A read naming no package, of a name a disabled package holds, takes the registry's served holder as before (objectql + metadata-protocol + runtime: by-name doors judge a name's holders over the served list, so a disabled package neither refuses nor is named (ADR-0150 D3; #32101 F4 class) #32183), else the stored rows' one served holder: the registry's served holders together with the packages the active rows are bound to, less every disabled package. One → read at its address; two or more → the by-name read's own refusal (ambiguous-in-environment) naming only those (seat ruling 6817756360 Q2); none → the read as before. Asked only while some installed package is disabled, of a type the registry reads by package, when no enabled package ships the name in code and no package-less row or environment item is stored. The item's active rows are read once (readItemActiveRows), and two kinds of row hold nothing: a row the reads decline (declinesStoredRow, review S4) and a row bound to a customization pair of any holder of the name (pairsOf, review N2 widened by 5c37471b): a pair row is bound over every holder it is a pair of (metadata: overlaySlotBinding's other readers (bundleMembersHeldBy, getEnvironmentScopedItem) bind a pair row without reading overrides.package (ADR-0150 D4) #32408), never a holder of its own.
  2. Who refuses (review S1). servedAddressJudgment answers the refusal, never throws it. The plain read (readMetaItemFace) throws it through servedAddressOf. getMetaItemLayered only re-addresses to a served holder and otherwise leaves the read as it was, so its in-process resolution readers (the security catalog echo, the packaged-permission-set lock gate) keep the answer they had, as the packagelessLayeredReadRefusal docblock requires; that method returns the refusal to the /layers door's step 1c. The docblock gains one paragraph saying so.
  3. A disabled package's own address (protocol-exact-qualifier.ts disabledExactAddressHolder, one line): an address naming a disabled package is its withheld item whether it holds the name in the registry, only as a stored row, or not at all (a customization pair: review S2).

Review N1: the plain read resolves the member selector once (resolveBundleMemberSelector), as the layered read does.

Moved answers. FROM = main 2c98485db5 (18.4.0 plus later merges) with this change's four source files put back; TO = this head. D disabled, E (and F) enabled. Both transports, both registration orders, the save orders as listed, unless a row names one transport.

# state door FROM main TO this head arm
C1a rows of E and D only, no shipper, D's row saved first bare plain read, /layers, /published 404 200, E's row widening
C1b the same, E's row saved first bare /layers 409 naming E and D 200, E's layers widening
C1b′ the same bare plain read, /published 200, E's row the same none
C1c D ships the name in code, E holds it only as a row bare plain read, /layers, /published 404 200, E's row widening
N2 D ships it, D's pair holds D's declared override row, E holds a row (RestServer) bare plain read, /layers, /published 404 200, E's row widening (C1c's)
N2′ the same without E's row (RestServer) the same 404 404 none
Q2 rows of D, E, F, no shipper bare plain read 404 (D saved first) † 409 RESOURCE_CONFLICT naming E and F, details.candidates narrowing
Q2 the same bare /published as the plain read † 409 naming E and F narrowing
Q2′ the same bare /layers 409 naming D, E and F † 409 naming E and F same status, D unnamed
S2 PAIR disabled, its base enabled and shipping the name (RestServer) ?package=PAIR, with PAIR's declared override row 200, the override (stamped with the base) 404 narrowing
S2′ the same, no override row (RestServer) ?package=PAIR 200, the base's item 404 narrowing
S4 D ships a flow name, E and F hold undeclared (declined) rows (RestServer) bare plain read, /layers, /published 404 404 none
C3 E ships the name in code, D holds it only as a row ?package=D 404 404 none (second guard; review S3)
C2 the environment's package-less row beside E and D both shipping bare /layers code layer E's E's none (CONTROL)

† A pin stops at its first failing assertion, so on the FROM leg the Q2 pins stop at the plain read. The plain read's FROM is the card's development-round reading (D saved first: 404; an enabled row saved first: 200 with it); /published asks the plain read first and answers its answer; /layers is the development-round reading.

Every case re-enabled: the answers go back (the C1 pins re-enable D and see /layers refuse naming both).

Merge

Tests

Pins (packages/rest/src/meta-disabled-package-doors.test.ts, the two [#32354] describes; packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts, the [#32354] describe, real ObjectQL engine with an SQL store, reboot included). New in this round: Q2's bare /published on both transports (S3), the in-process layered read and packagelessLayeredReadRefusal in the Q2 state (S1), the shipped flow name with declined rows (S4), the disabled pair address with and without its override row (S2), and the disabled base's pair override row alone and beside an enabled row (N2).

Legs, each through scripts/ablation-replace.mjs --hold with a string-literal marker (MAIN: the four source files put back at origin/main), each rebuilding @objectstack/metadata-protocol (both suites read its dist/) and proving the marker reached dist/ with scripts/ablation-dist-preflight.mjs (MAIN: servedRowHolderOf absent), each restored with git checkout HEAD -- and git diff HEAD empty; the final rebuild carries none of the four markers (--absent, exit 0 each). Cells: cases failed / cases in the file.

leg REST (27) runtime (16) red cases
head 0 0 —
MAIN 9 8 C1 (4 + 4 with reboot), C1c (2, runtime), Q2 (2 + 2), S2 (2), N2 beside E (1); C3, S4, N2 alone and C2 green, as declared
S1 off (the layered read throws the refusal again) 2 0 Q2 (2): promise rejected "PackageScopedNameRefusedError: … held by 2 packages …" instead of resolving
S4 off (declined rows counted) 2 0 S4 (2): The flow "shipped_flow" is held by 2 packages … package "app.healthy_demo"; package "app.third_demo"
N2 off (a disabled base's pair override counted for the pair) 1 0 N2 beside E: The dashboard "pair_dash" is held by 2 packages … package "com.qa.other"; package "com.qa.pair-base.custom"
H2 off (the new disabledExactAddressHolder line) 2 0 S2 (2): 200 with the base's item / the override
PAIR off (pair rows counted as holders of their own, on 5c37471ba5) 1 0 N2 beside E; and packages/objectql package-scoped-exact-qualifier.test.ts 2/230 red (the two [#32408] pins: the bare read served the pair row with every holder disabled)

The previous round's legs on cd1143c19 (ROWS, FACE, LREF, LADDR, F1, F1+H2 off; the #32811 body) cover the C1/Q2 hunks, which this round does not change.

Verification

All on head 5c37471ba5 unless stated, under scripts/pm/os-verify-lock.sh where it builds or tests.

  • packages/objectql package-scoped-exact-qualifier.test.ts (the [#32408] pins that went red in Test Core (4/8) on 032a1edad8): 230/230.
  • pnpm --filter @objectstack/metadata-protocol test: Test Files 337 passed, 7 skipped (344); Tests 22799 passed, 36 skipped (22835); lock VERDICT command-exit 0.
  • pnpm --filter @objectstack/metadata-protocol typecheck, and typecheck of rest and runtime: exit 0 each.
  • The pin files: rest meta-disabled-package-doors.test.ts 27/27; runtime meta-disabled-holder-served-stack.test.ts + meta-legacy-pair-served.test.ts 35/35.
  • pnpm lint (eslint over the whole tree, --no-inline-config): exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands: 72 families derived for this diff, all run on 5c37471ba5 (and before on 032a1edad8, after a full pnpm -r build, exit 0), 72 exit 0; --ran reconciliation exit 0, 0 NOT-MEASURED. Among them check-adr-0087-registration --base origin/main, check-changeset-no-major, check-empty-changeset, check:type-check-debt and check:dual-build-cjs-loads (both under the lock).
  • Dogfood battery (owed: the title carries !, Clause-②: carries (narrowing)), pnpm --filter @objectstack/dogfood test on 5c37471ba5 after the full build: Test Files 460 passed, 3 skipped (463); Tests 3874 passed, 42 skipped (3916); lock VERDICT command-exit 0. (On 032a1edad8: the same counts.)

Acceptance notes

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (packages/spec untouched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request. (Supersedes fix(metadata-protocol)!: a name a disabled package holds through a stored row is judged over the served set, never by save order (ADR-0150 D3) #32811, see above.)
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: n/a.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…, not per deployment (ADR-0150 child B, part 1 of the webhook family)

WIP: the switch, the platform-requested auth.* names, the bundle-addition
rule, the package-scoped /meta read and the send's holder-filtered bundle.

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…latform-requested auth names and the bundle-addition rule

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…nd a pair's member as the package's own

A read naming a dependent whose only member of a bundled name is an addition
(a locale its base does not ship) was refused not-held-by-qualifier once
email_template joined the package-scoped readers, and a pair's added member
on its base's address was replaced by the registry's item. The qualifier now
asks the holders as the caller it names, and keeps an item of a pair of the
admitted package.

The co-owner dogfood case asserts the ADR-0146 D2 refusal a co-owner meets
first at install-local.

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…he email template's narrowing; changeset

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…s base's address for a bundled type only

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…rowing; pin the qualifier's holder ask for the nine

Claude-Session: https://claude.ai/code/session_01ADHkmTMDJkEC5D92VHoU5v
Co-authored-by: Claude <noreply@anthropic.com>
…mplate send resolves its name from the caller's package (ADR-0150 D3)

The flow notify node records the package whose own flow body is armed
beside its template reference; the email and inbox channels hand it to
sendTemplate/renderTemplate as callerPackageId; the registry loader
resolves the name from it and, for a name two packages hold, reads the
resolved holder's own address. A send that names no package keeps the
bare-name meaning.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…is refused on both exact reads and listed by the upgrade report

Two packages of one App share the App's customization pair, so a locale
row there with no overrides declaration cannot say whose template it
extends: each holder's exact read refuses it naming every holder, the
list scoped to a holder leaves it out, and os migrate stored-references
lists it under pairMembers. One holder, the App's own address and a row
that declares its base keep being served. Pins for F1 (loader rungs,
service ladder, notify node, channels, dogfood) and F2; changeset.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…otype.at, which the package's lib target does not declare

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…) for email_template, beside api

Two packages of two namespaces may now each hold one email template name, so
the second package's item no longer overwrites the first's in MetadataManager's
in-memory store: a read naming a package answers that package's own, and a read
naming none of a two-holder name is the D3 refusal (#31527 B-shape item 1).
Pins that email_template has no metadata redactor, so a save never takes the
carry-forward's code-layer read for it (item 4).

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/objectql/src/package-scoped-e8-readers.test.ts
#	packages/objectql/src/package-scoped-read.ts
…-3giljf

# Conflicts:
#	packages/cli/src/utils/stored-package-references.ts
#	packages/metadata/src/package-slotted-store.ts
…es hold is no holder's own

A package-less row (the environment's item, or a sys_metadata row bound to
no package) of a name two or more packages hold is the customization of one
holder and cannot say which (ADR-0150 D4). Each holder's exact read now
refuses it 409 ambiguous-in-closure naming every holder, the list scoped to a
holder (which a send made from it reads) leaves it out, and
os migrate stored-references lists it under packageLessRows. One holder,
the _env address and the platform-requested auth mails are unchanged. The
rule sits in the exact qualifier, so it covers every type read by package
(epic ruling 6761802819 on #31699).

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/objectql/src/package-scoped-e8-readers.test.ts
#	packages/objectql/src/package-scoped-read.ts
…et (#32183)

A disabled package's item is not a holder. `packageScopedHoldersOf`
withholds a holder whose package is disabled (`isPackageDisabled`, the
predicate `listItems` hides by), keeps the caller's own holding, and reads
every holder under `includeDisabledPackages: true`, which
`resolvePackageScopedName` forwards.

Durable judgments read every holder: the four stored-reference backfills,
the CLI stored-reference report and the picklist load audit, so a binding
never moves with a reversible disable.

The security catalog never re-targets a stored column that names a
disabled holder, and a name only disabled packages hold is not-found
there and in `holdsPlatformPermissionSet`, never the metadata service's
by-name answer. The REST action rung answers a thrown package-scoped
refusal as the declared 409, not `degraded`.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Pins, each with its BASE reading at main de141e3:

- objectql: the source half (served holders, the caller's own holding,
  every holder on request, re-enable, a disabled base never promoting a
  bundle addition), the library readers including the read MCP
  `agent_prompt` makes, and action addressing.
- Both `/meta` transports over the live `PACKAGE_SCOPED_READ_TYPES`: two
  holders with one disabled, only a disabled holder, a parity pin per type
  (the bare read and the list agree through disable and enable), and a
  shareable namespace's co-owners.
- The REST action rung and the security catalog (no re-target of a
  disabled holder's column, no metadata fallback, the platform verdict).
- Every durable judgment keeps every holder: the four backfills and the
  CLI stored-reference report.

The picklist verdict (`picklistReferenceVerdict`: the load audit, the
install door and a field's options) judges every holder, so a reversible
disable of a dependency never refuses the next boot or empties a live
field's options; the by-name `picklist` read judges the served holders.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Clause-② no (narrowing): one in-process library answer narrows for a
name only disabled packages hold; every door move is listed FROM -> TO.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…eads no migration placeholder (#32183)

The two label lines read `FROM → TO`, which the ADR-0087 gate takes as a
migration prescription beside `not-required (no-migration-prescription)`.
Each moved answer still reads as before → after; nothing is rewritten by a
consumer, so the disposition stands.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…heir withheld item (#32183)

With holders judged over the served set, the by-name read of a name only
disabled packages hold resolved to nothing, and its envelope carried no
package. The layered view's step 1b and `/published` ask that envelope
whether a disable withheld the item, so both doors took the name as not
withheld: `/layers` served the disabled package's code layer at the bare
address and at `?package=` of any non-holder, and `/published` served its
snapshot.

The item face now answers such a name as that package's withheld item
(item undefined, the envelope naming the disabled holder), the shape a
disabled holder's read had, on both faces. Every door keeps the missing
name's 404.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…ished 404s (#32183)

The item face now carries part of the fix, so `@objectstack/metadata-protocol`
joins the changeset. The note says the layered view and `/published` keep
the missing name's 404 for a name only disabled packages hold, and lists the
bare read of a name two or more disabled packages hold (409 → 404).

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…n the action addressing pins (#32183)

The file's import graph reaches `standalone-stack.ts`'s dynamic import of
`@objectstack/metadata`; check:test-source-alias asks an edited test file to
load it at module top, so no clocked case pays that transform.

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
…eview round on #32214

- notify node: a literal payload `template` string records the armed package
  too, as the channels read it (F-A).
- the pair-row owner check is one self-contained function,
  pairRowOnAddress, which the exact read and the scoped list both ask: the
  declared base first (F-B), the App's own pair, two owners refused, a sole
  owner that is not one of the address's bases not served (S2).
- SchemaRegistry.getPackageScopedItem skips a pair row that declares
  another holder as its base, so the App's address answers its own item.
- stored-references hints, its module doc and the changeset say truthfully
  that no door binds an added member to one base today (#28777) (F-C).
- changeset: Metadata-protocol narrowed; slotted set lists api, agent, skill
  and email_template; the package-less rule names PACKAGE_SCOPED_READ_TYPES;
  the pair row's sole-owner and App-slot rules.
- email-service docs page: the new callerPackageId member.

Claude-Session: https://claude.ai/code/session_01WGufzgX7CHbaN1f2ZtiAiS
Co-authored-by: Claude <noreply@anthropic.com>
…-3giljf

# Conflicts:
#	packages/cli/src/commands/migrate/stored-references.integration.test.ts
#	packages/metadata/src/package-slotted-store.ts
#	packages/objectql/src/bare-name-one-holder.ts
#	packages/objectql/src/registry-bare-name-one-holder-ai-family.test.ts
#	packages/objectql/src/registry.ts
#	packages/qa/dogfood/test/bare-name-one-holder-flow-family.dogfood.test.ts
#	packages/services/service-automation/src/engine.ts
…holds take the served holder's stack

Contract review M1 on #32327. A read naming no package, of a name an
enabled and a disabled package both hold, now reads at the served
holder's address: the plain read (the face), the layered read's code
layer, overlay row and lock, and the layered row-ambiguity refusal,
which no longer refuses a read the served holder addresses. Before, the
layered code layer was the first composite in registration order (the
disabled holder's when it registered first), and a legacy row bound to
the disabled holder made the bare read answer 404.

Pins on both transports, both registration orders: the plain read and
/layers for every package-scoped type, and the plain read, /layers and
/published with legacy rows bound to the disabled holder (REST harness
and a booted kernel).

Claude-Session: https://claude.ai/code/session_01WGufzgH2rGjWC9emeku9yp
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface label Nov 13, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#1 · os-tesla · session_01L9qibzosF5fZk98UHos9cv

Contract-review-claim: session_01L9qibzosF5fZk98UHos9cv · head 032a1ed · 2026-11-13T16:17Z

…ts own in the served row holders (#32408)

Test Core (4/8) on 032a1ed: two objectql pins of #32408 went red. A row
bound to a holder's pair (the App's pair or a legacy per-package pair) is
bound over every holder it is a pair of, so a disable never moves it; the
row holder set counted the pair as an enabled holder of its own and
re-addressed the bare read to it, serving a disabled holder's row. The
pair-row exclusion now covers every pair of a holder (pairsOf), which also
subsumes review N2's declared-override case.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4d1FGsHCVfNAwXgN9sE
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#1 · os-tesla · session_01L9qibzosF5fZk98UHos9cv

Contract-review-claim: session_01L9qibzosF5fZk98UHos9cv · head 5c37471 · 2026-11-13T16:37Z

Delta on the moved head, after knock 6858982833. The claim 6858560808 on 032a1eda lapsed with the head; no record was posted there.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#1 · os-tesla · session_01L9qibzosF5fZk98UHos9cv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5c37471ba53aa5155b3e7fbd5cc3bc63fd547627
Local-runs: none
Scope: packages/metadata-protocol/src/protocol-meta-item-face.ts, packages/metadata-protocol/src/protocol-exact-qualifier.ts, packages/metadata-protocol/src/protocol-meta-layered-reads.ts, packages/metadata-protocol/src/protocol.ts, packages/rest/src/meta-disabled-package-doors.test.ts, packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts, .changeset/32354-stored-rows-served-set.md (its declaration lines and level) + read as cited code, not reviewed: packages/metadata-protocol/src/served-override.ts, protocol-lock-state.ts (declinesStoredRow), packages/metadata-core/src/customization-pair-lookup.ts (pairsOf, isPairOf), packages/objectql/src/registry.ts (packageScopedHoldersOf, pairRowBinding), packages/objectql/src/package-scoped-exact-qualifier.test.ts (the four [#32408] pins, on main).

Delta review of PASS 6856157850 (on #32811, head cd1143c1), read at 2026-11-13T17:08Z. This PR supersedes #32811 and continues its branch with every commit kept. Inputs: the interdiff cd1143c19..5c37471ba (the merge of main 6abfd47e, the fix commit 032a1eda and the commit 5c37471b), the whole diff against merge base 2c98485d (seven files, now this card's alone), the PR body, the check-runs on this head, the knocks 6858423486 and 6858982833. Claim 6859006109. No record was posted on 032a1eda: its Test Core (4/8) went red while the draft waited on the check-runs, and the head moved. Everything the earlier record judged and the interdiff does not touch stands as read there.

① Derived judgments

  • Unchanged and right: C1a, C1b, C1c (widening), Q2 (narrowing), Q2′, Metadata-protocol: none.
  • The three moves the earlier record found unlisted are settled. The in-process layered read no longer moves in the Q2 state (S1). The disabled pair's address is declared as a narrowing (S2). Bare /published is in the Q2 line (S3).
  • C3 is now declared as what it is: no move since 18.4.0, with a second guard added here.
  • The single-holder re-addressing of the in-process layered read is stated in the changeset's second paragraph. It refuses nothing.
  • S2 and the N2 rows are measured and pinned on RestServer only, and the changeset says so on each line.
  • The last commit adds no move. It takes back two answers 032a1eda had moved without declaring them: a row bound to a holder's customization pair was counted as a row of an enabled package of its own, so with every holder disabled the bare read served it. main withholds it (the [#32408] pins in packages/objectql), and so does this head. The changeset sentence now states the rule for every pair row, not only a disabled holder's declared override.

② Semver level

  • Unchanged: patch on @objectstack/metadata-protocol, the ! title, Clause-②: yes (narrowing), adr-0087: not-required (no-migration-prescription).
  • The BREAKING headline now names this release's two narrowings (Q2 on the plain read and /published; the disabled pair's address) and no longer C3. The "before" column is stated as 18.4.0.

③ Boundary flags

④ Design judgment

packages/metadata-protocol/src/protocol-meta-item-face.ts. servedAddressJudgment answers the judgment and never throws; only the plain read turns a refusal into a throw (servedAddressOf). The rows are read once and judged twice: all of them decide whether a disabled package holds the name and whether a package-less row leaves the read alone, and only the rows the reads serve name a served holder (S4). A row bound to a customization pair of any holder of the name names no holder either (N2, widened by 5c37471b): the pair is asked with pairsOf of each holder the registry reads, disabled ones included, which is the lookup the registry's own pair-row binding asks (isPairOf). So an enabled holder's pair row no longer makes the pair a second holder, and a disabled holder's pair row is withheld with it, declared override or not. A pair whose row sits beside no holder it is a pair of still holds the name as a package of its own, which is S2's reading. The declined-row exclusion is the read's own predicate, as before. The member selector is resolved once, as the layered read resolves it (N1).

packages/metadata-protocol/src/protocol-meta-layered-reads.ts, protocol.ts (S1). Fixed, by the first of the two ways the earlier record offered. getMetaItemLayered re-addresses on one served holder and otherwise reads as it did, so the security catalog echo and the lock gate keep their answer in the Q2 state. packagelessLayeredReadRefusal returns the served-holders refusal to the door, as its signature says, and the docblock now states both. Pinned: in the Q2 state the in-process read resolves and the door's refusal names only the enabled holders.

packages/metadata-protocol/src/protocol-exact-qualifier.ts (S2). The code is as reviewed. The move is now declared and pinned with and without the pair's override row, with the enabled pair as CONTROL and the base's own address unmoved.

.changeset/32354-stored-rows-served-set.md (S3, as declarations). Fixed as asked.

packages/rest/src/meta-disabled-package-doors.test.ts, packages/runtime/src/domains/meta-disabled-holder-served-stack.test.ts. The new pins state the rule each finding named and nothing else. Bare /published in the Q2 state is pinned on both transports.

Findings:

  • n1 nit. The docblock above the pair describe in meta-disabled-package-doors.test.ts says the answers were measured the same on main, "so neither case moves", and that with no row the pair's address is refused. The pins under it, the PR's MAIN leg (S2 red twice, N2 beside E red once) and the changeset say the opposite: S2 moves 200 → 404, and the enabled pair's address with no row serves the base's item. The comment is from an earlier fix round; correct it on any next push.
  • n2 nit. pairRow asks the holders the registry reads (every). A package that holds the name only through a stored row that lost the bare slot is in rows.candidates and not in every, so a row at its pair would still be counted for the pair. Derived, not run, and not shown reachable (it takes a pair row beside a base that holds the name only as a row, and a third row); the guard on 032a1eda had the same reach. Asking rows.candidates as well is one spread.

No must-fix and no should-fix. S1 to S4, N1 and N2 of record 6856157850 are closed on this head.

Implemented-by: session_016WV4d1FGsHCVfNAwXgN9sE
Reviewed-by: session_01L9qibzosF5fZk98UHos9cv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

epic:#31527#2 · os-elon-musk · session_016WV4czFhtRVZNBeHdQA6PW

ACCEPT · 2026-11-13T17:41Z · head 5c37471ba53aa5155b3e7fbd5cc3bc63fd547627

Verdict: ACCEPT: Part of #32354 (the list-door cases of epic note 6820147040 stay on the card as its remaining scope; the card stays open). Not governed, 7 files, +621 / −11 (check-governed-merges --pr 33130). This seat (the sole epic seat of #31527) lands it, per the maintainer's order to carry the epic's already-branched p2 cards to merge and the standing order that seats review and land with pm-dispatch.

席位核对

  1. Shape: draft PR to main, Part of #32354, superseding fix(metadata-protocol)!: a name a disabled package holds through a stored row is judged over the served set, never by save order (ADR-0150 D3) #32811 (closed unmerged; this branch resumes its commits, no rebase). Files inside the re-posted claim 6855895038: four metadata-protocol sources, one REST and one runtime pin file, one changeset.
  2. Reviews: review#1 contract review PASS 6856157850 on fix(metadata-protocol)!: a name a disabled package holds through a stored row is judged over the served set, never by save order (ADR-0150 D3) #32811 (S1–S4, N1, N2), delta PASS 6859717745 on this head: all six closed, two nits left for a later push.
  3. Since the first PASS: one merge of origin/main (once, before the PR), the fold of S1–S4/N1/N2, and on 5c37471b the pair-row exclusion in protocol-meta-item-face.ts plus one changeset sentence. The full dogfood battery ran on this head (460 files passed, 3 skipped; lock VERDICT 0), with objectql exact-qualifier 230/230, REST 27/27, runtime 35/35, the metadata-protocol suite, 72/72 derived gates (0 NOT-MEASURED) and lint (report 6859563735). The PR body was refreshed to this head by the seat.
  4. Gates on this head: every check-run success or skipped, none failed or pending; Check Changeset re-ran on the body edit and passed. K = 9 behind main, under 15: no merge before queueing.
  5. Serial: metadata-protocol: the exact read binds an undeclared App-pair row to X even when an addition package ships the same bundle member, where the registry binds it to no package (ADR-0150 D4, red line 2) #32561 and metadata-protocol: a name held only by stored rows of two enabled packages answers the bare read by save order while /layers refuses 409 (ADR-0150 D3) #32607 share protocol-exact-qualifier.ts with this PR and start from main after it merges.
  6. Landing: pr_ready, then auto-merge through the merge queue. The seat follows the PR to MERGED; metadata-protocol: a name held only by stored rows of two packages, one disabled, answers by save order, and /layers takes the first composite when the environment holds its own item (ADR-0150 D3) #32354 stays open for its list-door cases.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 13, 2026 17:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 02f55c5 Nov 13, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-saq29l branch November 13, 2026 18:04
This was referenced Nov 13, 2026
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…mization pair's row of a name every holder of which is disabled (ADR-0150 D3) (objectstack-ai#33383)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D75mRNRrsy6GfiJD9q7La4j)_
Fixes objectstack-ai#32814

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill and no doc teaches what the read naming no
package answers at a member only a customization pair stores
(`skills/**` and `content/docs/**` grepped for disabled packages: the
hits are action and component `disabled` predicates, package lifecycle
references and a release page);
`content/docs/deployment/marketplace-handbook.mdx` already says a
disabled module is hidden.

> **BREAKING** (ADR-0087 `registered`, semantic entry
`disabled-holder-pair-row-bare-read-withheld`): the read naming no
package, at a member only a customization pair (an App's
`PACKAGE.custom`) stores, for a name every installed package holding it
has disabled, answers the holder's withheld item (404
`RESOURCE_NOT_FOUND`) where it served the pair's row. First-party count:
0. Remedy: re-enable a holder.

## 维护者速读

- 改了什么:某个名字(如 email_template `welcome`)的所有持有包都被停用、而某个语言成员(如 `fr-FR`)只存在于
App 定制配对包(`APP.custom`)的存储行里时,不带 `?package=` 的裸读(`GET
/meta/TYPE/NAME?member=`、`/layers`、执行读)现在答
404(停用持有者的“已隐藏”条目),以前会把那行配对定制返回出来。
- 为什么改:停用包的内容不应再被服务(专题红线 1,ADR-0150 D3);带 `?package=APP.custom` 的精确读早已答
404,裸读却还漏出这一行。裸读以前只在“什么都没读到”时才判断持有者是否全部停用,读到配对行就直接返回了。
- 风险与回滚:收紧(narrowing,BREAKING,metadata-protocol patch,Metadata-protocol:
none——作者能写的东西没有变),第一方 0 处。重新启用持有者、同一配对另有启用的持有者、持有者自己的行、无包行、精确读,答案都不变。回滚
= revert 本 PR。
- 先看:`packages/metadata-protocol/src/protocol-meta-item-face.ts` 的
`isHoldersPairRow` 与 `readMetaItemFace` 里 `withheldHolder` 的三元判断(风险
hunk:裸读分支新增的判定);`packages/objectql/src/package-scoped-exact-qualifier.test.ts`
末尾的 `[objectstack-ai#32814]` 组;`packages/rest/src/meta-disabled-package-doors.test.ts`
末尾的 `[objectstack-ai#32814]` 组。
- 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run
--maxWorkers=2 src/package-scoped-exact-qualifier.test.ts -t 32814`,预期
12 个全部通过:两种保存顺序 × 是否水合 × 模块/App 自身作持有者,裸读都答 404;重新启用后与两持有者 CONTROL
仍返回配对行。
- 需要你做的:无,席位落地。

## What changes

`readMetaItemFace` (`@objectstack/metadata-protocol`, the body behind
`getMetaItem` and `getMetaItemForExecution`) judges whether every
package holding the name is disabled (`disabledOnlyHolderOf`, objectstack-ai#32183)
only when the read reached nothing, or, on an exact read, when it
reached a row not stored under the named package (epic ruling R4-B). On
the read naming no package, a row it did reach was returned unjudged.
For a bundled type such as `email_template`, the member a customization
pair adds (an App pair's `fr-FR` row beside a module's shipped `en-US`)
is reached that way, so with the module disabled the bare read served
the pair's row, while `?package=APP.custom` at the same member already
answered the withheld item (ruling R4-C, `disabledExactAddressHolder`).

Now, on the read naming no package, a row stamped with a customization
pair (`pairsOf`) of a package holding the name (`isHoldersPairRow`) is
judged the same way: when every holder is disabled, the answer is the
holder's withheld item, the answer the same read gives with no row
stored. A pair row is bound over the holders it is a pair of and is
never a holder of its own (objectstack-ai#32354 contract review N2, objectstack-ai#32408), so it is
withheld with them.

| state (member `fr-FR` stored only under `APP.custom`) | door, naming
no package | FROM `main` e540baf | TO this head | arm |
|:--|:--|:--|:--|:--|
| the only holder (a module of the App, or the App itself) disabled; row
saved before or after the disable; hydrated or not | plain read
`?member=fr-FR` | 200, the pair's row | 404 `RESOURCE_NOT_FOUND`
(protocol: no item, `packageId` = the holder) | narrowing |
| the same | `/layers?member=fr-FR` (`RestServer`) | 200, the pair's row
as the effective layer | 404 `RESOURCE_NOT_FOUND` | narrowing |
| the same | execution face (`getMetaItemForExecution`) | the pair's row
| no item | narrowing |
| the holder enabled again | all of the above | the pair's row | the
pair's row | none (CONTROL) |
| two modules of the App hold the name, one disabled, either
registration order | plain read | the pair's row | the pair's row | none
(CONTROL) |
| both modules disabled | plain read | 404 | 404 | none |
| no row stored, holder disabled | plain read | 404 | 404 | none
(CONTROL) |
| a package-less row, a row of a package outside the App, the holder's
own row | plain read | as before | as before | none (not judged here,
measured) |

The other doors of the same name were measured but are outside this
card: the list reads (`getMetaItems`, `getMetaItemsForExecution`) still
list the pair's row while every holder is disabled
(`protocol-meta-list-reads.ts`, an E1 hot file this order may not edit;
see Acceptance notes).

## Tests

- `packages/objectql/src/package-scoped-exact-qualifier.test.ts`, new
top-level `describe` `[objectstack-ai#32814]` at the end of the file (no overlap with
the `[objectstack-ai#32561]` block objectstack-ai#33251 edits): 8 negative pins (module of the App /
the App itself × row before / after the disable × hydrated or not)
asserting no item, `packageId` = the holder, no byte of the pair's row,
and no item on the execution face, each followed by a re-enable CONTROL;
2 pins that the answer with the pair's row stored equals the answer with
none (the envelope's `version` left out, see Acceptance notes); 2
CONTROLs (two modules of the App, both registration orders: one enabled
serves the pair's row, both disabled withhold it).
- `packages/rest/src/meta-disabled-package-doors.test.ts`, new top-level
`describe` `[objectstack-ai#32814]` at the end: the plain read and `/layers` at the
member answer 404 `RESOURCE_NOT_FOUND` in both save orders, then the
pair's row once re-enabled; CONTROL: no row stored answers the same 404.

## Acceptance notes

- **Metadata-protocol: none, by measurement.** The card expected
`narrowed`. Nothing an author can write is refused, re-shaped or changes
meaning: the pair row is still accepted on save and served again on
re-enable. Only what a read serves while every holder is disabled moves,
the same classification objectstack-ai#33130 (the served-set sibling) declared. The
narrowing is carried by `Clause-②: no (narrowing)`, the BREAKING banner
and the registered semantic entry.
- **Not moved on purpose: a package-less row.** With the only holder
disabled, a package-less `fr-FR` row is still served by the bare read
(measured on `main` and on this head). `servedRowHolderOf` documents
that a name with a package-less row is "judged as before" (a
customization of no one holder); whether it is the disabled holder's
customization is not ruled, so it is reported, not guessed.
- **List reads.** `getMetaItems` / `getMetaItemsForExecution` with no
package list the pair's row while every holder is disabled (measured on
`main` e540baf, both save orders). Reported for a separate card;
`protocol-meta-list-reads.ts` is a hot file for this order.
- **Envelope `version`.** The protocol's withheld envelope keeps the
`version` of what the read reached on every withheld arm (a disabled
holder's own stored row keeps its row's version, measured), so the
no-row equality pin compares everything else. No door serves it: both
REST doors answer 404.
- **`/published`** takes no member, and the bare read at the canonical
member was already withheld on `main`; not moved.

## Verification

Premise, on `origin/main` e540baf (a probe over the same fixtures, not
committed): with the only holder disabled, the bare read at `fr-FR`
served the pair's row in all four save/hydration orders, for a module of
the App and for the App itself; with no row stored it answered the
holder's withheld item. Every other probed state (holder enabled, two
holders, a package outside the App, a package-less row, the holder's own
row) answered the same on this head as on `main`.

<details><summary>Pins and ablation (one mutation: the bare-read arm of
the new judgment replaced with a constant false)</summary>

- Fix head 51b589e, `pnpm --filter @objectstack/objectql exec vitest
run --maxWorkers=2 src/package-scoped-exact-qualifier.test.ts -t 32814`:
`Tests 12 passed`.
- Ablated (`scripts/ablation-replace.mjs`, then `pnpm --filter
@objectstack/metadata-protocol build`, `ablation-dist-preflight.mjs`
marker present in `dist/index.js` and `dist/index.cjs`): `Tests 10
failed | 2 passed` — the 8 withheld pins and the 2 no-row equality pins
red, the 2 two-module CONTROLs green.
- Restored (blob == HEAD, `git diff HEAD` empty, rebuilt, preflight
`--absent` and whole-tree clean): `Tests 12 passed`.
- REST, `pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2
src/meta-disabled-package-doors.test.ts`: `Tests 44 passed (44)`.
Ablated: `-t 32814` `Tests 2 failed | 1 passed` (both save orders red,
the no-row CONTROL green). Restored: `Tests 3 passed`.

</details>

<details><summary>Local gates and type checks (head 28c3513, after
merging origin/main 199e362)</summary>

- `pnpm --filter @objectstack/metadata-protocol typecheck`,
`@objectstack/objectql typecheck`, `@objectstack/rest typecheck`:
`VERDICT command-exit 0` each.
- `node scripts/pm/dispatch-gates.mjs --commands` (86 families) run
locally, reconciled with `--ran`: `86 derived, 84 run, 2 NOT-MEASURED, 0
UNRUN`. The two exit 3 (prerequisite: a full workspace build):
`check:dual-build-cjs-loads`, `check:type-check-debt`. Every other
family exit 0.
- NOT MEASURED locally, reason: the shared verify lock was held for 88+
minutes by another session's full affected-set test run while this was
written: `@objectstack/spec` typecheck (queue-timeout), the full
`@objectstack/metadata-protocol`, `@objectstack/objectql`,
`@objectstack/rest` suites on the merged head, `pnpm lint`. CI runs them
on this PR.

</details>

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

https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…package's customization pair or a dependent's added bundle member carries for it (ADR-0150 D3) (objectstack-ai#33405)

<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D75mRNRrsy6GfiJD9q7La4j)_

Fixes objectstack-ai#32354

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — `skills/**` and `content/docs/**` teach that a
disabled module is hidden
(`content/docs/deployment/marketplace-handbook.mdx`) and never teach a
list serving a disabled package's customization or a dependent's
addition to its bundle, so no taught sentence moves.

> **BREAKING** (ADR-0087 `not-required (no-migration-prescription)`):
while a package is disabled, the metadata lists no longer serve the rows
its customization pair stores for its names, nor a dependent's added
bundle member of them. Area-lease pilot objectstack-ai#33059, area E1. The list-door
remainder of this card: PR objectstack-ai#33130 (merged) did the bare, exact and
layered reads.

## 维护者速读

-
改了什么:某个包停用后,元数据列表不再列出它的定制包(`包名.custom`)为它的名字存的行,也不再列出依赖它的包给它的邮件模板追加的语言版本。涉及:不指名包的列表及其执行列表、指名停用包的列表、指名其定制包的列表。不指名包的发信读的就是这个执行列表,所以也不再发出这两类内容。
- 为什么改:专题 ADR-0150 D3「停用的包不持有任何名字」。按名读取早已对这些地址答
404,列表却还按注册和保存顺序列出它们;停用一个包应在每个读门上都消失(epic note 6820147040)。
-
风险与回滚:只在有包被停用时生效,没有包停用时所有列表与之前完全相同;依赖包自己的地址(`?package=DEP`)仍列出它追加的语言。过渡期内从依赖包本身发信(读不指名列表)在基础包停用时找不到该语言,等
objectstack-ai#32670 让发信按在用持有者判定后恢复。回滚即 revert 本 PR,不改任何存储数据。
- 先看:`packages/metadata-protocol/src/protocol-meta-list-reads.ts` 的
`disabledHolderListing`(新增谓词,`'unscoped'` 分支里依赖包追加的判定)以及它在停用过滤处的调用。
- 两分钟验证:`pnpm --filter @objectstack/objectql exec vitest run
src/package-scoped-exact-qualifier.test.ts -t 32354`,预期 14 例全过。
- 需要你做的:无,席位落地

## What changes

One function, in `@objectstack/metadata-protocol`'s list read
(`readFlattenedMetaItems`), next to the existing disabled-package
filter, on the effective and execution faces only (the per-package
layer, which the package export reads, keeps a disabled package's items
as before):

- `disabledHolderListing(host, type)` answers whether an item the list
serves at a package is a disabled holder's. It is `undefined` (nothing
moves) for a type the registry does not read by package and while no
installed package is disabled.
- **A list scoped to a package** serves no name whose exact read at that
package is a disabled package's withheld item. The predicate is the
exact read's own, `disabledExactAddressHolder`
(`protocol-exact-qualifier.ts`, unchanged): the package is disabled, or
it is a customization pair whose every base holding the name is.
- **The list naming no package** leaves out an item whose own package's
address is withheld that way (a disabled holder's pair row), and, for a
bundle (`ITEM_KEY_DISCRIMINATORS`), an addition to a disabled holder's
bundle: the item's package holds the name only as an addition (the
registry's holders read as any other caller leave it out, read as itself
keep it) and every holder in its declared dependency closure is
disabled. Every holder is read with `includeDisabledPackages`, so a
disable never promotes an addition to a holder.

## Moved answers

Measured over a real `SchemaRegistry` and
`ObjectStackProtocolImplementation`, on `2b2e5b41` (FROM: objectstack-ai#33251's head,
`main` plus objectstack-ai#32606) and on this branch: A ships `welcome` in `en-US`;
A's pair `A.custom` stores a `fr-FR` row of it, or DEP (depends on A)
ships a `fr-FR` addition; with one holder, or beside B, an enabled
second holder of `welcome`. Both registration orders, the pair row
stored before and after the registrations. A disabled:

| read | FROM | TO |
|:--|:--|:--|
| `getMetaItems` / `getMetaItemsForExecution`, no package (`GET
/meta/email_template`) | the pair's `fr-FR` row, or DEP's `fr-FR`
(beside B's `en-US` with two holders) | neither (B's `en-US` only with
two holders, else nothing) |
| the same, `?package=A` | the pair's `fr-FR` row | `[]` |
| `?package=A.custom` | the pair's `fr-FR` row | not listed |
| a send naming no package, `fr-FR` (`createRegistryEmailTemplateLoader`
over the protocol) | the pair's row, or DEP's member | no template |
| a send from DEP, `fr-FR` | DEP's member | no template (declared; see
below) |

**Not moved.** With nothing disabled every list answers as on FROM
(CONTROL in every pin). `?package=DEP` keeps DEP's `fr-FR`, as
`?package=DEP&member=fr-FR` serves it. `?package=B` and B's items, the
pair's own item of a name A ships nothing of (CONTROL, both orders), the
per-package layer, and every by-name read answer as before. Re-enabling
A restores every list (asserted in every pin).

**Declared interim move.** A send from DEP itself resolves to the list
naming no package for this name (`bundleAddressOf` finds one holder), so
it no longer finds DEP's `fr-FR` while A is disabled. objectstack-ai#32670 (the send
judges the served holders, nested under this card and landing after it)
reads such a send at DEP's own address, which keeps the member.

## Red lines

1. **Resolution never loosened.** Only items leave lists, and only items
the by-name read of the same address already withholds. Nothing refused
or absent is now served.
2. **Ambiguity reported, never guessed.** The answer no longer depends
on registration or save order: every pin runs both orders and both save
orders, and reads twice after the first read hydrated the stored row.
3. **Independently releasable.** No stored row, key or export changes;
it moves nothing while no package is disabled, and re-enabling restores
every answer.

## Tests

- `packages/objectql/src/package-scoped-exact-qualifier.test.ts`,
top-level `[objectstack-ai#32354] the list doors serve nothing a disabled holder's
pair or dependent carries for it` (real registry and protocol,
`environmentId` unset so the list hydrates rows): 12 cases (four states
× both registration orders × both save orders for the pair row)
asserting seven lists with nothing disabled, A disabled (read twice),
and A re-enabled; plus 2 CONTROLs for the pair's own item.
- `packages/rest/src/meta-disabled-package-doors.test.ts`, `[objectstack-ai#32354]
RestServer: the list doors and the send naming no package beside a
disabled holder` (an environment-scoped protocol): `GET
/meta/email_template` unscoped and with `package=` A, A.custom, DEP
through the `RestServer` route, and the email loader's send with no
package and from DEP; 6 cases.

## Acceptance notes

- The bare by-name read is not this PR's: measured through the
`RestServer` route on this branch, with A the sole holder and disabled,
`GET /meta/email_template/welcome?member=fr-FR` (no package) answers 200
with the pair's `fr-FR` row, and 200 with DEP's `fr-FR` in the addition
state. With two holders (B enabled) it answers 404 in both states. That
path is `protocol-meta-item-face.ts`, held by objectstack-ai#32814's work, so it is
reported for a card, not changed here.
- Stacked on objectstack-ai#33251 while it was open; it has merged (`51ceb433`), and
this branch merged `origin/main` `87330e8959` once (no rebase). The diff
against `main` is this card's four files: the list read, two test files
and one changeset.
- The send door's own rule (a send returns only members of the resolved
holder, its pair, its dependents, or no package) stays objectstack-ai#32670's.

## Verification

Head `333edb0868` (this branch with `origin/main` `87330e8959` merged).

<details><summary>Pins and ablations</summary>

- objectql `src/package-scoped-exact-qualifier.test.ts -t 32354`: 14
passed. REST `src/meta-disabled-package-doors.test.ts`: 47 passed (the 6
new cases among them).
- Ablations (source changed with `scripts/ablation-replace.mjs`,
`@objectstack/metadata-protocol` rebuilt under the verify lock,
`ablation-dist-preflight` saw the marker in `dist/`, then restored: `git
diff HEAD` empty, rebuilt, marker `--absent` exit 0):
- A1, the exact-address arm off (`disabledExactAddressHolder` never
withholds): objectql 8 failed (every pair-row case: one and two holders,
both orders, both save orders), 6 passed (the four addition cases and
both CONTROLs); REST 4 failed (every pair-row case), 43 passed.
- A2, the addition arm off (`bases.every(disabled)` never true):
objectql 4 failed (every addition case), 10 passed; REST 2 failed (both
addition cases), 45 passed.
- A first A2 attempt never reached the lock (queue-timeout), so the
preflight refused (marker absent from `dist/`) and its green run was
discarded; the rerun above is the leg.

</details>

<details><summary>Package tests, typecheck, lint</summary>

- `turbo run test --concurrency=2 --continue` over the affected set
against `main` (82 packages, `@objectstack/dogfood` left to its own
battery), under the verify lock: stopped on the area lead's order once
it held the lock too long, after 68 packages had finished, with 0 failed
test files. Among them `@objectstack/metadata-protocol` 339 files passed
(9 skipped), `@objectstack/objectql` 595, `@objectstack/rest` 410,
`@objectstack/runtime` 599, `@objectstack/cli` 637 (2 skipped),
`@objectstack/plugin-email` 53. The rest of the set (UI packages) is
CI's Test Core.
- `pnpm --filter` metadata-protocol, objectql, rest `run typecheck`:
exit 0 (VERDICT command-exit 0).
- `pnpm lint`: exit 0.
- NOT MEASURED locally: the full dogfood battery (owed by the
`(narrowing)` arm; not run, because the shared lock was the bottleneck
and the area lead asked for the narrowed pre-push set; the queue's
`Dogfood Regression Gate` runs it), and the derived gate families (CI's
`Lint & Repo Gates`).

</details>

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

https://claude.ai/code/session_016WV4cy1y7UNVbT2QAdmgdn

---------

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/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants