Repository navigation
refactor(metadata-protocol): move the sealed overlay boot report out of protocol.ts into protocol-sealed-overlay-report.ts (#25467 cut 21) - #26404
Conversation
…of protocol.ts (#25467 cut 21) Move the body of reportSealedOverlayRows unedited into protocol-sealed-overlay-report.ts. It reads no member of the class, so the method's stub calls the plain function directly. The class keeps the method, its docblock and declared signature; its one caller keeps calling the class method. Claude-Session: https://claude.ai/code/session_016SP1spj613tyGCgxoD1An6 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 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 — 11 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 f30799bc13d50462fa13fac3c8c0226f31579e77 && git checkout f30799bc13d50462fa13fac3c8c0226f31579e77
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a66c9ff423f49afe1dadfff271a1152f8cdd60fa f488ca9c464c6e91febc40c5501f572e11429342 && git checkout -B drift-repro a66c9ff423f49afe1dadfff271a1152f8cdd60fa && git merge --no-ff f488ca9c464c6e91febc40c5501f572e11429342
node scripts/docs-audit/affected-docs.mjs --json a66c9ff423f49afe1dadfff271a1152f8cdd60fa |
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, Part of #25467 (cut 21), skip-changeset (no published behaviour moves). |
| Files | 2 files, +60/−24. reportSealedOverlayRows moves into protocol-sealed-overlay-report.ts as a plain function (it reads no member), and its class stub calls it directly, as in cuts 3 and 16. Its one caller still calls the class member. Not governed. |
| Scope | Narrowed under the claim's own fallback. findServedOverlayRow passed the AST screen, but moving it dropped check-durability-degradation-log-level's read-seam census from 82 to 79 while the gate stayed green. The gate follows only same-file wrappers, so the three try blocks guarding it in readMetaItem and getMetaItemLayered drop out of view. That is a coverage loss, not a move, so the member stays in the class. The seat's call: it stays there. No gate change is ordered for it, and the series moves on to members whose census stays at 82. |
| Fix | A pure move. Seat probe at fresh origin/main: all 24 removed protocol.ts lines reappear in the new module, identical once the class indent is stripped, 0 missing. Dev: AST compare 0 differ (the negative control gives 1). |
.d.ts bar |
Ruling 6348891160: both raw and sorted-union identity hold, base→head and main→merged. |
| Order questions | No body constructs an error, so no PRODUCERS row is owed. The durability --list is identical at 82. check-adr-anchors decision letters go 1,877 → 1,876 (the warning's ADR-0131 D6 text moved), and the gate exits 0; disclosed, accepted as a move. |
| Evidence | 35 check runs succeeded and 16 were expected skips on this head, 0 failed; mergeable clean. The suite ran 21,568 of 21,568 before the merge and 21,584 of 21,584 against main after #26244 was merged in. Derived gates: 51 of 51 exit 0, and --ran reconciles. No other open PR touches protocol.ts. |
| Carried | The liveness pointer disclosure stays for the series' close-out. Cut 22 goes to the same thread once this lands: resolveRowlessExpandedView (:10306) paired with expandUnderOwnName (:18159); both keep the census at 82 with an identical list. |
| 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 21 of the
protocol.tssplit (#24586 ruling A, recorded in6270097840). Cuts 1–20 landed as #25494, #25518, #25538, #25589, #25601, #25623, #25642, #25719, #25731, #25740, #25797, #25939, #25972, #26014, #26104, #26168, #26264, #26317, #26350 and #26366. The claim is6431131976. It took the cut 21 proposal of the cut 20 report (6430425388): the pairfindServedOverlayRow+reportSealedOverlayRows, with the fallback that a member which fails the screen stays and the other moves alone.This cut moves
reportSealedOverlayRowsalone. Both members passed the AST screen. MovingfindServedOverlayRowwas built and measured in full, and it would have taken three read seams out ofcheck-durability-degradation-log-level's census (82 → 79) while the gate stayed green. That loss is not move-only, sofindServedOverlayRowstays inprotocol.ts. The section "WhyfindServedOverlayRowstays" has the numbers.One
ObjectStackProtocolImplementationmember moves unedited into a new module,packages/metadata-protocol/src/protocol-sealed-overlay-report.ts(#23050 shape B):reportSealedOverlayRows: the boot warning[metadata_sealed_overlay_unserved]. It names the stored environmentsys_metadatarows that no read serves because they overlay sealed managed content (ADR-0131 D6): per type, a capped sample of names, and the two remedies.protocol.tsloses 20 net lines (29,210 to 29,190 before the merge ofmain; 29,213 to 29,193 after it). 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 frommain61c079862aafter cut 20 merged. It names no issue, so the claim comment is the identity record. It holds the move commitbe992bfe9d, the merge ofmaine931621a1(ce32d8d5be), and the merge ofmainabb9046057(f488ca9c46). The second merge brought in #26244, which editspackages/metadata-protocol/(seedFile); it auto-merged inprotocol.ts, far from the stub, and every reading after it is labelled "merged" below.Why
findServedOverlayRowstayscheck-durability-degradation-log-level's read-seam rule finds atrythat guards a storage read. It recognises a read by vocabulary (find/findOne/count) or through a same-file wrapper up toMAX_READ_WRAPPER_DEPTH = 2hops.findServedOverlayRowis such a wrapper: its body reads throughthis.findEnvironmentRow(...). Threetryblocks guard calls to it, and the gate counts each as a read seam:With the pair moved (a full build, the AST compare at 0 differ, the package suite 21,568/21,568 and all ten hand gates green), the stub's body is a
.callinto another file, so the wrapper hop ends there. The gate still exited 0, but its--listlost exactly those three lines and its verdict went from82 read seam(s)to79 read seam(s). MovingreportSealedOverlayRowsalone leaves the census at 82, with an identical--listonce[@:][0-9]+is stripped.So moving
findServedOverlayRowwaits for one of two things: the gate following an imported wrapper across files, or a ruling that accepts the census loss. Either is a gate decision, outside this move-only card. The cut 22 proposal on #25467 lists the members that a census trial showed to be neutral.Serial with the file's in-flight PRs
Measured on the pre-merge head, of the 21 open PRs then, one edited
protocol.ts: #26244. Itsgit merge-treewas clean against this head and againstorigin/mainalone. It has since merged, and this branch merged it in (f488ca9c46, auto-merged, no conflict).Measured again just before this PR was opened, against the merged head
f488ca9c46: of the 29 open PRs, none editsprotocol.tsand none namesreportSealedOverlayRows. Two touchpackages/metadata-protocol/src/test files: #26337 (3 files) and #26138 (7 files). Each conflicts with this head only where it already conflicts withorigin/mainalone. No open PR edits the new module.The order's screen (private statics,
new Error()Both members of the pair passed:
ObjectStackProtocolImplementationidentifier and none onthis.constructor.new Error(, so noPRODUCERSrow is owed.What moves
reportSealedOverlayRows:28657The shape (#23050 shape B, as cuts 1–20 apply it)
[#25467 cut 21].thisaccesses, withascasts, parentheses and!stripped, and barethischecked). So the stub isreturn reportSealedOverlayRows(rows);, a plain call, asnamesWithOwnStoredRow's stub is inprotocol-stored-overlay-reads.ts(cut 16). No member changes visibility.this.reportSealedOverlayRows(sealedOverlays)site (:28549at base) does not change.Module-level declarations, by reader
An AST walk over the body's identifiers, against
protocol.ts's top-level declarations and import bindings, finds none. The body uses onlyconsole.warn,MapandArray.from. The new module imports nothing, nothing gainsexport, and no import ofprotocol.tschanges. The one new statement inprotocol.tsis the import of the new module.The durability
--listcheck-durability-degradation-log-levelexits 0 at both ends. Its--listis identical once[@:][0-9]+is stripped (158 lines;82 read seam(s)at both ends, and no entry changes file). The moved body has notry, nocatchand no engine call. Itsconsole.warnis not acatchhandler, so the log-level rule does not grade it. After the merge ofmain, the verdict still reads82 read seam(s).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.Base
61c079862aand headbe992bfe9dwere built withpnpm --filter @objectstack/metadata-protocol buildagainst one dependency tree. The closure was built at head by a fullpnpm build(119/119). For the base build, the package'ssrc/was swapped tree-only to base and restored fromHEADunder a trap. Afterwardsgit diff HEADwas empty,git statuswas clean, and both touched blobs equalledHEAD's.f7f9306ed46a5605c5e4c59bbc212a7d5288061760ec85d473d2f3047a836ba5at base and at head, ondist/index.d.tsanddist/index.d.cts. The normaliser sorted 80 string-literal union runs. Sorted-union identity holds.1b134685a474f83cfa85a743e49a811d607fcaeed53ae8856dd62db65ad132f5at base and at head, 776,660 bytes. Raw identity holds. (Cut 20'sgetDiscoveryunion reorder did not recur.)mainit merged. feat(spec,metadata-protocol,service-storage,runtime,cli)!: a seed record can carry a file the package ships, seedFile(path) #26244 changed this package's published surface, so the merged tree was measured againstmainabb9046057, not against61c079862a. The closure was rebuilt by a fullpnpm build(119/119) on the merged treef488ca9c46; themainleg is the packagesrc/swapped tree-only toabb9046057and restored fromHEADunder a trap. Both give raw059fa1189ac13c65c36d3718584495bebaa48cc545e1526adb37cd95ef7dfaa3(777,645 bytes) and normalised0a7694d518b570981c5cdcbcdd8fcb2dec9f1c7d74a7287299fe9e19e32a4183, on.d.tsand.d.cts. Both identities hold on the merged tree too.index.jshashes7be270d93afd5f1e…at base andf109362a448bc4d8…at head (index.cjsb9cafecb264ca263…→48b8964ac889f026…).function reportSealedOverlayRows(appears 0 times in the base bundle and once in the head bundle. On the merged pair,index.jsis94affd7c88eb31be…onmainanddbff5f6c5cde69ca…merged, with the same 0 → 1.privatewas dropped fromreportSealedOverlayRowson disk (restored fromHEADunder a trap) and the package rebuilt. Both.d.tsfiles move tof631a07ad5d36220…(normalisedc2f3625e27675e2a…, which differs from the bar'sf7f9306e…) and printreportSealedOverlayRows(rows: ReadonlyArray<{ type: string; name: string; }>): void;. So the bar can see a change on this member.9f18a0177ac736ed…on all of them. The moved function does not appear.No changeset:
skip-changeset, per ruling6348891160.Proof of move-only
Body, by AST token. The compare reads the TypeScript compiler's AST leaf tokens, with JSDoc skipped, over the parameters, the return type and the body. It compares base
protocol.tsat61c079862aagainst the head module:The same compare against
origin/mainabb9046057and the merged head gives the same four lines, so the merge added nothing to the cut.Negative control. One token was changed in an in-memory copy of the head module:
SAMPLE_PER_TYPE = 5becameSAMPLE_PER_TYPE = 6.protocol.ts. All 249 base statements are byte-identical, leading comments included. Head adds one statement, the new module's import.protocol-sealed-overlay-report.tshas 56 lines.Readers of the moved lines
The tests and scripts that read
protocol.tsby path (33 files that nameprotocol.tsand callreadFileSync) were grepped for the member name and for its body's text:SAMPLE_PER_TYPE,metadata_sealed_overlay_unserved,sealed against overlays,linkage-free clone. So weredocs/qa/and the@objectstack/specliveness ledgers.packages/spec/src/migrations/registry.ts, whose migration prose names the log code; it reads no file.protocol.reads-environment-only.test.ts(metadata-protocol) andpackages/objectql/src/protocol-object-overlay-layer.test.tsassert the[metadata_sealed_overlay_unserved]warning through boot. The first passes at both ends in the package suite.reportSealedOverlayRows. Carried forward:manifest.json'sdependenciesrow →protocol.ts#resolveWritePackageScope(cut 19) andseed.json→protocol.ts#applySeedBodies(cut 14) still quote lines that moved to a seam module.check:livenesschecks only that the#symbolis named in the file, and both stubs keep it. Re-pointing them is apackages/spec/**edit, outside this card.check-adr-anchorsexits 0 at both ends. The warning text's(ADR-0131 D6)moves out of the anchoredprotocol.ts, so the decision-letter count goes 1,877 → 1,876. The citation count goes 59,313 → 59,314 and the file count 8,371 → 8,372 (the new module's header namesADR-0131 D6once more). The moved line is the warning's text, not an anchor entry paragraph's mechanism, so no anchor entry is owed (as in cuts 8 and 12). Theprotocol.tsanchor's governing ADRs are all still referenced.check-engine-double-contract): exits 0 at both ends. TheupdateData/deleteDataseams keep their entries at new line numbers (13896 → 13898, 13921 → 13923, from the two import lines).productionFilesis 3,751 at base and 3,753 at head: the new file, and the gitignoredregistry.tsthe spec build writes in the head tree (as in cut 20).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 at61c079862a.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, base and head, compared per test name and status. Each leg ran vitest--maxWorkers=2with the JSON reporter under the shared verify lock.61c079862a: 21,568 tests (21,549 passed, 0 failed, 19 skipped), 270 files.be992bfe9d: 21,568 tests (21,549 passed, 0 failed, 19 skipped), 270 files.src/swapped tree-only from61c079862a(the new module removed) and restored fromHEADunder a trap.mainabb9046057(the same tree-only swap) and the merged headf488ca9c46both give 21,584 tests (21,565 passed, 0 failed, 19 skipped), 271 files; 0 lost, 0 added, 0 changed.check-platform-checklist --changed-from origin/main(merged tree): OK. 1 anchored file is in the change set, 29 anchors were judged, and 0 were 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 84 changed lines, under the 3,000-line human-merge bar.dispatch-gates --commands --repo objectstack-ai/objectstackderives 51 gates on 2 changed paths from the merged treef488ca9c46, with no stale-tree warning; all 51 exit 0 after the fullpnpm build(119/119).dispatch-gates --ran: 51 derived, 51 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. (On the first merge,ce32d8d5be, the same 51 also exited 0, but the derivation flaggedscripts/engine-double-contract.pinned.jsonas stale againstmain;mainwas merged again and everything after the merge was re-run.)check-durability-degradation-log-level --liston the merged tree:82 read seam(s).mainwas 6 commits past the merge.dispatch-gatesnames 10 changed files there (workflow files andscripts/ci/**self-tests). None of them is named by any of this cut's 51 derived gate commands, and none is underpackages/metadata-protocol/, somainwas not merged a third time.Carry-forward
These stay in
protocol.ts:protocol.tsread-seam entry ofcheck-durability-degradation-log-level --list(guards X() in Y()), as the guarded wrapper X or as the guarding member Y, takes a seam out of the census when it moves. It stays until the gate follows imported wrappers or a ruling accepts the loss. A census trial (each body moved alone to a scratch module, the gate re-run) measuredfindServedOverlayRow82 → 79,packagelessAddress82 → 78, andunmanagedImportCollisions,rollBackUnmanagedImport,readRevertableCommitandapplyObjectRegistryMutation82 → 81 each.probeRecord,getMetaItemCached,findReferencesToMeta,refuseUnmintableMetaType,metaTypeNamespaceExists,viewContainerNameCollisionRefusalwithoverlaidShippedContainerViewNames,reportPageRequiresAbsentAtLoad, the 7applyRegistryWriteThroughcallers,readCodeLayerForCarryForwardandensureObjectStorage.refusePackagedBaseRemoval,packagedBaseRefusal,runPublishSideEffects,promoteDraftForPublish,publishPackageDraftsanddiscardPackageDrafts.warnClosureReadUnavailable.🤖 Generated with Claude Code
https://claude.ai/code/session_016SP1spj613tyGCgxoD1An6