Repository navigation
refactor(metadata-protocol): move the by-name item read's disabled-package face out of protocol.ts into protocol-meta-item-face.ts (#25467 cut 31) - #27181
Conversation
…ckage face out of protocol.ts into protocol-meta-item-face.ts (#25467 cut 31) Move-only, shape B. readMetaItemFace moves, unedited, into its own module. The engine field is handed over as a getter; the call to readMetaItem is handed over as a closure, so it still reaches the class method. noPendingDraftError gains `export` so the module can import it, as addressPackages and withDeclaredPageTypeDefault did in earlier cuts; the package index does not re-export it. Claude-Session: https://claude.ai/code/session_016SP1spj613tyGCgxoD1An6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check6 anchor(s) derived from 1 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 — 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 10cc58ccc6f0fafcc578d49fa1c2c06dcb21124e && git checkout 10cc58ccc6f0fafcc578d49fa1c2c06dcb21124e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 72629f38c2e70be3d455f2ca73d44cfb3c78a790 d12ae82d8cfd9d6c8dd6fe0cb13dd3d7f4e3a01d && git checkout -B drift-repro 72629f38c2e70be3d455f2ca73d44cfb3c78a790 && git merge --no-ff d12ae82d8cfd9d6c8dd6fe0cb13dd3d7f4e3a01d
node scripts/docs-audit/affected-docs.mjs --json 72629f38c2e70be3d455f2ca73d44cfb3c78a790 |
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, Part of #25467 (cut 31). 2 files: protocol.ts and one new module for the claimed member, protocol-meta-item-face.ts (readMetaItemFace). skip-changeset (move-only). Clause-②: no, Metadata-protocol: none. |
| Move check (seat) | 11 of the 12 non-blank lines the PR removes from protocol.ts are found verbatim (indent-stripped) in the new module. The 12th is the noPendingDraftError declaration line, re-added in place as export function with the same signature (the disclosed deviation below). The other added lines in protocol.ts are the import with its header comment and one stub through MetaItemFaceHost: engine is handed over as a getter, and readMetaItem as a closure, so that call stays on the class method, as the claim asked. Both callers (getMetaItem, getMetaItemForExecution) still call the class member. |
| Evidence | CI green on head d12ae82d8c (34 success, 18 skipped, 0 failed). Governed check: NOT governed, 92 changed lines. The report gives an AST compare of 181 tokens with 0 differ (both negative controls differ by 1), raw and sorted-union .d.ts identity (ruling 6348891160) at both ends and on merged vs main, an unchanged 78-name export table, identical suites (21,775), the read-seam census at 89 with an identical --list, and 46 of 46 derived gates. |
| Disclosed | noPendingDraftError was protocol.ts's own non-exported function, not an import as the claim assumed. It gained export in place so the new module can import it, following the cut 16 and cut 23 precedent. index.ts does not re-export it, so the published surface is unchanged: the export table is identical and so is the raw .d.ts. Accepted. One main merge; no open PR edits protocol.ts at pr_create. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay, once every check on this head is green or an expected skip. |
Generated by Claude Code
Requested by Leehom · project thread
Part of #25467
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6270097840
Cut 31 of the
protocol.tssplit (#24586 ruling A, recorded in6270097840). Cuts 1–30 landed as #25494, #25518, #25538, #25589, #25601, #25623, #25642, #25719, #25731, #25740, #25797, #25939, #25972, #26014, #26104, #26168, #26264, #26317, #26350, #26366, #26404, #26449, #26654, #26704, #26807, #26873, #26933, #26980, #27029 and #27129. The claim is6464007535. It takes the cut 31 proposal of the cut 30 report (6463239559): one member on its own theme. It passed the AST screen and the read-seam census and moved unedited.One
ObjectStackProtocolImplementationmember moves unedited into a new module,packages/metadata-protocol/src/protocol-meta-item-face.ts(#23050 shape B):readMetaItemFace, the one body behindgetMetaItemandgetMetaItemForExecution. It does three things:readMetaItemanswers.protocol.tsloses 2 net lines (29,495 to 29,493). The cut is move-only, and the card stays open for later cuts.Branch
claude/project-thread-ybjm3his the harness-pinned branch for this thread. It was restarted frommain1900c02cbe(after cut 30's merge). It names no issue, so the claim comment is the identity record. It holds the move commit0f3c00a4d9and, as the claim asked, one merge ofmain,d12ae82d8c(11 commits). That merge touches nothing inpackages/metadata-protocol/. The merged tree was still measured againstmain(see "The merged tree againstmain").One top-level edit beyond the move:
noPendingDraftErrorgainsexportThe claim says the four disabled-package helpers "stay imported in
protocol.ts". They are in factprotocol.ts's own module-level functions, declared at:636–:680. The new module therefore imports them from./protocol.js.isObjectOfDisabledPackage,isItemOfDisabledPackageandobjectPackageDisabledErrorwere already exported.noPendingDraftErrorwas not. It gains theexportkeyword in place, with nothing else in its statement changed. This followsaddressPackages(cut 16) andwithDeclaredPageTypeDefault(cut 23).packages/metadata-protocol/src/index.tsnames its re-exports from./protocol.jsone by one and does not name it. So the package's published surface does not move: the.d.tsand export-table readings below are identical at both ends.protocol.ts, and all four stay there.Serial with the file's in-flight PRs
The claim found no open PR touching
protocol.tsand asked for a re-check. Atpr_create, of the 21 open PRs, two touch this package: #26937 (one test) and #26517 (CHANGELOG.md/package.json). None editsprotocol.ts, none namesreadMetaItemFaceornoPendingDraftError, and both are merge-tree clean against this head and againstmain.mainmoved 8 commits after the merge (tob8615afaba). None touches this package, andgit merge-treewith this head is clean. The derivation ond12ae82d8cfound nothing stale, somainwas not merged again. The PR's merge ref runs CI against currentmain.The order's screen (private statics,
new Error(, the read-seam census)The member passed:
ObjectStackProtocolImplementationidentifier and none onthis.constructor.new Error(. Its two refusals come from the module-level factoriesobjectPackageDisabledErrorandnoPendingDraftError, which stay inprotocol.ts, so noPRODUCERSrow is owed.check-durability-degradation-log-level --listwas taken on the base and again on the cut. Both read89 read seam(s), the claim's base, and the lists are identical once[@:][0-9]+is stripped. The full readings are under "The durability--list".What moves
readMetaItemFace:10702engine(field);readMetaItem(method); module-levelisObjectOfDisabledPackage,objectPackageDisabledError,isItemOfDisabledPackage,noPendingDraftErrorprotocol-meta-item-face.tshas 70 lines.The shape (#23050 shape B, as cuts 1–30 apply it)
[#25467 cut 31].MetaItemFaceHosttypes the two members the body reads as the class members themselves (ObjectStackProtocolImplementation['engine']and['readMetaItem']).enginefield is handed over as a getter, so the read finds it at call time, as before.readMetaItemis handed over as a closure,(...a) => this.readMetaItem(...a), as the claim asked. So that call still reaches the class method.readMetaItemFace.call(host, request, face), so the method's inferred type is the moved function's inferred type. The member is private, so the.d.tsprints its name only, and the positive control below shows the full type when it is not.getMetaItem(:10653) andgetMetaItemForExecution(:10688). Neither changes.The published
.d.tsThe series bar is ruling
6348891160: sorted-union identity, measured first, with raw identity reported when it holds. Both hold for this cut, including on the merged tree againstmain. The cut 25 / cut 30 comment-offset trap was checked first: ametadata-protocolbuild right after the move commit gave the base's raw hash. It did not fire.Base
1900c02cbeand head0f3c00a4d9were built withpnpm --filter @objectstack/metadata-protocol buildagainst one dependency tree. The closure was built at head by a fullpnpm build(116/116). For the base build, the package'ssrc/was swapped tree-only to base (the new module removed) and restored fromHEADunder a trap. Afterwardsgit diff HEADwas empty,git statuswas clean, and both touched blobs equalledHEAD's.fd5431a235098745024b527517710c81a74652d9f8d4b842a691e9d3009207efat both ends, ondist/index.d.tsanddist/index.d.cts. The normaliser sorted 80 string-literal union runs. Sorted-union identity holds.9f7d69b1624e93986442f4d5b558d8976671c791ec19d84dda5eb68b4249128bat both ends, 784,351 bytes. Raw identity holds, withnoPendingDraftErrornow exported fromprotocol.ts.index.jshashes18aded551747cdaa…at base andb4863907a762ba0b…at head (index.cjsd859527bb8d3b7f1…→d04d03f27652735c…).readMetaItemFace.call(hostgoes 0 → 1 in both bundles.function …(declaration goes 0 → 1.privatewas dropped fromreadMetaItemFaceon disk (restored fromHEADunder a trap) and the package rebuilt. Both.d.tsfiles move to74f2db843cbc8a66…(normalisedb6f0bbbad4cbbe16…, which differs from the bar'sfd5431a2…) and printreadMetaItemFace(request: {…with its inferred return type. So the bar can see a change on this member.9f18a0177ac736ed…on all of them. None ofreadMetaItemFace,MetaItemFaceHostornoPendingDraftErrorappears.The merged tree against
mainThe merged tree
d12ae82d8cwas measured againstmain3346da26df, its second parent, in the same way. The closure was rebuilt by a fullpnpm build(116/116), andmain's packagesrc/was swapped in tree-only and restored under a trap. The merged tree differs frommainonly by this cut: 2 files, +80 / −12..d.ts: raw9f7d69b1624e9398…(784,351 bytes) and normalisedfd5431a235098745…, the same atmainand merged. Both identities hold.index.js:18aded551747cdaa…atmain,b4863907a762ba0b…merged. Export tables: 78 names,9f18a0177ac736ed…on both.main'sprotocol.tsagainst the merged one: 181 tokens, 0 differ.mainand merged both give 21,775 tests (21,749 passed, 0 failed, 26 skipped, 281 files), per test identical.No changeset:
skip-changeset, per ruling6348891160.The durability
--listcheck-durability-degradation-log-levelexits 0 at both ends with identical output:89 read seam(s)at both ends. Its--listis identical once[@:][0-9]+is stripped (165 lines, and no entry changes file).try, and it calls none of the gate's read vocabulary (find/findOne/count).89 read seam(s).Proof of move-only
Body, by AST token. The compare reads the TypeScript compiler's AST leaf tokens, with JSDoc skipped, over the parameters (less the added
this), the return type and the body. It compares baseprotocol.tsat1900c02cbeagainst the head module:Negative controls. Each changed one token in an in-memory copy of the head module, and the member moved (differ 1):
protocol.ts. Of the 264 base statements, 263 are byte-identical, leading comments included. The other isnoPendingDraftError, whose only change is the addedexport(see above). Head adds one statement, the new module's import.Readers of the moved lines
These were grepped for the member name, the four helpers and the body's distinctive text (
_withheld,_servedOnly):the 24 files that name
protocol.tsand callreadFileSync;the test files in
packages/,docs/qa/andscripts/;the
@objectstack/specliveness ledgers.By path: none reads a moved line.
The one other mention.
protocol.item-execution-read.test.tsnames the member in a comment and drives both faces throughgetMetaItem/getMetaItemForExecution. It passes at both ends, in the package suite.The liveness ledgers. No row points at the member. Carried forward:
manifest.json'sdependenciesrow →protocol.ts#resolveWritePackageScope(cut 19), andseed.json→protocol.ts#applySeedBodies(cut 14). These arepackages/spec/**, outside this card.ADR anchors.
check-adr-anchorsexits 0 with identical output at both ends (1,900 decision-letter citations, 60,175 citations).Engine-double contract (
check-engine-double-contract): exits 0 at both ends.updateData/deleteDataseams keep their entries at new line numbers (13999 → 13997, 14024 → 14022).productionFilesis 3,832 at base and 3,834 at head. The +2 are the new file and the gitignoredpackages/spec/src/migrations/registry.tsthat the spec build writes in the head tree, as in cuts 20–30.Identical output at both ends:
check-adr-anchors,check-adr-symbol-anchors,check-system-context-census,check-tenant-audit-census,check-query-options-erasure-ratchet,check-filter-alias-parityandcheck-durability-degradation-log-level.check-nul-bytesdiffers only in the scanned file count, +1. The base-end readings were taken in a clean detached worktree at1900c02cbe.Verification
tsc --noEmitinpackages/metadata-protocolexits 0 at head and on the merged tree.pnpm exec eslint --no-inline-config packages/metadata-protocolexits 0 with no output (the whole touched package, with the rootlintscript's flags).packages/metadata-protocolsuite, compared per test name and status. Each leg ran vitest--maxWorkers=2with the JSON reporter under the shared verify lock.1900c02cbe: 21,775 tests (21,749 passed, 0 failed, 26 skipped), 281 files.0f3c00a4d9: 21,775 tests (21,749 passed, 0 failed, 26 skipped), 281 files.src/swapped tree-only from1900c02cbe(the new module removed) and restored fromHEADunder a trap.d12ae82d8candmain3346da26dfboth give 21,775 tests, per test identical (0 lost, 0 added, 0 changed).check-platform-checklist --changed-from origin/main(merged tree): OK, 31 anchors judged, 0 lost.check-governed-merges --branch claude/project-thread-ybjm3hfinds 0 of 2 paths in the register (13 surfaces), so the PR is NOT governed. It has 92 changed lines, under the 3,000-line human-merge bar.dispatch-gates --commands --repo objectstack-ai/objectstackderives 46 gates on 2 changed paths fromd12ae82d8c, with no stale-tree finding. All 46 exit 0 after the fullpnpm build(116/116).dispatch-gates --ranreports 46 derived, 46 run, 0 NOT-MEASURED and 0 UNRUN, and exits 0.Carry-forward
These stay in
protocol.ts:findEnvironmentRows,findEnvironmentRow,packagelessAddress,findServedOverlayRow,foldStoredCollection,applyObjectRegistryMutation,unmanagedImportCollisions,rollBackUnmanagedImport,readRevertableCommitandstoredFlowBindingAgrees.rethrowUnlessMetadataStoreUnprovisionedcannot move at all.probeRecord,getMetaItemCached,findReferencesToMeta,refuseUnmintableMetaTypeandmetaTypeNamespaceExists.viewContainerNameCollisionRefusalwithoverlaidShippedContainerViewNames, andreportPageRequiresAbsentAtLoad.applyRegistryWriteThroughcallers,readCodeLayerForCarryForward,ensureObjectStorage,dropObjectStorageandapplyRemoteMetadataMutation.emitMetadataMutation, andgetOverlayRepo.isArtifactBacked,isNestedArtifactFieldandpackagedArtifactBase(thelookupArtifactItemsite pins).refusePackagedBaseRemoval,packagedBaseRefusal,runPublishSideEffects,promoteDraftForPublish,publishPackageDraftsanddiscardPackageDrafts.warnClosureReadUnavailableandresolveSduiManifest.🤖 Generated with Claude Code
https://claude.ai/code/session_016SP1spj613tyGCgxoD1An6