Skip to content

fix(scripts): the read-seam census follows a moved protocol.ts body across its host split (#25467 census extension) - #28058

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-06gygo
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-06gygo

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Refs #25467
Clause-②: no (PR 1 is a gate's internal recognition; PR 2 is move-only, .d.ts byte-identical)
Metadata-protocol: none
Ruling-ref: 6520565826

维护者速读

  • 改了什么:读缝普查(check-durability-degradation-log-level 的读缝规则)现在能跟着 protocol.ts 拆分走:搬进 protocol-*.ts 模块的方法体经宿主接口调回 protocol.ts 的存储包装方法,仍算同一条读缝;protocol.ts 里调用一个"桩方法"时,也会读到它搬走的方法体。只改这一个脚本。
  • 为什么改:维护者对 [maintainer] refactor(metadata-protocol): split src/protocol.ts (33,065 lines, +10,169 in 30 days) along its ObjectStackProtocolImplementation seams, 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.ts body keeps its read seams, then (PR 2, from fresh main after this merges) cut 35 moves deletePackage and the cut-33 members the census alone rejected.

scripts/check-durability-degradation-log-level.mjs only. The read-seam rule's wrapper hop (isReadCall) learns the two shapes the split produces, in packages/metadata-protocol/src and nowhere else (HOST_SPLIT, createHostSplit()):

  • Host call. this.x(…) in a protocol-*.ts module, inside a function whose this parameter is the module's own host interface (bare, or Pick naming x), whose member x is typed as the class member ObjectStackProtocolImplementation['x'], resolves to that class's own method x in protocol.ts. It is one hop, the same hop the call made before its body moved.
  • Stub. A method of that class whose last statement returns fn.call(ident, …), fn a named import from a ./protocol-*.js module of the package that exports it, is read as fn'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 and MAX_READ_WRAPPER_DEPTH are 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 through createHostSplit as the scan parses the package:

  • positive: a moved body's host call into a protocol.ts storage wrapper is a seam; a protocol.ts try 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);
  • negative control from the order: a moved body whose host call reaches no storage wrapper is no seam;
  • narrowness: the same files outside packages/metadata-protocol/src, a host member not typed as the class member, a member the Pick does not name: each resolves nowhere;
  • bound: the host hop is a hop (a third hop through the host is refused), and the same ladder one hop deeper is a seam, so that pin is not vacuous.

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 main moves 93 → 95, which the dispatch had expected to stay level; the seat accepted it in the card thread. The two new --list lines:

    • packages/metadata-protocol/src/protocol-batch-data.ts:465 guards assertRecordExists()@319 in runBatchDataLoop() → no invented answer
    • packages/metadata-protocol/src/protocol-batch-data.ts:756 guards assertRecordExists()@748 in runUpdateManyLoop() → no invented answer

    Both bodies moved out of protocol.ts in cut 1 (BatchDataHost), before cuts were screened against this census, and they reach assertRecordExists through the host. No verdict, no finding and no row of either baseline changes; every other --list line is byte-identical.

  • Positive control, the cut-34 trial tree (the trial patch applied to main bc496bf7): the census without this change reads 89, with it 95, the same count as main. The four lines cut 34 lost are back: three in the moved deletePackage (findEnvironmentRows, packagelessAddress, deleteMetaItem), and rollBackUnmanagedImport's guard of deletePackage(), through the stub. The rest of the diff is line numbers.

  • --depth-cost at 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 under scripts/, which no package publishes.

Verification

Head 8ed1803b on base bc496bf7.

Census readings
Tree Census before Census after
main bc496bf7 93 95
cut-34 trial on bc496bf7 89 95

node 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 --commands on head 8ed1803b derives 32 families on the one changed path; all 32 exit 0, and --ran reports 32 derived, 32 run, 0 NOT-MEASURED, 0 UNRUN. pnpm lint: exit 0.

node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs :: exit 0
node scripts/check-declaration-mirrors.mjs --self-test :: exit 0
node scripts/check-self-test-wired.mjs :: exit 0
node scripts/check-self-test-wired.mjs --self-test :: exit 0
node scripts/check-self-test-workflow-commands.mjs :: exit 0
node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0
node scripts/check-whole-set-label-write.mjs :: exit 0
node scripts/check-whole-set-label-write.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:bash32-floor :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:durability-log-level :: exit 0
pnpm check:entry-guard :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:parse-guard :: exit 0
pnpm check:pm-dispatch-gates :: exit 0
pnpm check:pnpm-filter-targets :: exit 0
pnpm check:pnpm-flag-spellings :: exit 0
pnpm check:ratchet-remedy-authority :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:scripts-symbol-anchors :: exit 0
pnpm check:swallow-census-controls :: exit 0
pnpm check:watch-hint-literal :: exit 0
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

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-elon-musk · session_016WV4czVnUdQQCVKSW5J2uk

Seat ACCEPT · PR #28058 · head 1253bafa332ee6ffadac15dd0b0ac2dd65377e0c · 2026-10-30T11:22Z

维护者速读

  • 改了什么:读缝普查门禁(check-durability-degradation-log-level.mjs)学会跟随 protocol.ts 拆分后的两种调用形状:模块里经 host 回调 protocol.ts 的存储包装,以及 protocol.ts 里只剩 fn.call(host, …) 的桩方法。
  • 为什么改:维护者裁决 B(「同意」,[maintainer] refactor(metadata-protocol): split src/protocol.ts (33,065 lines, +10,169 in 30 days) along its ObjectStackProtocolImplementation seams, one move-only slice per PR #25467 裁决记录 6520565826)。不改的话,每搬一段代码,普查就丢几条读缝,「搬走」变成躲开门禁的路。
  • 风险与回滚:只改一个门禁脚本,不碰产品代码;识别范围限定在 metadata-protocol 一个包、一种类型写法。回滚即 revert 本 PR。
  • 先看:脚本里新加的 HOST_SPLIT 注释块和 createHostSplit。
  • 两分钟验证:main 上普查从 93 读成 95(多出的两条是 cut 1 早年搬走后看不见的真读缝,结论不变);cut-34 试搬树上旧门禁 89、新门禁 95。
  • 需要你做的:无(Tier S,按本席落地授权落地)。

席位核对

  • Shape: draft → main, Refs #25467 (not Fixes: the series continues with cut 35). One file, scripts/check-durability-degradation-log-level.mjs (+422/−16). skip-changeset (scripts only). check-governed-merges --pr 28058: NOT governed, 438 lines.
  • Diff read by the seat: the resolver follows exactly two shapes and refuses everything else (another package, a module outside protocol-*.ts, a this not typed by the module's own host interface, a member not typed ObjectStackProtocolImplementation['x'], a host name with no class method). Own-file resolution still wins. The HOST CALL hop costs the same one depth the call cost before the move; the STUB costs none (it is the same method's body). Read names, scope roots and verdict criteria are unchanged. This is the detector extension the ruling names, not a loosening.
  • Premise measured: main reads 95 (was 93). The two new lines are protocol-batch-data.ts runBatchDataLoop() / runUpdateManyLoop() guarding this.assertRecordExists(); both read "no invented answer", so no verdict, finding or baseline row moves. Positive control: the cut-34 trial tree reads 89 without the resolver and 95 with it, its four lost lines back. Self-test: 65 read-seam cases, including the negative control that a moved body reaching no storage wrapper is still a lost seam.
  • Local (card thread, report 6521194953): 32 derived gate families exit 0, --ran 32/32, 0 NOT MEASURED; pnpm lint exit 0.
  • Gate check-runs on this head: 47 total, 27 success, 20 skipped by the path filter, 0 failed. mergeable_state: clean.
  • Accepted deviation — PR body corrections (the relay cannot re-edit a PR body; this record carries them): (1) Verification names head 8ed1803b; the head is 1253bafa (one docblock-only wording commit on top, re-runs in the report). (2) The Acceptance-notes clause "before cuts were screened against this census" is an inference; the measured fact is "and the census stopped seeing them then".
  • Out of scope: storedFlowBindingAgrees and metaTypeNamespaceExists stay out of cut 35 (the catch-side guard is not followed across files). Acceptance notes, no card: the series' next cut decides whether that matters.
  • Contract review: not owed (no published schema, no governed path, Clause-②: no, not a narrowing).
  • Landing: Tier S, under the maintainer's landing grant for this seat term (2026-10-30 10:20Z, seat-1 thread). Ready + auto-merge through the relay.

ACCEPT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant