Skip to content

[Decision] protocol.ts split: replace the per-member series with a section-level big-chunk plan (preamble wholesale, one machine-checked rewrite set, five section cuts under a hot-file freeze) — or keep cutting member by member #28142

Closed

Description

@objectstack-fleet

director#1 · os-bill · session_01Utp6CbQLcy8yg6vhJVXXi8

Ruled: 6537939895 · letter E · 2026-10-31T02:44Z
Ruling-ref: 6537939895

Filing gate ②: the maintainer, in the director summon (2026-10-30), on batch #432's #25467 presentation, verbatim: 「33,000 行的 protocol.ts 已拆到 29,114 行(cut 35 刚合并) 整个拆分过程是不是动作太小了,有没有大切块的方案」. This card is the big-chunk plan, as a decision beside #25467 (the series card stays the execution card under whichever letter). Filed by the director seat (summon #54 continuation 2, ledger objectstack#12708). ⛔ Not a claim. domain:server expected (triage sets it).

维护者速读

  • 为什么到现在都是小步: 系列的规则是「只搬函数体、一字不改」加五道筛查(函数体不得读私有静态成员、不得读 this.constructor、读取缝普查、两个按路径读源码的 pin、.d.ts 字节一致)。能一字不改就搬走的成员一次只有几个,所以 35 次切片、8 天、约每周 4,000 行;每个 PR 都带一整套证明(AST 逐 token 相同、.d.ts 哈希、全套测试)。还有一个结构事实:成员声明留在类里当一行桩,只有函数体搬走,所以文件的终态不是 0,是「约 2,000 行的薄类 + 一个瘦前言」。
  • 现状实测(origin/main 121d1a5f): 29,114 行 = 前言 6,374 行(177 个顶层声明,其中 3,938 行是注释)+ 类及尾部 22,740 行(this. 读 833 处、私有静态读 46 处)。按现在的速度,到终态还要约 6–7 周、上百个 PR。
  • 大切块方案 E,三步: E0 前言整体按主题搬成模块(不需要宿主对象,一个 PR 约 4,000–5,000 行);E1 一次性放开一组机器可核的机械改写(this.x → host.x、私有静态 → 宿主暴露、this.constructor → 宿主),并把两个按路径 pin 与普查一次性改成跨模块解析;E2 按卡面自己的分区表切 5 块(元数据读 2,872 · 查询校验 1,643 · 数据 CRUD 1,393 · 批处理 1,067 · 发现与诊断 1,578 · 类头 1,961),每块一个 PR、1,000–3,000 行、各占一天热文件冻结。结果:约两周到终态,PR 数约 8 个而不是 100 个。
  • 代价: 每个 PR 更大、评审更重(但 AST 比对工具让「搬了什么」机械可核);冻结期间其他碰 protocol.ts 的 PR 排队一天;E1 放开的改写集要在裁决里逐条点名,不能开成「随便改」。
  • 请回: E / A,席位推荐 E。A = 维持逐成员系列([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 批 [WIP] Update action run status for job #432 的 A 照走)。

Governing text

Protocol statement. Clause-②: no, Metadata-protocol: none: no published surface changes (the .d.ts bar stays); E1 is an edit to private implementation text under a machine-checked rewrite set.

Premises (read at origin/main 121d1a5f)

  1. protocol.ts 29,114 lines; the class starts at L6375. Re-check: git show origin/main:packages/metadata-protocol/src/protocol.ts | grep -n '^export class ObjectStackProtocolImplementation'.
  2. The preamble holds 177 top-level declarations (85 exported) and 3,938 comment-ish lines. Re-check: the same file's first 6,374 lines through grep -c -E '^(export )?(async )?(function|const|let|class|type|interface|enum) '.
  3. The class text reads this. 833 times and ObjectStackProtocolImplementation.<static>( 46 times. Re-check: grep -o 'this\.[a-zA-Z_]*' | wc -l and grep -c 'ObjectStackProtocolImplementation\.[a-zA-Z_]*(' over lines ≥ 6375.
  4. Pace: 35 cuts between 2026-10-23 and 2026-10-30 moved 33,065 → 29,114 lines (−3,951). Re-check: the card's body (33,065 on b2c0752900) against premise 1.
  5. The census already resolves a host call from a protocol-*.ts module back into protocol.ts (check-durability-degradation-log-level.mjs L3029–3058, PR fix(scripts): the read-seam census follows a moved protocol.ts body across its host split (#25467 census extension) #28058) — the resolution E1 extends to the two pins.

Options

What it does Result Effort / risk
E section-level plan E0 preamble → themed modules (no host); E1 one ruled, machine-checked rewrite set inside moved bodies + the two pins and the census resolve through modules once; E2 five section cuts by the card's table, each PR 1,000–3,000 lines under a one-day protocol.ts freeze; proofs per PR: AST identity modulo the ruled rewrite set (tool-checked, with a negative control), .d.ts bar 6348891160, tsc, full package suite, the census and pins green protocol.ts ≈ 2,000–3,000 lines (stubs + class head) in about two weeks and about 8 PRs server · 8 PRs · each L · larger reviews; freeze days; the rewrite set must be closed and named in the ruling
A keep the series cut 36 under #25467's A, then per-member cuts as members pass the screens the same end state in about 6–7 weeks and ~100 PRs server · many S PRs · each fully proven; hot-file queue tax continues

业务含义:E 是「把仓库按货架整层搬,搬之前先统一换好货架编号,搬那天封路一天」;A 是「每次搬几箱,不封路,但要搬两个月」。

四维分析

  • ① 项目长远合理性(领起)。 终态相同:薄类压在主题模块上。E 以 8 个 PR 到达,A 以上百个到达;热文件串行队列是今天每个 server PR 都在付的税,早两个月结束就是早两个月不付。E1 放开的改写是机械的、可被工具逐 token 核对的,不是「允许改逻辑」。
  • ② 实际业务拉动。 间接:protocol.ts 在热文件队列里,所有碰它的 PR 串行;无客户可见变化。
  • ③ 防 AI 犯错。 风险从「每次小切片的筛查」转为「一次放开的改写集」:改写集封闭、每条带反向对照,AST 工具对比搬前搬后,才能响亮地抓到越界;冻结期防止并发改动把大 diff 搞脏。
  • ④ 创业阶段不扩散。 不加门禁、不加协议面;E1 是对现有普查与 pin 的一次性解析扩展(fix(scripts): the read-seam census follows a moved protocol.ts body across its host split (#25467 census extension) #28058 已做了普查那一半)。

os-decision-facets
① 长远:同一终态,8 个 PR 两周 vs 上百个 PR 两个月;改写集机械可核
② 拉动:热文件串行税,每个 server PR 都在付
③ 防错:改写集封闭、带反向对照、AST 工具逐 token 核;冻结日防脏 diff
④ 不扩散:不加门禁不加协议面;pin 与普查一次性解析扩展
Prior rulings read: protocol.ts split, move-only, host pattern, .d.ts bar, cut 34 → 6270097840, #23050 B, 6348891160, 6520565826; thread: #25467 6523456539; repo: objectstack-ai/objectstack

Recommendation

E. 只看①选 E;②③④ 是否翻转:否(③ 只加「改写集封闭 + 反向对照」的条件). Confidence gaps: the five section sizes are the card's 2026-10-23 table re-read against today's 29,114 lines (the reads section has since lost members to cuts 33–35; the dev re-measures each section before its PR); the freeze mechanism is the lane's hot-file queue, not a new gate — the seat posts the freeze day on the seat post and the queue serialises.

After the ruling

Related

#25467 · #24586 · #23050 · PR #28058 · PR #28090 · ruling 6348891160 · packages/metadata-protocol/src/protocol.ts

Activity

  1. added
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    domain:serverDomain lane — seat card indexed by label:pm:seat
    on Oct 30, 2026
  2. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: p2 · domain:server · decision · 2026-10-30T15:04Z

    ⛔ Not a claim. The decision card is well-formed: it has a 维护者速读 section, it names its governing rulings, and it asks for E / A.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    director#1 · os-bill · session_01Utp6CbQLcy8yg6vhJVXXi8

    Ruling: batch #432 item 2 · letter E · maintainer 「同意」 2026-10-31T02:42Z

    Director seat, summon #54 continuation 2 (ledger objectstack#12708, opening mark 6523423511). The maintainer asked 「整个拆分过程是不是动作太小了,有没有大切块的方案」 on #25467's cut-36 presentation; this card carried the big-chunk plan; the maintainer answered, verbatim: 「同意」 — letter E.

    What the ruling binds (letter E — the section-level plan replaces the per-member series):

    Governing text: #24586 ruling A (6270097840); #23050 shape B (the host pattern); ruling 6348891160 (.d.ts bar); cut 34 ruling B (6520565826) and #25467's 6523456539 — the per-member levers E1 resolves once. Premises re-read at origin/main 121d1a5f (this card's body).

    Workload of the letter: domain:server · about 8 PRs (E0 one · E1 one · E2 five or six) · each L · the same card thread under the server seat's landing grant · Clause-②: no, Metadata-protocol: none (no published surface change; packages/spec untouched). The dev re-measures each section against today's file before its PR; the freeze day is the lane's hot-file queue, not a new gate.

    Execution: this card closes completed in this act, its plan recorded on #25467 (ruling pointer there); #25467 needs-user-decision → pm:dispatched (assignee os-elon-musk, the seat's claim stands); the server lane's card thread runs E0 → E1 → E2 with Ruling-ref: naming this comment.

    os-decision-facets
    ① 长远:同一终态,约 8 个 PR 两周 vs 上百个 PR 两个月;改写集封闭、机械可核
    ② 拉动:protocol.ts 在热文件串行队列,每个 server PR 都在付
    ③ 防错:改写集逐条点名、带反向对照、AST 工具逐 token 核;冻结日防脏 diff;.d.ts 门槛不动
    ④ 不扩散:不加门禁不加协议面;pin 与普查一次性解析扩展

  4. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    director#1 · os-bill · session_01Utp6CbQLcy8yg6vhJVXXi8

    Closed completed · 2026-10-31T02:45Z · ruling 6537939895 (letter E); the plan is recorded on the execution card #25467 (pointer 6537947529), which runs E0 → E1 → E2 under the server seat. needs-user-decision leaves with the close.

  5. removed
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions