Repository navigation
fix(metadata-protocol): the bare doc read of the environment's own entry carries the environment's envelope - #38947
Conversation
…try wears no holder's envelope Claude-Session: https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb Co-authored-by: Claude <noreply@anthropic.com>
…rop the step-19 known deviation Claude-Session: https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check3 anchor(s) derived from 2 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 184 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 29a71588e89aaa5278b4fd8758078bc4cbde3d41 && git checkout 29a71588e89aaa5278b4fd8758078bc4cbde3d41
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 202cc2860dfc789d3a9137e0ecf9352830a2a67a 304f3ac298e054de359e77a9060194a6250c1a92 && git checkout -B drift-repro 202cc2860dfc789d3a9137e0ecf9352830a2a67a && git merge --no-ff 304f3ac298e054de359e77a9060194a6250c1a92
node scripts/docs-audit/affected-docs.mjs --json 202cc2860dfc789d3a9137e0ecf9352830a2a67a |
…re-read-own-envelope
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ Flake judgement · head
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ Contract-review-claim: session_01WGufzhiGvpFMQX4XptMEtQ · head 11bc369 · 2026-12-01T15:38Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ Contract reviewServed-tier: Read for this record: card #38659 (body and all six comments), PR #38947 (body, file list, net diff against merge-base 645e6b1 restricted to the five files), and the check-runs on this head with their job logs. Nothing was built or run. Gate state on this head, read off the check-runs: 60 green, 15 skipped, 2 red. The red pair is ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Nits only; none is fixed on this head, since an edit to a code file would move it. Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhiGvpFMQX4XptMEtQ The brief handed to the isolated contract-review sub-agent (served at CONTRACT_REVIEW_TIER, effort high) whose record is comment 7317221531. Additions beyond the template: the implementing files named ( Contract review brief — PR #38947 @
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #38947 (#38659) · head 304f3ac (landing) · 2026-12-01T22:27ZVERDICT: ACCEPT once one paper item is done (P1, body only, the head does not move). The code has no must-fix and no should-fix. I confirm on this same head when the body reads as below.
Next: the body patch, then my same-head confirm, then landing. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 confirm · PR #38947 (#38659) · head 304f3ac (same head) · 2026-12-01T22:30ZVERDICT: ACCEPT. P1 of L1 7327911365 is closed on paper, and the head has not moved.
Next: landing. The merge closes #38659. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 席位核对ACCEPT — PR #38947 @
落地
State change: ready for review + auto-merge, by the owning seat; on merge it closes #38659. |
Requested by Steve · project thread
Fixes #38659
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/metadata-protocol/src/protocol-package-bindings.ts: new predicateservesEnvironmentOwnItem(environmentEntry, served)— true when the bare doc read judged that the environment's own entry answers first (the existingrefuseAmbiguousBareDocReadverdict) and the served item is bound to no package (storedItemPackageId, the store's own reading).packages/metadata-protocol/src/protocol-meta-item-reads.ts(readMetaItem, at the artifact-envelope lookup only): when that predicate holds, no artifact envelope is looked up, so the package-less lookup no longer falls back to the first registered holder's artifact. The served item keeps its own_packageId(none) and_provenance; the envelope'spackageId/provenancefollow.403 NOT_OVERRIDABLEwhile a holder ships the name (and the delete too, where a stored row exists), solock: full,editable: false,deletable: falseremain the truthful answer.doc-bare-read-environment-entry-first(packages/spec/src/migrations/entries/semantic/19.doc-bare-read-environment-entry-first.ts): the known-deviation sentence is dropped fromacceptanceCriteriaand replaced by the fixed behaviour..changeset/38659-bare-read-own-envelope.md(patch: metadata-protocol, spec).packages/runtime/src/domains/meta-bare-read-own-envelope-38659.test.ts(28 cases).Tests
Red first, green, ablation
pnpm --filter @objectstack/metadata-protocol build: 28 passed (28), head a2de8f4.scripts/ablation-replace.mjs, rebuilt,ablation-dist-preflight.mjsmarker present in 2 built files): 8 failed / 20 passed — exactly the 8 envelope pins; restore blob == HEAD,git diff HEADempty, rebuilt, preflight--absentclean. A first ablation attempt used a comment marker, which the build strips (preflight reported it absent); that reading was discarded and redone.HttpDispatcher,RestServerregistered handler, in-processprotocol.getMetaItem; entry forms: stamp-less bare-slot registration, package-less stored row hydrated before the artifacts. CONTROL: each holder's?package=Xreads X's doc under X's envelope with the entry present; no entry: one holder served under its own envelope, two holders refused409 RESOURCE_CONFLICT.Acceptance notes
hydrateOverlayIntoRegistry) runs after the artifacts: it withholds the holder's envelope only beside two or more holders (protocol-registry-hydration.ts,environmentDoc), so the bare slot already carries the holder's stamp, no entry is judged and this arm is never reached (contract review 7317221531, ③ finding 1; the dev's class-b finding). That cell is the hydrator's and moves to metadata-protocol: boot hydration with one enabled holder stamps a package-less stored row as the package's, so the bare read serves the package doc instead of the environment's own item #38952, whose fix lets this arm answer it./layersand/publishedwere measured before the fix and carry no package envelope, so they are unchanged.403 NOT_OVERRIDABLE(sealed base) in every cell. The envelope's lock therefore staysfull, which agrees with the write doors; changing the write door would be its own card.loadMetaFromDbafter the artifacts is stamped with the holder's envelope in the registry, and every bare door serves the holder's doc while the registry's bare slot holds the environment's body.deleteMetaItemnaming no package resolves on this host-config rig while the read reportsdeletable: false.Verification
Two-minute check:
pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-bare-read-own-envelope-38659.test.tsafter building@objectstack/metadata-protocol— expect 28 passed.Files to read first:
protocol-meta-item-reads.ts(theartifactItemternary),protocol-package-bindings.ts(servesEnvironmentOwnItem), then the test.Hand-over and take-over
Handed over by
repo:objectstack@os-steveat a2de8f4 on the maintainer's order (Release 7314610017); taken over byrepo:objectstack@os-support-ai(claim 7315270082,Resume-from: a2de8f41), which mergedmainin (no rebase) at 11bc369.Lock question (dev report 7314551774): option A, as a premise correction by the seat — the bare write doors refuse 403
NOT_OVERRIDABLEwhile a holder ships the name, so lockfullis the entry's own lock at that address and reads and writes agree (ruling 6942962369: "reads and writes give the same answer"). No behaviour change; B (the write doors) is not this card.Readings at 11bc369 (after the
mainmerge;turbo run build --filter=@objectstack/runtime..., 42 tasks):false &&, metadata-protocol rebuilt): 8 failed / 20 passed, exactly the 8 envelope pins; restored withgit restore --source=HEAD --staged --worktree, status clean, rebuilt.pnpm --filter @objectstack/metadata-protocolvitest: 379 files passed, 9 skipped; 23868 tests passed, 45 skipped.packages/specsrc/migrations: 212 passed.pnpm --filter @objectstack/spec check:generated: all 14 generated artifacts up to date.tsc --noEmitclean, itscheck:test-typechecknames 3 files outside this diff that import@objectstack/driver-turso, unbuilt in this filtered closure (TS2307; prerequisite, not a verdict; CI builds the full closure).overlap-check.mjs: clean againstorigin/mainand every open PR head.Left to CI: the gate families the hand-over listed as NOT MEASURED.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmNrdDzc1MxHJU3Tvyb