Repository navigation
fix(metadata-protocol)!: the read naming no bundle member addresses the canonical member alone, as ?member=en-US and /published do - #34910
Conversation
…ical member alone, as ?member=en-US and /published do Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…s one request on every by-name door Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…s ?member=en-US answers it Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…re read Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…r; type the new pin's query Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…ndle-member-selector
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 175 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 6c4433fb7326eeeac64a6c521c38834bbf4bc422 && git checkout 6c4433fb7326eeeac64a6c521c38834bbf4bc422
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1950f075460dfcda4dd7602c5c71e21385f37ed8 e90a02e17bd8440eb2fd23020c757837afb867c9 && git checkout -B drift-repro 1950f075460dfcda4dd7602c5c71e21385f37ed8 && git merge --no-ff e90a02e17bd8440eb2fd23020c757837afb867c9
node scripts/docs-audit/affected-docs.mjs --json 1950f075460dfcda4dd7602c5c71e21385f37ed8
|
…mantic narrowing; changeset takes the (narrowing) arm Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…r of a no-canonical bundle as naming en-US does; entry and changeset name the ?package= address Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…canonical member alone Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 席位核对 · L1 ACCEPT · Head-sha: 90b5cde · 2026-11-17T19:26ZCard #34682, revised claim 6953428610 (reason 6953406266), dev reports 6953360228 and 6958479021. The seat read the diff itself.
Contract-review-handoff: l2-review#3 — CONTRACT_REVIEW_TIER not taken in this seat; seat 4 routes contract reviews to the seated L2 seat by mailbox (2026-11-17T19:26Z) · head 90b5cde |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head 90b5cde · 2026-11-17T20:10Z The request to l2-review#3 (mailbox #34476) has waited about an hour with no answer, so this lane reviews at tier itself (contract-review.md (b)). The record is written by an isolated reviewer sub-agent at CONTRACT_REVIEW_TIER. |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head 90b5cde · 2026-11-17T22:30Z Renewed: the 20:1x claim lapsed (2 hours, no record) while the reviewer sub-agent was stopped by a usage limit. It resumes now at CONTRACT_REVIEW_TIER. |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C L2 round on head 90b5cde: S1 and S2 sent back, seat ruling on S1 · 2026-11-17T22:56ZThe seat's at-tier reviewer sub-agent read this head and found no must-fix and two should-fix. Its record is NOT posted as the record of this head: its transcript holds a synthetic usage-limit turn, which S1 (should-fix): the holder's first member still reaches both reads at an exact address. Seat ruling on S1: exit (a).
S2 (should-fix): the ledger entry names less than the diff moves. Pending changeset correction. Nits sent along: N1 (the layered comment on the removed lookup), N2 (one preserved-half leg per name at the doors), N3 (the Contract-review-hold: session_012MmDsS4GoHCgYwA2uv3n3C · head 90b5cde · S1/S2 fix in progress · until the fixed head is pushed |
…other package's item only with the holder's canonical member; ledger names every moved arrangement; pending #34441 note corrected Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…ndle-member-selector # Conflicts: # .changeset/34441-shipped-base-canonical-member-one-answer.md
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 席位核对 · L1 delta ACCEPT · Head-sha: ce8d6e7 · 2026-11-19T02:54ZThe dev's delta report is 6998192069 on #34682. It covers the L2 round on 538121f (S1 exit (a), S2, N1, N2) and the merge of origin/main e8a78c4 (18.6.0).
|
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head ce8d6e7 · 2026-11-19T02:55Z A fresh isolated reviewer sub-agent at CONTRACT_REVIEW_TIER renders the record. |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract reviewServed-tier: Read for this record: card #34682 (body and all 8 comments), PR #34910 (body, file list, comments, the net diff Governing text: Earlier L2 round (S1, S2, N1, N2), state on this head:
① Derived judgments
② Semver levelRight. ③ Boundary flags
④ Design judgment
Changeset. The banner, the three arrangements, the restart sentence and the migration line agree with the code. One sentence overstates: S3. S3 (should-fix) — the declaration says "served exactly as before" for two answers the diff moves. Read from the tree, not run.
S4 (should-fix) — the registry's first-member answer still reaches a door at an address that holds nothing:
Nits:
No must-fix. S3 and S4 are open on this head and each earns a delta review of its fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 席位裁决 · S3 / S4 of record 6998434502 · Head-sha: ce8d6e7 · 2026-11-19T03:06Z
A delta contract review on the fixed head is owed. |
…ndle-member-selector
…m at the addressed member; pins for the stored-canonical /layers code layer, the non-holder address and a disabled sole holder Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…nd the non-holder address move Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012MmDsS4GoHCgYwA2uv3n3C
…ndle-member-selector
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C 席位核对 · L1 delta ACCEPT · Head-sha: e90a02e · 2026-11-19T07:09ZThe dev's delta report is 7002321737 on #34682. It closes S3 and S4 (exit a) of record 6998434502, per the seat's ruling 6998444934, adds N6, and merges origin/main c809deb.
|
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract-review-claim: session_012MmDsS4GoHCgYwA2uv3n3C · head e90a02e · 2026-11-19T07:10Z A fresh isolated reviewer sub-agent at CONTRACT_REVIEW_TIER renders the delta record. |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Contract reviewServed-tier: Delta round on record 6998434502 (head State of the earlier findings on this head:
① Derived judgments
② Semver levelRight, and unchanged: ③ Boundary flags
④ Design judgment
Changeset. The three added bullets agree with the code and with what is pinned. "A bundle that ships or stores its canonical member keeps its status and served body, and so does any named member" is true of the tree. The two 18.6.0 quotations are unchanged. No must-fix, no should-fix. Nits:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#4 · os-lizheng · session_012MmDsS4GoHCgYwA2uv3n3C Landing · Head-sha: e90a02e · 2026-11-19T07:16Z
State: ready + auto-merge now (L1 delta ACCEPT above). #34682 closes on merge. Follow-up: the |
Fixes #34682
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no page under
skills/**orcontent/docs/**teaches the read naming no member of a bundle that has no canonical member;content/docs/referencesprints the selector sentence this change now follows, and the ADR-0146 paragraph ofskills/objectstack-platform/SKILL.mdnames members only at a base or a package address. No taught sentence moves.维护者速读
en-US;如果这个模板根本没有en-US,普通读、/layers、执行读都答 404,和?member=en-US、/published一致。en-US是同一个请求”,但旧代码对没有en-US的模板会悄悄返回另一种语言(如fr-FR),同一请求两种写法得到 200 和 404;只存了fr-FR行的模板甚至在重启前后答案不同。en-US成员的邮件模板,不带?member=读”这一种请求,由 200 变 404;邮件发送走列表读,不受影响;Studio 列表按行带?member=打开,不受影响。回滚即 revert 本 PR。packages/metadata-protocol/src/protocol-meta-item-reads.ts(成员判断那一行)、packages/metadata-protocol/src/protocol-meta-layered-reads.ts(删掉的无成员回退)、packages/spec/src/migrations/entries/semantic/18.bundle-without-canonical-member-bare-read-absent.ts(升级说明)。pnpm --filter @objectstack/runtime exec vitest run src/domains/meta-bundle-member-one-request.test.ts,预期 1 个测试通过。What changes
The governing text is the member selector's declared contract,
BUNDLE_MEMBER_SELECTOR_DESCRIPTIONinpackages/spec/src/api/protocol.zod.ts, which every by-name request'smembercarries:The two pairs the card names are both this one request. Measured on
origin/maind947a93, throughHttpDispatcher.dispatchon a booted kernel, for a bundle that ships or stores noen-USmember:mainfr-FRonly: plain readfr-FRmemberRESOURCE_NOT_FOUND?member=en-USRESOURCE_NOT_FOUNDRESOURCE_NOT_FOUND/publishedRESOURCE_NOT_FOUNDRESOURCE_NOT_FOUND/layers//layers?member=en-USfr-FR/ 404en-USfr-FRitem / null?package=Anaming no member (also with a dependent'sen-USrow stored)fr-FRRESOURCE_NOT_FOUND?package=Anaming no member, A shipsfr-FRonly and a dependent or a disabled holder shipsen-US(and the bare read re-addressed to A beside a disabled holder)fr-FRRESOURCE_NOT_FOUNDfr-FR:/layersnaming no member,codefr-FRbodynull(status andeffectiveunchanged)fr-FR,?package=Xnaming no member, X a non-holder, after a restartRESOURCE_CONFLICTRESOURCE_NOT_FOUNDfr-FRrow only: plain readfr-FRafter it?member=en-US,/published,/layersThe producer of the stray member is the registry's bare-name read (
SchemaRegistry.getItemwith no member), which still answers a bundle with no canonical member with its first member. That is the registry's own documented contract for its other callers, so it is left alone. The by-name reads now ask for the member this request addresses:readMetaItem(the plain read and the execution read): the code layers' answer is kept only when it is the addressed member, the canonical one when none was named. Before this PR that check ran only for a named member.getMetaItemLayered: the same check on the registry answer, and the member-less artifact lookup added for the metadata-protocol: a shipped base holding only another bundle member answers the canonical member differently before and after a restart #34441 cell 1 case is removed. For a type with no members, that lookup repeated the artifact lookup above it with the same arguments, so removing it changes nothing for such a type.registryMemberServedAt(the base-address step ofreadMetaItem): naming no member, it falls back to the base's own canonical member only. Before, it fell back to the base's first shipped member. CI on 3cb177c found this path (Test Core,packages/objectql/src/protocol-bundle-member-base-address.test.ts):?package=BASEnaming no member, and the read naming no package once a dependent storesen-US, still served the base'sfr-FR.exactQualifierItem(protocol-exact-qualifier.ts, the exact-address step both reads end in): when the item in hand is another package's, it is replaced only by the admitted holder's item at the addressed member, the canonical one when none is named. Before, it asked the holder with the raw selector, which answered its first member, so?package=Xnaming no member served X'sfr-FRwhenever another package (a dependent, or a disabled holder the bare read re-addresses past) shippeden-US. The L2 review on 538121f found this path (S1).admitExactQualifier: the environment's item that decides whether?package=Xis refused is asked at the addressed member, the canonical one when none is named. Before, a name the environment stores only infr-FRwas refused409(not-held-by-qualifier, naming the environment) at any non-holder address once a restart hydrated the row, while?member=en-USanswered404(L2 S4).resolveBundleMemberSelector's docblock states the canonical-member rule. The orphan-report comment in the layered read is updated to match.packages/spec/src/migrations/entries/semantic/18.bundle-without-canonical-member-bare-read-absent.ts, registers the narrowing. It follows the shape of18.shipped-base-dependent-canonical-row-not-published.ts. The registry is generated from it (gen:migration-registry, gitignored output), and the changeset carriesadr-0087: registered bundle-without-canonical-member-bare-read-absentwith a BREAKING banner. No key, stored shape or export moves.Also moved (L2 S3 b): a type with no members,
/layers?package=Xbeside a disabled sole holder:codegoes from the disabled holder's artifact tonull.Unchanged in status and served body: a bundle that ships or stores
en-US, and every named member. The moves listed above are the exceptions./publishedis unchanged. It takes no selector and already read the canonical member.Narrowing: this narrows what a caller receives. One served answer becomes 404: the read naming no member of a bundle with no canonical member. The seat ruled the
(narrowing)arm (L1 rework round 1; revised claim 6953428610), following PR #34644. So the title takes!, and the changeset takes the BREAKING banner and the ADR-0087 registration above. The entry names three arrangements: no layer holds the canonical member; a dependent stores the canonical member over a base that ships only another; and?package=Xwhere X ships no canonical member but another package does, including the disabled-holder re-address. The sibling entry18.shipped-base-dependent-canonical-row-not-publishednow points at it. The 18.6.0 release notes stated two answers this change reverses; this PR's changeset quotes both (/layersnaming no member no longer answers A'sfr-FRwith 200; the plain read is no longer "not moved"). A contract-review-tier L2 is owed for the narrowing and thepackages/spec/src/**path.Tests
packages/runtime/src/domains/meta-bundle-member-one-request.test.tsboots a kernel on a file database and reads before and after a restart.?member=en-USequals the read naming no member, including the whole served envelope, on the plain read,/layersand the execution read. Covered for a shippedfr-FR-only bundle and a storedfr-FR-only row (both 404/null), and for a shippeden-USbundle and a storeden-USrow (both served)./publishedand the plain read give the same answer for those no-canonical bundles (404) and for a stored canonical row (200, same document)./published?member=en-USis a 400VALIDATION_ERROR.dashboard):?member=en-USis refused 400VALIDATION_ERRORon the plain read,/layersand the execution read. A stored row is served alike by the plain read and/published.statusandcode.meta-disabled-holder-served-stack.test.tscell 1: the CONTROL (no D row) moves to the canonical answer (plain read,/layers404, execution read null). The comment above S1 that said no shipped CONTROL could be pinned is corrected.protocol.lookup-artifact-item-call-sites.test.ts: the removedgetMetaItemLayeredsite leaves the ledger (26 to 25 sites).packages/objectql/src/protocol-bundle-member-base-address.test.ts: the no-canonical case now pins 404 on the read naming no member, at the base's address and naming no package, the same as?member=en-US. The base'sfr-FR, named, is still the base's, and the dependent'sen-USis still served at its own address. The new runtime pin also compares?package=Awith and without?member=en-USfor the shipped bundles.packages/objectql/src/package-scoped-exact-qualifier.test.ts: the dependent-addition leg flips (naming no member at the dependent is absent, as namingen-USis), and a new describe pins the base-address mirror at?package=Aand through the re-address, on the plain and the layered read. The runtime pin gains a preserved?member=fr-FRleg per name.mixed_fr_mail(the/layerscode layer, before and after a restart) and the?package=Anon-holder leg forrow_fr_mail. objectqlpackage-scoped-exact-qualifier.test.ts: the N6 leg (two unrelated holders in different non-canonical members) and the disabled-sole-holderdoc/layersleg._envaddress admission (admitEnvironmentQualifier) and the caller-arm resolver still ask with the raw selector; no observable split was measured.Acceptance notes
/publishedanswers 404 for an item that only code ships, bundled or not. The plain read serves 200 for the same item. The new test pins this fordashboardandemail_templatealike, and the existingSPECIMENSpin inmeta-disabled-holder-served-stack.test.tsalready holds it for a code-only agent and dashboard. So/publishedand the plain read give one answer wherever a published document exists or none does, which is the scope of the card's pair 1. This is an observation and was not filed.registry-items.ts) keeps answering a bundle with no canonical member with its first member, for its other callers. No by-name door takes that answer now. Changing the registry would widen the change to@objectstack/objectql, and nothing here asks for it.protocol.bundle-member-selector.test.ts, is a pure unit test with no doors, and the/publisheddoor lives inpackages/runtime.Verification
L2 round 2, final head e90a02e (origin/main c809deb merged), under the shared verify lock: metadata-protocol 357 passed | 9 skipped files, 23207 passed | 45 skipped tests, typecheck exit 0; objectql exact-qualifier and base-address files 468 tests passed, check:test-typecheck OK; runtime 6 meta-* files 608 passed, typecheck OK; cli guidance 3 passed; check-adr-0087-registration exit 0;
dispatch-gates --ran96 accounted for, 0 NOT-MEASURED; overlap-check clean. Ablation 5 (S4):?package=Anaming no member threw 409 against null aten-USunder the mutation; restored clean. Dogfood battery on e90a02e: command exit 0, 482 passed | 3 skipped files, 4092 passed | 68 skipped tests.Round 1, on head ce8d6e7 (after merging
origin/maine8a78c4, 18.6.0; the released34441changeset stays deleted), under the shared verify lock:Dogfood battery on ce8d6e7 (the `(narrowing)` arm)
Suites, typechecks, gates on ce8d6e7
Ablation 4 (S1): exactQualifierItem reverted to the raw selector
Earlier rounds, superseded by the readings above:
Rework round 1, on head 90b5cde:
Dogfood battery, once on the final head (the `(narrowing)` arm)
An earlier battery on 3cb177c gave the same counts. That head is superseded.
Suites, typechecks, ADR-0087 entry, cli guidance
Ablation 3: the base-address canonical check removed
Derived gate families on 90b5cde, 95 of 95
Round 0, on head af88513 (after merging
origin/mainfc5913e). Later commits add the spec entry, the changeset, the base-address fix and pins, so these are superseded by the readings above:metadata-protocol suite and typecheck; runtime pins and typecheck
Ablation 1: the item-read check reverted to its main form (member, not wantedMember)
Ablation 2: the layered check reverted to its main form
Round 0 derived gate families (dispatch-gates --commands), 71 of 71
Not run locally (CI owns it):
test:repo,pnpm lint, the fullcheck:*set.Generated by Claude Code