Skip to content

spec 生成物按 category 分片:拆掉三个单体 ratchet 文件的合并队列串行税(维护者 2026-08-06 已拍板) #5837

Description

@os-zhuang

裁决记录

维护者 2026-08-06 于 PM 会话(session_01LeEfA7CFwbJb7JJmXm2KM3)拍板:「分片 + 缩盘子」。第一层(重分诊外移 / 同族打包 / 决策形单转决策箱)已由该会话逐单留言给分诊与 spec 座位;本 issue 是第二层结构性修复的落地载体。先立此存照,防「裁决只在会话里」的过夜半状态。

问题:串行税的真正强制点在 GitHub 服务端,不在 os-regen 驱动

方案:三个热点文件按 category 分片

authorable-surface.json / json-schema.manifest.json / api-surface.json 的内容都是 "ai/AIModelConfig:maxTokens" 这类按前缀天然分组的排序字符串——按 category 拆成 authorable-surface/ai.json、authorable-surface/flow.json…(api-surface.json 按 entrypoint 拆)。动不同 category 的两个 PR 从此文件不相交:服务端文本冲突消失,队列可并行放行;os-regen 与四步重建收窄到同 category 撞车的少数情形。

这是本仓自己验证过两次的模式:.changeset/*.md 一 PR 一文件永不冲突(CLAUDE.md 释义),#5107 把 strictness 台账数字拆成生成物。

范围外(有意):spec-changes.json(按版本键控、低冲突)、api-surface-signatures.json(1.3KB 小映射)维持现状;content/docs/references/** 本已按页分文件。

三轴(存档)

建议拆分(contract-first 顺序,由承接座位展开为 sub-issue)

  1. S1 布局 + 生成器:定分片键(category / entrypoint)与目录命名;gen:schema / gen:api-surface 等改为输出分片。
  2. S2 门禁 + 锚点:check:authorable-surface 及各 ratchet 闸改读分片;fix(spec): #4650 删除闸门改用树内基线锚点,按 SHA 钉住的离线消费者构建不再硬失败 (#5235) #5304 的 authorable-surface.base.json 锚点机制适配(锚点随之分片或改读聚合视图,authenticity 判据不弱化)。
  3. S3 消费方:MCP spec_changes 工具、docs build、其它读这三个文件的站点改读分片(或运行时聚合函数)。
  4. S4 收尾:.gitattributes 更新(os-regen 路由到分片路径)、退役单体文件、docs/ 说明。

验收判据

路由建议(交分诊座位定标,立单者不打 domain 标签)

落点全在协议工具链文件面(scripts/**、packages/spec/scripts/**、门禁),建议 domain:spec-tooling(C 包 #5163)+ pm:queue。⛔ 实施时不做任何单的 rider;⛔ 不碰 content/docs/releases/。

Refs: #4675 · #5370 · #5371 · #4868 · #5304 · #5163

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions