Skip to content

fix(metadata-protocol)!: an exact ?package= read answers its own package's item or a 409 naming the holders, and a bare doc read beside two holders serves the environment's own entry - #34347

Merged
os-zhuang merged 21 commits into
mainfrom
claude/area-E1b-34247
Nov 17, 2026
Merged

os-zhuang merged 21 commits into
mainfrom
claude/area-E1b-34247

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #34247
Part of #34248 (delivered here; the area closes it on merge, as with PR #34324)

Contract-review-handoff: review#1 — CONTRACT_REVIEW_TIER routed by maintainer order (2026-11-17T12:31Z) · head 1572520

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill teaches a moved answer: skills/** teaches ?package= reads of a holder or of its pair (objectstack-platform SKILL.md, "Customizing an installed package"), which do not move, and never the read of a package that holds no item of the name or the bare doc read beside a package-less entry

BREAKING. Served answers become refusals. ?package=X of a name X ships no item of, while another package ships it, now answers 409 RESOURCE_CONFLICT, reason not-held-by-qualifier, with details.candidates naming the holders (ruling 6917064203 on #34398), on the plain read and /layers. A name nothing holds stays 404. The read gate answers before the not-held-by-qualifier refusal names any holder: a caller the ADR-0046 §6.7 docs audience refuses a doc gets the gate's 401/403, and a member the list view audience refuses a view gets the gate's 403. The bare doc read of a name two enabled packages ship, beside the environment's own package-less entry, now serves that entry instead of the package registered last. ADR-0087 disposition: not-required (no-migration-prescription) (in the changeset). No schema key, stored row or registry slot changes.

维护者速读

  • 改了什么:带 ?package=X 读取文档、视图等 8 类元数据时,如果 X 没有这个名字而别的包有,返回 409 not-held-by-qualifier 并列出持有包,不再返回别的包的内容;谁都没有的名字仍是 404。/layers?package=X 同样处理。文档和视图先过各自的门禁:文档受众门禁拒绝的成员和匿名访问者拿到门禁自己的 403/401,视图受众门禁(requiredPermissions)拒绝的成员拿到 403,门禁放行的才拿到 409。两个包都发布同名文档、环境里又有一条无包条目时,不带包名的读取(普通读取、/layers、/published)返回这条环境条目。Console 文档页和扁平永久链接(跨文档引用都改写到它)在应用包不持有该文档时改为按名字读,跨包引用照常显示,或显示持有包的受众拒绝。
  • 为什么改:ADR-0150 D3/D5 规定精确地址只回答该持有者;裁决 6917064203(decision: an exact ?package=X read of a doc X does not hold, while another package does: 404 (card #34247) or the 409 refusal naming the holders (ADR-0150 D5)? #34398)定为 409 并列出持有者;裁决 6893582352 规定环境自己的条目优先。原来包名写错的作者会悄悄拿到别的包的内容。
  • 风险与回滚:200→409 是收窄(BREAKING),只影响"包名不持有、别的包持有"的地址;环境条目那一行是 200→200 换内容。持有者自己的地址、配对包地址、无包条目、object、已覆盖类型、position/capability 都不变。回滚即 revert 本 PR。
  • 先看:packages/metadata-protocol/src/protocol-meta-item-reads.ts(registryAnswerAtAddress 的拒绝分支与安全目录排除)、packages/rest/src/meta-item-read-gate.ts(gateHolderNamingRefusal,门禁先于拒绝)、ui/apps/console/src/pages/DocsSlug.tsx 与 doc-address.ts(按名字回退)。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-holder-refusal-audience-gate.test.ts src/domains/meta-disabled-holder-artifact-door.test.ts,预期 58 通过、4 跳过(两个文件合计);文档门禁拒绝的成员得 403、匿名得 401,视图门禁拒绝的成员得 403,放行者得 409 并列出持有包,[#34247] 组在四种装配下非持有包地址返回 409,[#34248] 各条在两种注册顺序下三个入口一致。
  • 需要你做的:无,席位落地。

What changes

#34247 (exact address, X holds no item of the name). PR #34241 made step 2 of readMetaItem decline the metadata service's copy of another package at ?package=X, for the types the exact qualifier (ADR-0150 D5) does not judge. When X held no item of the name, step 3 still read getItem, whose last tier is the first composite across packages, so the address answered another package's item.

Now the code layers' answer at such an address goes through registryAnswerAtAddress. An item stamped with another installed package (the same test as serviceCopyOfAnotherPackage: not X, not a customization pair either way) is replaced by the registry's package slot for X. When X has no slot:

  • If other packages hold the name, the read is refused 409 RESOURCE_CONFLICT, reason not-held-by-qualifier, details.candidates naming each holder (notHeldByQualifierRefusal in protocol-exact-qualifier.ts). This is the refusal the covered types already answer, and it uses existing vocabulary only (ruling 6917064203 on decision: an exact ?package=X read of a doc X does not hold, while another package does: 404 (card #34247) or the 409 refusal naming the holders (ADR-0150 D5)? #34398).
  • If nothing holds the name, the answer is nothing, and the door answers its own 404.
  • A qualifier that names no installed package (the Console's app-name segment) gets the same answer (ruling item 3).
  • The read gate answers before the not-held-by-qualifier refusal names any holder (gateHolderNamingRefusal in @objectstack/rest, asked by both transports' plain read and /layers read). For a doc, the ADR-0046 §6.7 docs gate judges a doc by its name, so it needs no holder's item: a caller it refuses gets the gate's 403 PERMISSION_DENIED, or 401 UNAUTHENTICATED when anonymous. For a view, the list view audience gate (filterViewForUser) judges a view by its body, so every holder the refusal names is read at its own address (a package at its ?package=, the environment's own item at the address naming no package) and judged: a member it refuses for any one of them gets the gate's 403 PERMISSION_DENIED. A holder that cannot be read fails closed: both transports' plain read and /layers answer the same 500 INTERNAL_ERROR, which names no holder. A caller the gate admits gets the 409.

The family is the eight types PR #34241 enumerated: doc, view, translation, field, seed, datasource, external_catalog, object_extension. The security catalog types position and capability are excluded in code (isSecurityCatalogType, ADR-0131 D3). The registry keeps one package holder of such a name, so their code layers' answer is unchanged. A CONTROL pin for each type proves it.

Aligned in the same direction.

  • getMetaItemLayered (/layers?package=X): the code layer declines the service's copy of another package and reads X's own item. At an address X holds none of, it gives the same refusal as the plain read (ruling item 2).
  • readCodeLayerForCarryForward (the save's credential carry-forward, read when no stored row is at the address the save writes): the same decline and the same registry answer, but it keeps "carries none". It does not refuse (ruling item 2 leaves this choice open). The reason: the carry-forward is no read answer. The save door already judges the address on its own path, and a refusal here would turn a save that main accepted into a 409 for a reason the save door never names. Of the family only datasource has a credential redactor, so only a datasource save moves. It carried the credential of the package the service kept (or of the first registered holder). It now carries X's own, or none when X ships no datasource of the name.

#34248 (bare doc read beside a package-less entry). Take two enabled holders and a package-less entry in the registry's bare slot. The registry exempts the bare doc read from PR #34036's refusal and serves the entry, and so does MetadataFacade.get. The protocol's plain read, /layers and /published served the metadata service's copy instead, which is the holder registered last. Now the environment's entry answers first (ruling 6893582352) on every bare door:

Review M1: the hydrated row as the hydrator lays it. hydrateOverlayIntoRegistry stamps a package-less stored row _provenance: 'org' with no _packageId (stateTenantAuthorship). Such an entry is tenant-authored, so it is never the code layer (#21059). At 989f4ad7 the plain read served the row while /layers answered effective: null, because the sealed doc's package-less row was declined. Both /published doors served 200 with an empty body. Now the layered read lets the environment's row answer when the bare slot holds that row's tenant-authored entry and no code layer (environmentRowAnswers: the entry is tenant-authored and code is null). /layers reports code: null with the row as overlay and effective, and both /published doors serve the row, consistent with the plain read. The same row hydrated after the artifacts registered (loadMetaFromDb, and boot hydration after the artifact door) wears the first registered holder's envelope (mergeArtifactProtection grafts it: _packageId = first holder, _provenance: 'package'). No package-less entry exists then, and the bare doors stay refused 409 naming both, as on main. Both orders are pinned on the composed rig.

Review S4: a stamp-less entry beside a different stored row. environmentRowAnswers first held for any bare-doc environment entry beside a package-less stored row. With a stamp-less runtime registration (a code layer) and a different package-less stored row, /layers effective and both /published doors moved to the row while the plain read kept the entry. It now holds only where the entry is the row's tenant-authored copy (code is null). In the mixed state all three doors serve the registration, with the row as /layers overlay, as at 989f4ad7. Pinned in both orders.

Review S1: one holder beside a stamp-less entry. I took the minimal option: pin the cell and declare it. The bare doors serve the holder's doc while the registry's resolveItem serves the entry. The test is [measured, unresolved] and it runs for each one-holder composition. The cell stays out of scope because card #34248's acceptance names two or more holders, and ruling 6893582352 was argued beside two holders. Moving the one-holder cell would change a 200 answer that no card or ruling names. It is declared in the changeset under "Not moved". Follow-up card: #34452 (needs a ruling first).

Review M2 and ruling item 6: the Console doc doors. Two Console doors read a doc under the route's package segment, with X as ADR-0048 prefer-local context: the reader (DocPage, /apps/X/docs/BOOK/NAME) and the flat permalink (DocsSlug, /apps/X/docs/NAME, which every cross-reference is rewritten to by doc-links.ts). The permalink's single-item read (objectui#10188) tells a name the member may not read from an absent one. When either read answers the not-held-by-qualifier 409 (X not among the candidates) or a 404, the door now reads the name again by name. Both share one rule, readsByNameAfter in ui/apps/console/src/pages/doc-address.ts. The result:

A 404 stays the page's "not found" (not turned into a refusal). Opening the single named holder directly is left as the optional follow-up the ruling names.

FROM → TO

Read FROM (main) TO
GET /meta/doc/NAME?package=X, X ships no doc of NAME (installed, or not installed), another package does; dispatcher and REST, both registration orders 200, a holder's doc 409 RESOURCE_CONFLICT, details.candidates = the holders (ruling 6917064203 on #34398)
same address for view, translation, field, seed, datasource, external_catalog, object_extension 200, a holder's item 409 not-held-by-qualifier naming the holders
?package=X of a name no package holds, any of the eight types 404 unchanged
GET /meta/doc/NAME?package=X and /layers, X ships none, another does, caller refused by the ADR-0046 §6.7 docs audience; both transports 403 PERMISSION_DENIED (401 UNAUTHENTICATED anonymous): the gate on the holder's doc unchanged: the gate answers before the 409
GET /meta/view/NAME?package=X and /layers, X ships none, another does, a member the list view audience (requiredPermissions) refuses; both transports 403 PERMISSION_DENIED: the gate on the holder's view unchanged: the gate answers before the 409
GET /meta/doc/NAME/layers?package=X, X ships none, another does 200, a holder's code and effective 409, as the plain read
GET /meta/doc/NAME/layers?package=X, X and Y ship NAME, Y registered last 200, Y's code and effective 200, X's
bare GET /meta/doc/NAME, /layers, /published, two enabled holders plus a stamp-less bare entry; both transports, both orders 200, the holder registered last 200, the entry (/layers: code and effective)
same, with a different package-less stored row beside the stamp-less entry 200, the holder registered last 200, the entry on all three doors (/layers: the entry as code and effective, the row as overlay)
same, with a package-less stored row hydrated before the artifacts (_provenance: 'org' entry) see "Hydration readings" below 200, the row (/layers: code: null, the row as overlay and effective)
same row hydrated after the artifacts (envelope grafted from the first holder) 409 naming both unchanged
same name, two holders, no package-less entry 409 naming both unchanged
save naming X of a datasource with no stored row at X (credential carry-forward) carries another holder's credential carries X's own credential, or none (never refuses)
Console reader /apps/X/docs/BOOK/NAME, X ships none of NAME the doc one holder ships (or one of two by registration order) the doc one holder ships; two holders show the candidate list
Console flat permalink /apps/X/docs/NAME (cross-references), X ships none of NAME, a doc the member may not read the holder's audience refusal unchanged (read again by name after the 409)
a holder's own address; a pair's address of its base's item; an item bound to no package; object; position and capability; one holder beside a stamp-less entry (measured, unresolved); any other read naming no package as on main unchanged
the covered types (action, hook, job, sharing_rule, queue, assignment_rule) at a third package 409 not-held-by-qualifier unchanged

Hydration readings (dispatch task 1; review M1)

Measured with the real hydrator on the composed artifact rig (MetadataPlugin artifact door plus AppPlugin, SQL driver, a stored package-less sys_metadata row of a doc two packages ship), on the dispatcher and on RestServer, in both registration orders. Scratch test files were not committed.

  • Hydrated after the artifacts (boot hydration, and loadMetaFromDb after the artifact door): the entry carries the first holder's _packageId with _provenance: 'package'. The bare doors answer 409 naming both. The answer is identical at origin/main c934631723 and at head 72dc8ca25e, and it stays so at this head (CONTROL pin). The save door answers 403 NOT_OVERRIDABLE, so no new row is stored.

  • Hydrated before the artifacts (the hydrator's own _provenance: 'org' entry): measured at the merge base 6cc3f97465 (main as this PR forks it) and at this head:

    Door main 6cc3f97465 head de137717ef
    bare plain read, both transports 200, the holder registered last (beta doc with alpha first, alpha doc with beta first) 200, environment doc (the row)
    bare /layers 200, code = the holder registered last, overlay = the row, effective = the holder registered last 200, code: null, overlay and effective = the row
    bare /published, both doors 200, the holder registered last 200, the row
    each holder's own address its own doc unchanged

    At 989f4ad7 (this PR before the M1 fix) the same state answered: plain read the row; /layers code: null, overlay the row, effective: null; both /published doors 200 with an empty body. That is the inconsistency M1 named. The head answers are the green pin [#34248] a hydrated package-less row (hydrated before the artifacts) in the rig; the M1 ablation turns it red in both orders.

  • The exact address of a non-holder at main 6cc3f97465, same rig: ?package=com.qa.gamma (installed, ships none) and ?package=com.qa.unknown (not installed) answer 200 with a holder's doc. The plain read gives the first composite (alpha doc with alpha first, beta doc with beta first). /layers gives the service's copy (the holder registered last) as code and effective. With beta alone shipping, ?package=com.qa.alpha answers 200 beta doc. At this head every one of these answers 409 RESOURCE_CONFLICT with details.candidates = the holders.

Ruling item 5: the read gate answers first

Rule: the read gate answers before the not-held-by-qualifier refusal names any holder. At ?package=X of a doc X holds none of, on the plain read and /layers of both transports:

  • a member the docs audience refuses gets the gate's 403 PERMISSION_DENIED, with no candidates;
  • an anonymous caller gets the gate's 401 UNAUTHENTICATED, with no candidates;
  • CONTROL: a caller the gate admits gets the 409 RESOURCE_CONFLICT naming the holders;
  • CONTROL: a doc of the org audience gets the 409 for a member.

The same order holds for a view at the same address (the list view audience, requiredPermissions): a member it refuses gets the gate's 403 PERMISSION_DENIED, with no candidates; CONTROL: a member it admits gets the 409 naming the holders; CONTROL: at the holder's own address the two members get the gate's 403 and the view. Every holder the refusal names is judged, the environment's own item included: a view only the environment holds answers a member its audience refuses the gate's 403 (CONTROL: an admitted member gets the 409), and a view a package and the environment both hold answers the gate's 403 to a member the package's view admits and the environment's refuses (CONTROL: a member both admit gets the 409).

Pinned in packages/runtime/src/domains/meta-holder-refusal-audience-gate.test.ts. Its transports and the gate are real; the protocol is a double that throws the protocol's own refusal shape.

Tests

  • packages/objectql/src/package-scoped-exact-qualifier.test.ts, the metadata-protocol: an exact ?package=X read of a doc (and the other types the registry does not read by package) that X does not ship answers another package's item instead of 404 #34247 describe (between the metadata-protocol: an exact read of a doc (?package=A) of a name two packages ship can answer the other package's doc, because the metadata service keeps a doc by name alone #34040 and metadata-protocol: a disabled doc holder registered last turns the bare doc read, /layers and /published into 404 although an enabled package ships the name #34041 describes; fix(metadata-protocol,rest,runtime): beside a disabled package, the bare read, /layers and /published serve the one enabled holder of a doc, view or other type the registry does not read by package #34354's describe is kept intact after the merge). It contains:
    • the family pin;
    • per type, in both registration orders, the 409 naming both holders at ?package= of a third installed package and of com.acme.unknown, on the plain read and getMetaItemLayered, whichever holder's copy the service keeps;
    • one holder: another package's address is refused naming that holder, and the holder reads its body;
    • CONTROLs: a name no package holds is the read's own miss; a pair's read of its base's item and a package-less entry are served; every covered type is still the exact qualifier's 409; position and capability keep the holder's item (S2);
    • the datasource carry-forward pin with the real redactor.
  • packages/runtime/src/domains/meta-disabled-holder-artifact-door.test.ts (composed artifact rig, both transports):
  • packages/runtime/src/domains/meta-holder-refusal-audience-gate.test.ts (both transports, the real gate): the gate's 403 for a refused member and 401 for an anonymous caller at ?package= of a package holding none, on the plain read and /layers; CONTROLs: an admitted caller and an org-audience doc get the 409 naming the holders. A second describe pins the view gate at the same address on both transports: a member the view audience refuses gets the gate's 403 with no candidates; CONTROLs: a member it admits gets the 409, and the holder's own address answers the two members the gate's 403 and the view. A third describe pins every holder the refusal names, the environment's own item included: a view only the environment holds, and one a package and the environment both hold, each with a refused member's 403 and an admitted member's 409 CONTROL. A fourth describe pins a holder the view gate cannot read: on both transports' plain read and /layers, a refused and an admitted member alike get 500 INTERNAL_ERROR with no candidates; CONTROL: the same address with a holder that reads is the gate's answer (409). The environment-holder pins are driven by candidates the protocol double supplies; for a view, the refusal this PR adds names package holders only, so those pins hold the helper's rule rather than a row today's protocol produces (accepted, no contract effect).
  • ui/apps/console/src/pages/docs-portal.test.tsx, "objectstack#34247 — a doc the route's package ships none of is read by name":
    • a cross-reference renders the other package's doc (reads ['com.example.alpha', undefined]);
    • the app-name segment renders its holder's doc;
    • two holders show the candidate list;
    • CONTROL: the own package is read only at its address;
    • CONTROL: a name nobody ships is not found;
    • the flat permalink (DocsSlug), under WORLD.exact: a cross-package link to a doc the member may not read renders the holder's refusal (reads ['com.example.alpha', undefined]), and so does the app-name segment of a multi-app package (reads ['alpha_suite', undefined]); CONTROL: under the holder's own package it reads that address only.

Verification

Final head 1572520e (taken over by seat repo:objectstack#2 from area o1-D). Since 0bc781b5 (L1-c2 delta ACCEPT 6943247306, contract review PASS 6943305789) two commits: bc6c83bd merges main at 6091b645, and 1572520e fixes the one semantic conflict that merge carries.

Why the merge queue ejected 0bc781b5 twice (anchor #34772): main's #34644 (ddab49de) added a bare-name fallback to getMetaItemLayered (no member named and code still null ⇒ lookupArtifactItem). The fallback skipped the bare action read's judged answer but not a bare doc read's environment entry (#34248, this PR). So a doc name two enabled packages hold, beside a hydrated package-less row, read the holder registered first as its code and effective layer on /layers, where the plain read serves the row. The two [#34248] a hydrated package-less row (hydrated before the artifacts) pins in meta-disabled-holder-artifact-door.test.ts (both registration orders) went red, deterministically. 1572520e makes the fallback skip a bare doc read's environment entry as well; the pins and their assertions are unchanged. Measured on the merged tree before the fix: exactly those two pins red (2 failed, 43 passed); after it: green.

Readings at 1572520e, on a shared box, each heavy run as its own verify-lock call (exit codes captured before any pipe):

  • pnpm install --frozen-lockfile 0 (the lockfile moved with main). Closure build (turbo run build --filter '@objectstack/dogfood^...'): exit 0.
  • pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-holder-refusal-audience-gate.test.ts src/domains/meta-disabled-holder-artifact-door.test.ts: exit 0, Tests 58 passed, 4 skipped.
  • typecheck (NODE_OPTIONS=--max-old-space-size=8192; at the default heap the runtime test-layer check dies of a V8 heap OOM with no diagnostics): @objectstack/metadata-protocol 0, @objectstack/rest 0, @objectstack/runtime 0.
  • pnpm exec vitest run, every file: packages/metadata-protocol exit 0, Test Files 348 passed, 9 skipped; Tests 23056 passed, 45 skipped. packages/runtime exit 0, Test Files 616 passed; Tests 12732 passed, 23 skipped. packages/rest exit 0, Test Files 420 passed; Tests 8877 passed, 373 skipped. packages/objectql exit 0, Test Files 607 passed; Tests 13661 passed.
  • dispatch-gates --commands from origin/main (6091b645), at 1572520e: the same 79 as before, 79 run to exit 0. --ran: "79 derived famil(ies) accounted for — 79 run, 0 NOT-MEASURED".
  • Dogfood battery (title carries !): pnpm --filter @objectstack/dogfood test, no shard, no path: exit 0; Test Files 478 passed, 3 skipped (481); Tests 4055 passed, 68 skipped (4123). No failure.

Readings from earlier heads, kept for the record:

Builds, typechecks and package suites (exit codes captured before any pipe)
  • At 24a7664b, after pnpm install --frozen-lockfile: closure build (--filter '@objectstack/dogfood^...'): VERDICT command-exit 0.
  • At 24a7664b, CI: TypeScript Type Check success, Test Core and Test Core (1/8)–(8/8) success, Type Check UI success, Test UI success. Package suites were not rerun locally this round; the merge brought only main.
  • At c47c71b4 (code unchanged since; 2496009b changed one changeset line): typecheck metadata-protocol 0, objectql 0, runtime 0, rest 0. @objectstack/objectql test 0 (Test Files 603 passed; Tests 13520 passed). @objectstack/runtime test 0 (Test Files 609 passed; Tests 11222 passed, 23 skipped). @objectstack/metadata-protocol test 0 (Test Files 346 passed, 9 skipped; Tests 22968 passed, 45 skipped). @objectstack/rest test 0 (Test Files 413 passed; Tests 8552 passed, 350 skipped). @object-ui/console test 0 (Test Files 322 passed; Tests 3321 passed). eslint --no-inline-config on the changed files: 0 errors. check-platform-checklist --changed-from origin/main: OK, 36 anchors judged, 0 lost.
Derived gate families (dispatch-gates --commands, from the merge base, at 24a7664)
  • 79 derived, 78 run to exit 0, check:nul-bytes, check:doc-authoring, check:issue-citations and check:test-source-alias among them. check:type-check-debt first answered exit 3 while the battery held the verify lock; rerun, it exited 0 ("0 raw tsc error(s) total, none above its recorded number").
  • check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: no packages/qa/scenarios/dist; it needs a full build). NOT MEASURED locally; CI's Lint & Repo Gates is success.
  • dispatch-gates --ran (with recorded exit codes): "79 derived famil(ies) accounted for — 78 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)".
  • Earlier rounds: CI at 8c929a55 was red on check:test-source-alias. The new audience-gate pin reached import('@objectstack/metadata') through the dispatcher without a module-top load. Fixed at c47c71b4 by a module-top import '@objectstack/metadata' in that test.
Ablations (one per guard; each restore proved: blob = HEAD, `git diff HEAD` empty, a protocol marker absent from dist after the final rebuild)

Not rerun: no guard changed after c47c71b4. At 8c929a55 and c47c71b4:

Guard ablated Suite Result
G gateHolderNamingRefusal (returns nothing) runtime meta-holder-refusal-audience-gate.test.ts 2 failed: the refused member's 403 and the anonymous 401 (the two CONTROLs stay green)
DS DocsSlug by-name fallback Console docs-portal.test.tsx 2 failed: the flat permalink's cross-package link and app-name segment
S4 code === null && isTenantAuthored(...) in environmentRowAnswers runtime rig 2 failed: the mixed-state pin, both orders
  • G and DS are in source the suites alias, so no build: the marker was counted in the file (injected 1).
  • S4 was rebuilt, and its marker was proved present in @objectstack/metadata-protocol's dist before the run was read.
  • The first S4 pass is void and was rerun. Its marker ('ABL_S4_MARKER' !== '') was constant-folded out of dist, and the preflight refused it. The rerun used a property-read marker that survives the build: the preflight exited 0, and after the restore --absent exited 0 with a clean tree.

From de137717 (guards unchanged since), with the same restore proofs:

Guard ablated objectql exact-qualifier file runtime rig Console docs-portal
M1 environmentRowAnswers (layered read) — 2 failed: the hydrated-before-artifacts pin, both orders —
S2 isSecurityCatalogType exclusion 2 failed: the position and capability CONTROLs — —
R1 refuse in readMetaItem 26 failed 4 failed: the non-holder 409 pin, four compositions —
R2 refuse in the layered read 16 failed 4 failed: the non-holder 409 pin, four compositions —
UI the by-name fallback in DocPage — — 2 failed: the cross-reference and the app-name segment

At f45378bb, with the same restore proof (git checkout HEAD --, clean git status --porcelain, marker count 0): the view arm of gateHolderNamingRefusal ablated (the early return kept doc alone) turns 1 pin red in meta-holder-refusal-audience-gate.test.ts, the refused member's view 403 (1 failed, 6 passed); the source is aliased, so no build.

At b6f7c36f, same restore proof: the environment's item skipped by the view arm turns exactly 2 pins red, the environment-only and the co-held refused member's 403 (2 failed, 9 passed); the two CONTROLs stay green.

At 0bc781b5 (same code as its pre-reword commit), same restore proof: the dispatcher plain read's fault answer removed (the gate's rejection left to the handler's outer catch) turns exactly 1 pin red, the unreadable-holder fault pin (1 failed, 12 passed); its CONTROL stays green.

Dogfood battery (title carries `!`)
  • Head 24a7664b12, after the closure build above: pnpm --filter @objectstack/dogfood test under its own lock call, no shard, no path.
  • os-verify-lock: VERDICT command-exit 0 · held the lock 2265s (37m45s).
  • Test Files 478 passed, 3 skipped (481); Tests 4030 passed, 44 skipped (4074). No failure.
  • Superseded: at c47c71b4, VERDICT command-exit 0; Test Files 474 passed, 3 skipped (477); Tests 4006 passed, 42 skipped (4048).

CI at 1572520e was still running when this body was written; at 0bc781b5 it was 43 check-runs success, 10 skipped, none failed.

Taken over from repo:objectstack#1 · os-project-manager · session_01FEkQ5obaLbqgzRUR9xXfft.

repo:objectstack#2 · os-steve · session_01ADHkmNkZcGApqG4pHHMLeY

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmNkZcGApqG4pHHMLeY

…own item or none, for every type the exact qualifier does not judge

A read naming package X of a doc, view, translation, field, seed,
datasource, external_catalog or object_extension that X ships no item of
fell through to the registry's getItem, whose last tier is the first
composite across packages, so it answered another package's item. The
code layers' answer at such an address is now X's own item (the
registry's package slot) or nothing (404).

The layered read's code layer takes the same rule: it declines the
metadata service's copy of another package and reads X's own item or
none. So does the credential carry-forward's code-layer read, so a save
naming X never carries another package's datasource credential.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUcj2x2Wr4UErwBi12
…he layers decline is refused naming both holders

The registry exempts a doc name two enabled packages ship from the bare
read's refusal when its bare slot holds a package-less entry (a
stamp-less registration, or a hydrated or saved row). A doc a package
ships is sealed, so the layers decline that row and never serve the
entry: they served the metadata service's copy, the holder registered
last, on the plain read, the layered read and the published read. Such
an entry is no servable environment item, so the read is refused 409
naming both holders, as without it. An entry the layers would serve
keeps the exemption.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUcj2x2Wr4UErwBi12
… environment's own package-less entry, never the holder registered last

The previous commit refused such an entry 409, reading it as a row the layers
decline. The ruling 6893582352 control in objectql's e8 readers pins the
opposite: the environment's own entry answers first, and the registry and the
facade serve it. The layers serve it too, once the metadata service's package
copy no longer answers first. So the plain read, /layers and both /published
doors now serve that entry; without one the read stays refused 409.

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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata-protocol, @objectstack/rest, @objectstack/runtime, touching 19 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/rest/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 3bbda33b78fff2681db9c09732347bc62ffc4cc6.

⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

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

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

Which tree this was computed on

This run read content/docs from 6ffbd5c3de8c9c2ed5f12e78701cfff8269255bb — the merge of head 1572520e9f465c673a5d9567cdac1e27a91efcf7 into base 3bbda33b78fff2681db9c09732347bc62ffc4cc6, which is what actions/checkout gives a pull_request run. Not the PR head.

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

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 6ffbd5c3de8c9c2ed5f12e78701cfff8269255bb && git checkout 6ffbd5c3de8c9c2ed5f12e78701cfff8269255bb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3bbda33b78fff2681db9c09732347bc62ffc4cc6 1572520e9f465c673a5d9567cdac1e27a91efcf7 && git checkout -B drift-repro 3bbda33b78fff2681db9c09732347bc62ffc4cc6 && git merge --no-ff 1572520e9f465c673a5d9567cdac1e27a91efcf7

node scripts/docs-audit/affected-docs.mjs --json 3bbda33b78fff2681db9c09732347bc62ffc4cc6

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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUcj2x2Wr4UErwBi12

Hand-off (maintainer order: push and hand off; area S5 clocks out)

State. The code is complete. At this head:

Not measured. The dogfood battery at this head. It was stopped by the hand-off order. It is owed, because the title carries ! and the arm is no (narrowing). CI check-runs have not been read.

Owed reviews.

  • L2 CONTRACT_REVIEW_TIER (a declared narrowing).
  • L1 from review-c.
  • Both on a green final head, after the battery.

Open for the next seat.

Keeps both top-level describes in package-scoped-exact-qualifier.test.ts:
this branch's exact-read pins and main's disabled-holder bare-read pins.

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

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head 989f4ad · 2026-11-16T12:30Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 989f4ad7bff2f0a210e9eddb89a01505edd3c048
Local-runs: none
Scope: NON-PROSE-PATHS + CITED-FILES — every non-prose path of the diff; cited and read on the head: objectql registry.ts, protocol-exact-qualifier.ts, protocol-registry-hydration.ts, protocol-lock-state.ts, Console DocPage.tsx, doc-links.ts, appRoute.ts, ADR-0150 D1/D3/D5, ruling 6893582352.
Security-touching: yes

No earlier record on this PR. Cards #34247 and #34248 read with every comment. All findings are from reading the head tree; nothing was run.

① Derived judgments

  • Exact ?package=X read, X holds no item: 200 another holder's → 404, on readMetaItem, /layers and the carry-forward. The gate is exactAddress === undefined / !isPackageScopedType(type), the same set in all three places. Right as the card asks it, wrong in its declared extent (S2) and against its first consumer (M2).
  • /layers?package=X, X and Y both ship: Y's code → X's. Right.
  • Datasource carry-forward reads X's own code layer or none. Right; pinned with the real redactor.
  • Bare doc read, two enabled holders beside a stamp-less runtime entry: holder registered last → the entry, on all three doors. Right, as ruling 6893582352 and readBareDoc serve it.
  • Same, beside a hydrated package-less row: wrong as pinned (M1).
  • refuseAmbiguousBareDocRead now returns a value (void → unknown); two callers, both in the diff. Right.

② Semver level

Three patch bumps with a ! title and a BREAKING banner; Check Changeset is green and the ADR-0087 marker is present. Clause-②: no (narrowing) opens its line in both the PR body and the changeset. The level matches what the diff publishes. The changeset text itself is wrong in two places: M1 (the hydrated-row row) and S2 (the type list).

③ Boundary flags

④ Design judgment

M1 (must-fix) — the hydrated-row state the PR pins is not the state the hydrator writes, and in the hydrator's state the three bare doors disagree.

  • hydrateOverlayIntoRegistry registers stateTenantAuthorship(withRowBinding(data, …)), so every package-less entry it lays carries _provenance: 'org'. The rig fixture (meta-disabled-holder-artifact-door.test.ts, the [#34248] a hydrated package-less row pin) registers _packageId: 'sys_metadata' with no _provenance.
  • With the marker, getMetaItemLayered declines the service copy (bareDocServiceCopyDisplacesEntry), then runtimeOnly drops the entry, so code is null. A shipped doc is sealed, so declinesStoredRow makes effective the code layer: null, where main answered an item.
  • Both /published doors take layered.effective when an overlay exists and the row is declined, so they serve null; the new swap needs publishedCode != null and never runs.
  • The plain read still serves the row. That is metadata-protocol: a bare doc read of a name two packages ship, beside a package-less registry entry or hydrated row, serves the holder registered last #34248 acceptance 1 failed for "entry or row" on two of three doors.
  • The changeset already says "(with code: null)" for a stored row while the pin asserts code: 'environment doc'; one of them is false.
  • Reachable without a reboot: a package-less doc saved while no package ships the name, then two packages that ship it are installed. When artifacts load before hydration the entry is grafted with the first holder's _packageId instead, and the read is the 409.
  • Required: lay the fixture as the hydrator does, make /layers and both /published doors serve the row (or refuse) in that state, pin it in both orders, and correct the changeset row.

M2 (must-fix) — the first consumer of ?package= on a doc is not carried. ui/apps/console/src/pages/DocPage.tsx sends packageId: appName as ADR-0048 prefer-local context, not as an exact address.

  • A cross-reference from app X's doc to another package's doc is rewritten to /apps/X/docs/NAME (doc-links.ts rewrites every ./NAME.md under the app's base), so it reads ?package=X and now shows "not found". ADR-0046 designs those links.
  • appAddressSegment uses the app NAME as the segment when a package ships more than one app. That segment is no installed package id, so every doc under such an app now answers 404.
  • ADR-0150 D5 and its G1 row give this address "a refusal that names the holders", which DocPage already renders as a candidate list; the covered types answer 409 not-held-by-qualifier for the same address shape (the PR's own COVERED control). A 404 is a dead end.
  • Required: carry the Console read in this PR or a landed predecessor, or answer the D5 refusal. The 404-versus-refusal choice is the card's sentence against the ADR's and goes to the maintainer; declare the Console path in the changeset either way.

S1 (should-fix) — the entry answers first only at two or more enabled holders (refuseAmbiguousBareDocRead, >= 2). With one holder beside a stamp-less entry, readBareDoc and MetadataFacade.get serve the entry and the bare doors keep the holder's service copy: the registry/door split this PR cites as the defect. Adding a second holder flips the door's answer. The one-holder CONTROL has no entry beside it. Pin that cell and declare it, or serve the entry there too.

S2 (should-fix) — the code moves position and capability as well: one holder A, ?package=B now answers 404 (registryAnswerAtAddress runs for every type outside PACKAGE_SCOPED_TYPES except object). The changeset and the FROM→TO table name eight types, and OUTSIDE_PINNED filters these two out with no CONTROL. Declare and pin them, or exclude them in code.

S3 (should-fix) — run the dogfood battery on the final head before landing (card #34247 acceptance 2).

Implemented-by: claude/area-E1b-34247
Reviewed-by: session_01FEkQ5mjfxPu5HKjUtuveBR

VERDICT: FAIL

…/layers and /published beside two holders; the Console reads a doc by name where the app's package ships none

- getMetaItemLayered: beside two enabled holders, the package-less stored row
  behind the bare doc read's environment entry is the effective layer, never
  declined as a sealed doc's row; the hydrator's entry stays no code layer.
- registryAnswerAtAddress leaves the security catalog types (position,
  capability) to the code layers' answer.
- DocPage: a 404 at the route's package falls back to the read by name.
- Pins: the hydrator's entry shape and a real loadMetaFromDb hydration on the
  composed rig, the one-holder stamp-less cell, position/capability, and the
  Console fallback.

Claude-Session: https://claude.ai/code/session_01FEkQ5obaLbqgzRUR9xXfft
Co-authored-by: Claude <noreply@anthropic.com>
…ne of is refused naming the holders (ruling 6917064203 on #34398)

- registryAnswerAtAddress refuses 409 not-held-by-qualifier naming each
  package that holds the name, on the plain read and /layers; a name nothing
  holds stays 404; the credential carry-forward still carries none.
- DocPage falls back to the read by name on that 409 (candidates not naming
  the route's package) as on a 404.
- Pins flipped from 404 to the 409, both transports; nothing-holds controls.

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

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head de13771 · 2026-11-16T15:30Z

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44062172772 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (3/8) — 失败步骤: Run this shard's tests

    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'alpha registered firs
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"alpha doc","content":"# alpha","_packageId":"com.qa.alpha","_packageVersion":"1.0.0","
    @objectstack/runtime:test:  FAIL   local  src/domains/meta-disabled-holder-artifact-door.test.ts > [#34040 item 4] the bare doc doors beside two enabled holders of one doc name, 'beta registered first
      ↳ 失败原因: @objectstack/runtime:test: AssertionError: {"type":"doc","name":"shared_doc","code":{"name":"shared_doc","label":"beta doc","content":"# beta","_packageId":"com.qa.beta","_packageVersion":"1.0.0","_pr
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 17 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

… layered read's code layer empty after the bare-name fallback

The bare-name artifact fallback of the layered read now skips a bare doc
read that answers the environment's own entry, as it skips the bare action
read's judged answer: the artifact lookup's first composite is the holder
registered first, which that read never serves.

Claude-Session: https://claude.ai/code/session_01ADHkmNkZcGApqG4pHHMLeY
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44080349559 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (2/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {"object":"sys_activity","records":[],"total":0,"hasMore":false}: expected 200 to be 403 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 2 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 25 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmNkZcGApqG4pHHMLeY

Final head declared · PR #34347 (Fixes #34247, Part of #34248) · seat repo:objectstack#2, area o2-I · 2026-11-17T12:35Z
Head-sha: 1572520e9f465c673a5d9567cdac1e27a91efcf7

  • Answers the merge-queue ejections of 0bc781b5 (anchor Queue-flake anchor: src/domains/meta-disabled-holder-artifact-door.test.ts #34772, root cause 6946857767): a deterministic semantic conflict with main's fix(metadata-protocol)!: a dependent's bundle-member row moves no bare read across a restart, and a row-held base's own member is the base's #34644, not a flake. bc6c83bd merges main at 6091b645; 1572520e makes the layered read's new bare-name fallback skip a bare doc read's environment entry, as it skips the bare action read's judged answer. Without it, /layers read the holder registered first as code/effective beside a hydrated package-less row.
  • The two [#34248] hydrated-row pins (both registration orders) were red on the merged tree before the fix (2 failed, 43 passed) and are green after it; no pin or assertion changed.
  • At this head: closure build 0; typecheck metadata-protocol, rest, runtime 0; every file of metadata-protocol 23056/45, runtime 12732/23, rest 8877/373, objectql 13661 passed; 79 of 79 derived gate families exit 0; dogfood battery exit 0, Tests 4055 passed, 68 skipped, no failure.
  • CI at this head: running when this was written.
  • Contract review routed to review#1 by maintainer order (hand-off line in the body). The PR body is updated to this head. The PR stays draft.
  • Owed: the L1 delta (L1-c2, from ACCEPT 6943247306 at 0bc781b5) and the contract-review delta (review#1, from PASS 6943305789 at 0bc781b5) on this head; then the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR

席位核对

L1 delta review · ACCEPT · Head-sha: 1572520e9f465c673a5d9567cdac1e27a91efcf7 · delta 0bc781b5..1572520e · cards #34247 (Fixes) and #34248 (Part of) · read 2026-11-17T13:03Z

Prior records at 0bc781b5: L1 ACCEPT 6943247306, L2 PASS 6943305789, seat record 6943346172. Hand-off 6948291061, final-head comment 6948195566, root cause 6946857767 on #34772. Read in git and on GitHub at this head.

Delta read

The delta is two first-parent commits: bc6c83bd (merge of main at 6091b645) and 1572520e (one condition in one file).

  • The merge carries no change of its own. The PR's net diff before the merge (merge-base 24b6ae55..0bc781b5) and after it (6091b645..bc6c83bd) is the same 18 files, +1383 / -80, and the +/- lines are identical (diff of the two -U0 patches is empty). The add/add conflicts that --remerge-diff shows (.changeset/33792-…, .claude/agents/os-dev.md, .claude/skills/pm-dispatch/SKILL.md, …) are all files outside the PR, and each was resolved to main's side.
  • The root fix (packages/metadata-protocol/src/protocol-meta-layered-reads.ts:463). main's fix(metadata-protocol)!: a dependent's bundle-member row moves no bare read across a restart, and a row-held base's own member is the base's #34644 added a bare-name fallback to getMetaItemLayered: when code is still null and no member is named, it reads lookupArtifactItem. The fix adds && bareDocEnvironmentEntry === undefined to that guard, next to the existing bareActionAnswer === undefined. The file was already in the PR's surface, and the condition sits beside the PR's own [#34248] code at :430-439, which already keeps the artifact lookup off a bare doc read with an environment entry. The new comment is accurate.

Does the root fix change the narrowing's served answers?

No. It restores the answers L2 6943305789 passed at 0bc781b5, on the merged tree.

  • bareDocEnvironmentEntry is set only by this PR (:286-292), for a bare doc read (no packageId) of a name that two enabled packages hold beside the environment's own entry. On every other read the new clause is true, so main's fix(metadata-protocol)!: a dependent's bundle-member row moves no bare read across a restart, and a row-held base's own member is the base's #34644 fallback runs exactly as on main.
  • On such a read the PR already made the entry the code layer (artifact is undefined, regItem is the entry). A stamp-less entry leaves code non-null, so the fallback never fired there anyway. A hydrated package-less row is dropped by runtimeOnly and leaves code null. Only in that case did fix(metadata-protocol)!: a dependent's bundle-member row moves no bare read across a restart, and a row-held base's own member is the base's #34644's fallback put back the holder registered first as code and effective on /layers, while the plain read served the row. The fix keeps code null there.
  • That is what the unchanged pin packages/runtime/src/domains/meta-disabled-holder-artifact-door.test.ts:473 asserts (expectBareDoorsServe({ item: 'environment doc', code: undefined, overlay: 'environment doc' })). The delta does not touch the test file. The red-before / green-after reading (2 failed / 43 passed on the merged tree before the fix) is the area's, from 6948195566. I did not re-measure it. The CI shard results on this head below agree with it.
  • The narrowing's statement (changeset 34247-exact-read-own-item-or-none.md) needs no new sentence: the answers it describes are the ones served again.

Findings

  • must-fix: none.
  • should-fix: none.
  • nit: none.

Gates at this head (read 2026-11-17T13:03Z)

  • Check-runs on 1572520e…: 60 runs, all completed. Every one is success or skipped: Test Core 1–10, Test UI 1–3, Type Check · workspace, Lint & Repo Gates, TypeScript Type Check, Test Core, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset and Governed Surface Queue Guard among them. None failed or is pending.
  • The PR is marked ready for review (not a draft) at this head. That state was set before the hand-off, and this verdict changes nothing about it.

Owed after this (nothing here readies, queues or arms the PR)

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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue security size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants