Repository navigation
fix(scripts): the read-seam census follows a moved protocol.ts body across its host split (#25467 census extension) - #28058
Merged
Conversation
…cross its host split A move-only cut of protocol.ts takes a method body into a protocol-*.ts module and leaves a stub that calls it through a named host. The census followed neither shape, so a moved body's this.findEnvironmentRows() and a protocol.ts try around the stub both left the read-seam count (the cut-34 trial read 93 -> 89). The wrapper hop now resolves, in packages/metadata-protocol/src only, a host call typed through the module's own host interface to the class method in protocol.ts (one hop, as before the move), and reads a stub method as its moved body (no hop). The read vocabulary, the scan roots and the depth bound are unchanged. main reads 95 instead of 93: two seams cut 1 had hidden (protocol-batch-data.ts runBatchDataLoop / runUpdateManyLoop guarding assertRecordExists), both "no invented answer". The cut-34 trial tree reads 95 too. Eight new self-test rows pin the positive shapes, the narrowness and the depth bound. Claude-Session: https://claude.ai/code/session_016WV4czJUan4AwAS6HLpzZN Co-authored-by: Claude <noreply@anthropic.com>
… hid Claude-Session: https://claude.ai/code/session_016WV4czJUan4AwAS6HLpzZN Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:server#1 · os-elon-musk · session_016WV4czVnUdQQCVKSW5J2uk Seat ACCEPT · PR #28058 · head
|
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Elon · project thread
Refs #25467
Clause-②: no (PR 1 is a gate's internal recognition; PR 2 is move-only,
.d.tsbyte-identical)Metadata-protocol: none
Ruling-ref: 6520565826
维护者速读
check-durability-degradation-log-level的读缝规则)现在能跟着protocol.ts拆分走:搬进protocol-*.ts模块的方法体经宿主接口调回protocol.ts的存储包装方法,仍算同一条读缝;protocol.ts里调用一个"桩方法"时,也会读到它搬走的方法体。只改这一个脚本。src/protocol.ts(33,065 lines, +10,169 in 30 days) along itsObjectStackProtocolImplementationseams, one move-only slice per PR #25467 的裁决 B。cut 34 试搬deletePackage时普查从 93 掉到 89,掉的 4 条读缝其实还在,只是检测器看不见了,于是"搬走方法体"变成了逃出普查的路。这是检测器扩展,不是放松。packages/metadata-protocol/src生效,读词表、扫描根、深度上限都没变;不改任何判决、不加基线行。main上读数 93 → 95,多出的 2 条是 cut 1 早就藏掉的真实读缝,判定都是"no invented answer"。回滚即还原本 PR。scripts/check-durability-degradation-log-level.mjs的HOST_SPLIT文档块与createHostSplit(),以及isReadCall()里新增的两处解析。pnpm check:durability-log-level,预期自检 65 条全过、末行95 read seam(s), none invents an unreported answer。What changes
PR 1 of 2 under ruling B on #25467: extend the read-seam census so a moved
protocol.tsbody keeps its read seams, then (PR 2, from freshmainafter this merges) cut 35 movesdeletePackageand the cut-33 members the census alone rejected.scripts/check-durability-degradation-log-level.mjsonly. The read-seam rule's wrapper hop (isReadCall) learns the two shapes the split produces, inpackages/metadata-protocol/srcand nowhere else (HOST_SPLIT,createHostSplit()):this.x(…)in aprotocol-*.tsmodule, inside a function whosethisparameter is the module's own host interface (bare, orPicknamingx), whose memberxis typed as the class memberObjectStackProtocolImplementation['x'], resolves to that class's own methodxinprotocol.ts. It is one hop, the same hop the call made before its body moved.fn.call(ident, …),fna named import from a./protocol-*.jsmodule of the package that exports it, is read asfn's body. That is the same method's body relocated, so it costs no depth.Own-file resolution still wins, the read vocabulary (
find/findOne/count), the three scan roots andMAX_READ_WRAPPER_DEPTHare unchanged, and the log-level rule is not touched. Every refusal leaves the hop unresolved, which is the under-counting direction the rest of the file takes. Each split file is parsed once and its index shared, so the scan and the resolver walk the same tree.Tests
Eight new rows in
selfTestReadSeams(roster and floors raised 59 → 67 and 129 → 137), each a two-file fixture parsed throughcreateHostSplitas the scan parses the package:protocol.tsstorage wrapper is a seam; aprotocol.tstry around a stub follows the moved body and the stub costs no hop (with the stub charged a hop the read would sit at depth 3 and drop);packages/metadata-protocol/src, a host member not typed as the class member, a member thePickdoes not name: each resolves nowhere;node scripts/check-durability-degradation-log-level.mjs --self-test: exit 0, read-seam partition 65 cases (57 before), log-level partition unchanged.Acceptance notes
The census reading on
mainmoves 93 → 95, which the dispatch had expected to stay level; the seat accepted it in the card thread. The two new--listlines:packages/metadata-protocol/src/protocol-batch-data.ts:465 guards assertRecordExists()@319 in runBatchDataLoop() → no invented answerpackages/metadata-protocol/src/protocol-batch-data.ts:756 guards assertRecordExists()@748 in runUpdateManyLoop() → no invented answerBoth bodies moved out of
protocol.tsin cut 1 (BatchDataHost), before cuts were screened against this census, and they reachassertRecordExiststhrough the host. No verdict, no finding and no row of either baseline changes; every other--listline is byte-identical.Positive control, the cut-34 trial tree (the trial patch applied to
mainbc496bf7): the census without this change reads 89, with it 95, the same count asmain. The four lines cut 34 lost are back: three in the moveddeletePackage(findEnvironmentRows,packagelessAddress,deleteMetaItem), androllBackUnmanagedImport's guard ofdeletePackage(), through the stub. The rest of the diff is line numbers.--depth-costat the shipped depth 2 reads 95 (+15 over depth 1). At depth 3 the ladder now prices 109 instead of 100, because more host hops become visible one hop out. That is the diagnostic's price list, not a shipped reading; the constant is not raised.rethrowUnlessMetadataStoreUnprovisioned's catch-side guard resolution (establishesBenign) is not extended; the ruling covers the read side. A moved body whose catch delegates to that guard is still screened out in cut 35, and that is said there.skip-changeset: a script underscripts/, which no package publishes.Verification
Head
8ed1803bon basebc496bf7.Census readings
mainbc496bf7bc496bf7node scripts/check-durability-degradation-log-level.mjs: exit 0 at both ends; the log-level rule's line (48 seams, 7 propagating) is unchanged.Gates
node scripts/pm/dispatch-gates.mjs --commandson head8ed1803bderives 32 families on the one changed path; all 32 exit 0, and--ranreports 32 derived, 32 run, 0 NOT-MEASURED, 0 UNRUN.pnpm lint: exit 0.The two package tests that read this script by path (
sys-metadata-repository.draft-drain.test.ts,protocol.metadata-store-outage.test.ts): 2 files, 43 tests passed.🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4czJUan4AwAS6HLpzZN
Generated by Claude Code