Repository navigation
fix(metadata-protocol): the bare layered read serves a member's declared override as effective - #34169
Conversation
… packages hold carries details.candidates (ADR-0150 D5) The REST /meta/:type/:name/layers catch now asks handleRouteError for the package-scoped candidates, as the plain read's catch does, so the plain read's refusal the door's owner step answers and the served-holders refusal of step 1c carry details.candidates on RestServer as on the dispatcher. The step-1c refusal of a name whose active rows two packages hold (the package-less writes' sentence, code and status, unchanged) now carries its holders by shape as a package-scoped refusal, so both transports answer them as details.candidates. The save and delete doors' answer does not move. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…name two served packages register, as the plain read does (ADR-0150 D3) getMetaItemLayered now asks the registry's package-scoped resolver for a type addressed by package, as getMetaItem does, before any layer is read: a name two or more served packages hold is refused naming each (PackageScopedNameRefusedError, 409 RESOURCE_CONFLICT), whatever the metadata service holds. Its code layer used to fall back to the artifact lookup's first composite, so the read in process, and the REST /layers door on a host with no engine wired, answered the holder that registered first. A name one holder holds keeps its layers; stored-row holders stay the door's step 1c. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…s as the plain read does Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… the layered ambiguity pins Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
The no-engine REST /layers answer (200 with the first holder, now 409 with the holders as candidates) and the in-process getMetaItemLayered answer (first holder, now PackageScopedNameRefusedError) are narrowings of what a caller was served, so the changeset carries the narrowing arm, the BREAKING banner with both moves and the ADR-0087 disposition. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…candidates and the registry judgment packagelessLayeredReadRefusal's docblock now says its refusal carries the holders as a package-scoped refusal, and that the in-process readers of getMetaItemLayered meet the registry's refusal of a name two packages register in code. Comment only; the emitted JS differs in comment lines alone. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…red override as effective, as the plain read does The layered read naming no package takes the address the plain read takes for a bundle member whose one shipper's declared override is stored (declaredMemberOverrideAddressOf, now exported from the item face), so `effective` is the override `?package=<shipper>` serves instead of the shipper's own member. The draft layer stays at the strict draft read's address, which that arm does not move. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…erride as effective Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…layered # Conflicts: # packages/objectql/src/package-scoped-exact-qualifier.test.ts
… two-holder refusal The changeset's BREAKING banner gains a third FROM/TO. A bare GET /meta/:type/:name/published on a REST host with no objectQLProvider went on to its published exit and now answers 409 without candidates. The getMetaItemLayered docblock names the PackageScopedNameRefusedError it throws for a name two packages register in code. Comment and prose only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… the shipper's address serves Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…e/area-E1-32849-layered
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e61207a8980d48a5fed59bfb5f85535f3b8c8092 && git checkout e61207a8980d48a5fed59bfb5f85535f3b8c8092
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2 c9112d293b89b5f17b89d3db970af4cf43cea4f9 && git checkout -B drift-repro dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2 && git merge --no-ff c9112d293b89b5f17b89d3db970af4cf43cea4f9
node scripts/docs-audit/affected-docs.mjs --json dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ Request: review · PR #34169 · area S4 (E1) · Part of #32849 · head f23319f (green, every check suite complete; declared final) Ordinary ACCEPT read per review-checklist.md. No contract face ( |
|
domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6 Review — PASSHead-sha: Scope: this PR's own four files only. The PR is stacked on #33885, so I diffed this head against
Own-diff patch-id: |
…layered # Conflicts: # .changeset/32622-layers-two-holders-candidates.md
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ 席位核对ACCEPT · area S4 (E1) · Head-sha:
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jTkZnXtRhuEiiyidvJ Landing (landing-operations B) · head
State change: ready + auto-merge (area authorising line). |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43787990906 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43788209763 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steedos · project thread
Part of #32849 (the bare layered read's
effectiveexit; the read naming no member, measured below, stays open on #32849)Clause-②: no
Metadata-protocol: none
#33885 has merged. This branch started from
claude/area-E1-32622. After #33885 merged,origin/mainwas merged in (c9112d29), so the diff is now this PR's own four files (+125/−7). The own-diff patch-idc0f3f1897e73032813735aa937738d8e0c8780a6is unchanged.维护者速读
.custompair 存了一行声明覆盖附加包 Z 自有成员fr-FR的邮件模板(overrides.package: Z)。fix(metadata-protocol): the bare member read serves an App pair's declared override of a bundle addition's own member (ADR-0150 D4) #33815 之后普通裸读已给出覆盖,但不带包的分层读?member=fr-FR&layers=true的effective仍是 Z 原版zeta fr-FR、overlay为空;现在它与?package=Z一致:code是 Z 原版,overlay和effective是覆盖,信封指向 Z。effective定义为「普通读会返回的内容」,声明了的覆盖应在每个给出 Z 该成员的出口被服务(ADR-0146 D8 第 2 项、ADR-0150 D4);Studio 编辑器读的正是这个出口。en-US、待发布草稿层均不变(已钉)。回滚即还原本 PR,存储数据不变。packages/metadata-protocol/src/protocol-meta-layered-reads.ts中declaredOverrideAt与draftPackageId两处。pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/package-scoped-exact-qualifier.test.ts -t 'the bare layered read serves',预期 6 条全绿。What changes
Own files (four):
packages/metadata-protocol/src/protocol-meta-layered-reads.ts,packages/metadata-protocol/src/protocol-meta-item-face.ts(oneexportkeyword and one docblock sentence, no behaviour),packages/objectql/src/package-scoped-exact-qualifier.test.ts,.changeset/32849-bare-layered-read-declared-override.md. Noprotocol.tsedit.getMetaItemLayered, naming no package and judged neither served nor refused byservedAddressJudgment, now asksdeclaredMemberOverrideAddressOf(the one predicate the plain read uses since #33815, exported from the item face for this). When it names the member's one enabled shipper Z, the read takes Z's address for its layers, as the plain read does, soeffectiveis the override?package=Zserves.The pending draft layer (
withDraft, the Studio door) is not moved: it stays at the address the strict draft read takes (strictDraftReadAddress), because the plain read's strict draft read is outside the arm too. Re-addressing it would have made the draft layernullwhere the strict draft read serves the pair's draft (measured: at?package=Zthe draft layer isnull).?member=fr-FR&layers=true, row declares Zzeta fr-FR, overlay null, effectivezeta fr-FRzeta fr-FR, overlaypair fr-FR, effectivepair fr-FR, envelope Z (=?package=Z)pair fr-FR draft?package=Z&member=fr-FR&layers=truepair fr-FR?member=en-US&layers=true(X's own)suitex en-USzeta fr-FR, overlay nullpackagelessLayeredReadRefusalNothing refused becomes served or the reverse; no authorable key or value moves.
Tests
New top-level describe in the shared real-
SchemaRegistryharnesspackages/objectql/src/package-scoped-exact-qualifier.test.ts:[#32849] the bare layered read serves the pair's declared override of an addition Z's own locale as effective, as ?package=Z does(6 tests):?package=Z's (effectivedeep-equals the?package=Zdocument), step 1c refuses nothing,effectiveequals the plain bare read, X'sen-USuntouched.pair fr-FR draft),?package=Zhas none.RESOURCE_CONFLICTnaming X and Z.BASE measured on
e516f353(the #33885 head) with a temporary probe in this harness before any edit: bare effectivezeta fr-FR, overlay null, in both orders;?package=Zeffectivepair fr-FR.Ablations (each through `scripts/ablation-replace.mjs`, metadata-protocol rebuilt, `ablation-dist-preflight` marker present in 2 dist files, auto-restore blob equals HEAD with `git diff HEAD` empty, rebuilt, marker absent from all 24 dist files)
-t 'the bare layered read serves')undefinedexpected [ 'zeta fr-FR', null, …(2) ] to deeply equal [ 'zeta fr-FR', 'pair fr-FR', …(2) ]; the draft pin,expected [ 'zeta fr-FR', 'pair fr-FR draft' ] to deeply equal [ 'pair fr-FR', 'pair fr-FR draft' ]isServedOverrideRowOf(row, shipper, installed)replaced bytrueexpected [ 'zeta fr-FR', 'pair fr-FR', …(2) ] to deeply equal [ 'zeta fr-FR', null, …(2) ]; the X-declared CONTROL,the read answered; a refusal was expecteddeclaredOverrideAt ?? request.packageId)expected [ 'pair fr-FR', null ] to deeply equal [ 'pair fr-FR', 'pair fr-FR draft' ]Acceptance notes
fr-FRtoo. The undeclared-row CONTROL is the one that catches an arm ignoring the declaration (A2).e516f353with the same probe (X shipsfr-FR, Z shipsen-US, the pair row declares Z foren-US): the read naming NO member serves Z'szeta en-US, both the plain bare read and the bare layered read, while the bare layered member read?member=en-UStakes the override after this change./publishedcalls the layered read with no member (meta-item-history-routes.ts), so it reads that same exit; not measured at the door. The helper answersundefinedwhen no member is named; that exit lives in the item face first and is left to the card.SchemaRegistry, stored rows and hydrated rows (the fix(metadata-protocol): the bare member read serves an App pair's declared override of a bundle addition's own member (ADR-0150 D4) #33815 footing), not through the HTTP save door; the door's own step 1c is pinned at the protocol.Verification
Head
f23319f9(merges oforigin/claude/area-E1-32622e57e7c05and oforigin/mainup to27c2f1ea, thenorigin/mainagain just before opening; the derived gate union ran on24ecb579, the head before that last merge). Every command ran underscripts/pm/os-verify-lock.sh.96a0a52e:@objectstack/metadata-protocoltypecheck 0, test22902 passed | 43 skipped;@objectstack/objectqltypecheck 0, test13252 passed;@objectstack/resttypecheck 0, test8763 passed | 355 skipped;@objectstack/runtimetypecheck 0, test12414 passed | 19 skipped.24ecb579(incoming main touched metadata-protocol, none of rest/runtime): rebuilt, metadata-protocol typecheck 0, test22926 passed | 45 skipped; the harness file321 passed.git merge-tree --write-tree --name-onlyof24ecb579against every open PR sharing a file, and main: fix(metadata-protocol,rest,runtime)!: a name only disabled packages hold answers 404 at_env, and its package-less customization is withheld (ADR-0150 D3, D4) #33995 (7b65fff0, item face and harness) clean, fix(metadata-protocol): revertCommit reports a restored non-object item whose registry write-through faults #33979 (999b09d9, protocol.ts) clean, fix(metadata-protocol, rest)!: the layered read of a name two packages hold refuses as the plain read does, naming the holders as details.candidates (ADR-0150 D3/D5) #33885 (e57e7c05) clean,origin/main27c2f1eaclean. (Before the first main merge the harness conflicted with main's metadata-protocol: measure whether a dependency-closure bundle addition is left out of the scoped list while the exact read admits it (#33131 N1) #33817 block; resolved by keeping both describes.)node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon24ecb579: 75 derived families, every one exit 0 (exit codes captured before any pipe).check:dual-build-cjs-loadsfirst answered exit 3 PREREQUISITE NOT MET (no dist for 41 packages) and answered 0 after a whole-treepnpm turbo run build --concurrency=2under the lock;check:type-check-debtwas interrupted mid-run once and re-run to exit 0.--ran: 75 derived, 75 run, 0 NOT-MEASURED, 0 UNRUN. Body gates on this body:check-changeset-no-major0,check-adr-0087-registration0 (with the PR payload too),check-closing-keyword-parity0 (GITHUB_EVENT_PATH),check-partof-closing-keyword0 (PR_BODY).pnpm lint: exit 0 on24ecb579.origin/main(14 commits; it touchedprotocol-meta-item-reads.tsand objectqlregistry.ts, not this diff), onf23319f9: closure rebuilt, metadata-protocol typecheck 0 and test22926 passed | 45 skipped, objectql typecheck 0, the harness file321 passed; ratchet families re-run there:check:type-check-debt0,check:type-check-coverage0,check:nul-bytes0.origin/maindfb8ed35→ headc9112d29. The one add/add conflict was fix(metadata-protocol, rest)!: the layered read of a name two packages hold refuses as the plain read does, naming the holders as details.candidates (ADR-0150 D3/D5) #33885's own changeset, resolved to main's landed text; none of this PR's files conflicted. Closure rebuilt, metadata-protocol typecheck 0, objectql typecheck 0, harness321 passed, all under the verify lock.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ