Skip to content

裁决 R9/R6 schema 所有权与原子切换 - #1902

Merged
Kizunad merged 8 commits into
mainfrom
docs/master-r9-r6-ownership-adjudication
Aug 4, 2026
Merged

裁决 R9/R6 schema 所有权与原子切换#1902
Kizunad merged 8 commits into
mainfrom
docs/master-r9-r6-ownership-adjudication

Conversation

@Kizunad

@Kizunad Kizunad commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • 确立 TypeBox 为全仓 schema source of truth
  • 裁决 R9 负责 cast domain 内容语义,R6 负责全域生成与传输 machinery
  • 区分 contract-only start gate 与 production completion gate
  • 要求旧 receiver 删除和新 consumer 安装原子激活,禁止丢包中间态

Test plan

  • git diff --check
  • 确认仅修改 docs/plans-skeleton/plan-refactor-master-v1.md
  • 对拍四项 architecture ruling 与 Wave 2 依赖口径

Model: cc-sonnet-high

🤖 Generated with Claude Code

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Kizunad, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5ef1d4c0-1839-41c7-b435-41dae17ff2f9

📥 Commits

Reviewing files that changed from the base of the PR and between 42be719 and a4d4ec3.

📒 Files selected for processing (6)
  • docs/plan-refactor-inventory-core-v1.md
  • docs/plans-skeleton/plan-refactor-c2s-gate-v1.md
  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-persistence-slices-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
📝 Walkthrough

Summary by CodeRabbit

  • 文档
    • 更新产品规划文档,明确跨端协议的统一来源、生成与校验要求。
    • 梳理各阶段的职责边界、依赖关系及生产切换条件,支持契约优先工作独立推进。
    • 补充投影功能的启用条件,并完善相关验收与发布流程说明。

Walkthrough

三个计划文档更新了 TypeBox schema 真源、R6/R9 职责、contract-first 交付规则,以及 production activation 和跨轨 cutover 条件。

Changes

Schema 与激活治理

Layer / File(s) Summary
Canonical schema 与生成职责
docs/plans-skeleton/plan-refactor-master-v1.md, docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
TypeBox 被定义为全仓 schema 真源。R6 负责生成、转换、bridge、router、产物同步和版本校验。R9 负责 cast 领域语义、状态处理和具体 consumer。
Contract-first 与 production cutover
docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md, docs/plans-skeleton/plan-refactor-master-v1.md, docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
P0/P1 可独立开展 contract-first 工作。cast_sync、STOP 事件、SkillAvBinding 和 fail-fast 校验先行。生产接线、live activation、bridge 及 dropped-loot projection/page 受 Wave、生成链校验和原子切换条件约束。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

我是兔子,守着 schema 田,
TypeBox 固定形状和边。
contract-first 先落地,
条件满足再切线。
R6 运输,R9 定义,
胡萝卜随计划上线。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了 PR 的主要变更,包括 R9/R6 的 schema 所有权和原子切换规则。
Description check ✅ Passed 描述说明了 schema 事实源、R9/R6 职责、启动门槛和原子激活规则,与变更内容相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/master-r9-r6-ownership-adjudication
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch docs/master-r9-r6-ownership-adjudication

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 53c5c53e45b35ad97f7e6bd64942f77ac82c19d1
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] R9 still declares the superseded R6 P1 dependency

docs/plans-skeleton/plan-refactor-master-v1.md:56 · schema-contracts

The changed master plan makes R9's contract-only start depend on R6 P2 at docs/plans-skeleton/plan-refactor-master-v1.md:56 and says this Wave table is the sole authority at :52. However, the existing R9 plan still declares its dependency as R6 P1 at docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:37, and its P1 explicitly lands the cast contract at :22. Therefore the repository simultaneously permits and forbids starting R9 contract work after R6 P1. A scheduler following the child plan can start R9 before the newly required bridge/router phase, while a scheduler following the master plan will unnecessarily block it; the claimed cross-track ordering and contract-only gate are not a single usable contract.

Root cause: the master plan's new authoritative wave/dependency rule was added without synchronizing the dependent r9 plan's phase dependency and acceptance wording. the same cast contract now has conflicting upstream gates, so the plan family cannot reliably determine when r9 contract work or production preparation is allowed.

[major] Wave authority conflicts with R6 and R9 child-plan dependencies

docs/plans-skeleton/plan-refactor-master-v1.md:56 · concurrency-atomicity

The changed master plan declares the Wave table the sole authority for inter-track ordering and schedules R6 only after R2, while requiring R9 contract-only to wait for R6 P2 (docs/plans-skeleton/plan-refactor-master-v1.md:52-56). The still-present R6 child plan says it has no general hard prerequisite and only recommends R2 first (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:35-40), and the R9 child plan still declares R6 P1, not P2, as its dependency (docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:35-38). Thus following the child plans permits R6/R9 work to start or the R9 contract gate to open earlier than the newly authoritative schedule, while following the master plan contradicts those child-plan dependencies.

Root cause: the master-plan amendment changed the authoritative sequencing and phase dependency but did not synchronize the dependent r6 and r9 plan documents, leaving multiple conflicting ordering contracts for the same cross-track work. this can cause premature contract/production work or unnecessary blocking depending on which plan an executor follows.

[major] R9 contract-only start gate contradicts the contract-first rule

docs/plans-skeleton/plan-refactor-master-v1.md:56 · strict-maintainability

docs/plans-skeleton/plan-refactor-master-v1.md:56 makes R6 P2 a prerequisite for starting R9 contract-only, while docs/plans-skeleton/plan-refactor-master-v1.md:72 says R9 may merge its canonical TypeBox content, reducer/state machine, and unwired declarations first so R6 can generate the mirrors, and :77 explicitly says a missing upstream artifact must not be rewritten as a consumer start gate. These rules produce incompatible scheduling instructions: an R9 contract-only PR cannot both be allowed to proceed before the upstream generated artifacts exist and be blocked on R6 P2.

Root cause: the wave 2 dependency was updated to require an r6 phase for r9 contract work, but the newly added generalized contract-first rule defines that work as explicitly independent of missing upstream production artifacts. the plan therefore has no single authoritative start condition for r9, so orchestration can either unnecessarily block the intended contract-only merge or violate the stated dependency rule.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Line 74: 在 §4.1 中明确列出“R9 四类 concrete consumers”的具体名称,并说明其与
BEGIN、CastSync、PLAY、STOP 消息类型的对应关系;若定义位于
plan-refactor-cast-av-contract-v1.md,则补充双向引用,确保 P1 原子切换核对项无歧义。
- Line 74: 在 §10 或 §5 的工作流说明中补充跨仓库、跨 PR 的执行规则:明确 R6 bridge/router plumbing 与 R9
concrete consumers 若无法纳入同一分支或 PR,必须建立专门的联合 activation merge
unit(或等效协调机制),并在其中完成共同验证后再切换 producer、移除旧 receiver;若无法达成,则继续保留旧
producer/receiver,禁止提前拆除。
- Line 71: Unify the schema-authority terminology across all three plan sites by
establishing “TypeBox canonical content” as the fixed authoritative phrase in
docs/plans-skeleton/plan-refactor-master-v1.md lines 71-71, then using the same
phrase in docs/plans-skeleton/plan-refactor-wire-s2c-v1.md lines 17-17 and
docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md lines 38-38; preserve
the existing meaning that all other artifacts are constrained mirrors.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 22cad99a-c2d5-40de-af5f-05c083d91773

📥 Commits

Reviewing files that changed from the base of the PR and between 460eea7 and 1d7a257.

📒 Files selected for processing (3)
  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.md: 新 plan 头部必须写明接入面:进料、出料、复用的共享类型/event/schema、server/agent/client 跨仓库契约,以及对应的 worldview.md 锚点。
涉及真元、灵气、衰减、逸散、半衰、距离损耗、排斥或吸力的 plan,必须调用 qi_physics;新物理常数和公式必须先扩展 qi_physics,不得在功能 plan 中重复实现。
所有真元/灵气流动必须遵守守恒律并通过 qi_physics::ledger::QiTransfer;释放使用 qi_release_to_zone,吸收使用 qi_excretion,不得凭空生成或销毁真元。
涉及玩家可感知行为的 plan,必须在对应机制阶段中内联可直接实现的粒子、音效、HUD、环境、动画和 narration 规格;不得将视听内容笼统推迟到独立阶段。纯 server 逻辑 plan 例外。
每份 plan 必须列出开放问题;实施前必须追加 §N.1 决议,逐项给出结论、实施方案、边界条件,并以文件:行号和 plan 章节双锚点落地。
scope 大于或等于 4 个 PR 的 plan,必须在末尾包含 §10 实施工作流,并按依赖顺序在一个 plan 内序列化多个 PR,不得拆成多个 plan。
涉及 NBT 建筑、worldgen layout 或复杂视觉资产的 TODO,必须完成三轮提交:(round 1/3)(round 2/3)(round 3/3);终轮提交必须包含拼写准确的 <PROMISE> 担保块。
§10 最末必须包含“单次 consume-plan 全自动到 merge”章节,明确用户提交 /consume-plan 后即可等待最终归档至 docs/finished_plans/

引用世界观内容时统一使用 worldview.md §X L<line> 格式;不得自动修改 docs/worldview.md 或主动回写 docs/library/

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
docs/plans-skeleton/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

新 plan 必须先读取 docs/CLAUDE.md;骨架、Active 和 Finished plan 必须遵循三态流转及规定的阶段状态、Finish Evidence 结构。

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: commit message 必须使用中文,每个逻辑单元一个 atomic commit;agent 生成的 commit 必须带真实模型 Model: <精确模型 id> trailer。
禁止使用 --no-verify--no-gpg-sign、关闭签名配置、未经确认的 force push、hard reset、amend 或交互式 rebase。
禁止留下 auto-stash 产生的孤儿 WIP stash;自动 stash 流程完成后必须恢复自己的 stash。

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
🧠 Learnings (3)
📚 Learning: 2026-07-17T00:31:10.779Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1218
File: docs/plans-skeleton/plan-skill-av-relink-v1.md:1-1
Timestamp: 2026-07-17T00:31:10.779Z
Learning: 在审查该仓库 `docs/plans-skeleton/` 下的“docs-only skeleton plan”创建类 PR 时:先核对 `docs/CLAUDE.md` 中“Plan 消费规范”,并逐份查看本计划文档里的“§10 实施工作流”,确认后续实施阶段是否会遵循“每个 PR 只修改一个 plan”,且实施/归档时不会出现跨 plan 的修改。该规则不适用于用户显式指定、共享调研基线且计划之间存在互相交叉引用的 skeleton plan 同批创建 PR;对这类情况应按实际交叉引用关系放宽,确保仍能按独立或约定的序列化方式推进。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
📚 Learning: 2026-07-17T00:31:13.643Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1218
File: docs/plans-skeleton/plan-skill-av-relink-v1.md:81-85
Timestamp: 2026-07-17T00:31:13.643Z
Learning: 审核 docs/plans-skeleton/*.md 下的 skeleton 草案 PR 时:不得要求作者在“§N 开放问题(P0 决策门前需收口)”核查完成之前提前填写对应的“§N.1 决议”。仅当计划进入 active 且 P0 实施前,已由 Explore agent 并行核查代码现状后,才允许追加“§N.1 决议”,且该决议需包含结论、实施方案、边界条件,并使用“文件:行号 + plan 章节”的双锚点格式。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
📚 Learning: 2026-07-22T02:11:59.191Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1247
File: docs/plans-skeleton/plan-bughunt-animal-air-spawn-gravity-v1.md:0-0
Timestamp: 2026-07-22T02:11:59.191Z
Learning: 在 `docs/plans-skeleton/` 目录下的计划状态行中,若起草日期同时涉及 UTC 与本地日期(例如时区换算后可能跨到不同日期),请在该行中同时标注 UTC 起草日与本地起草日。这样可以避免基于 UTC 的时间基准在 GitHub/CodeRabbit 审查时将本地日期误判为“未来日期”。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
🔇 Additional comments (2)
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)

40-40: 依赖条目表述清晰,与总纲 §3/§4.1 引用一致。

第 40 行明确区分了 "start gate"(Wave 0,schema/generation 可先行)与 "production cutover"(Wave 1/2,需前置条件),并正确引用总纲 §3 Wave 表和 §4.1 裁决。dropped-loot 的 scoped production cutover 条件与 master 文件第 57 行描述一致。

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md (1)

15-19: 接入面条目更新逻辑清晰。

第 15-19 行把 R5/R6/R2 接缝明确标注为 production activation 的输入而非 contract-first 的启动门,并新增 STOP/INTERRUPT 权威事件与 SkillAvBinding fail-fast 校验要求,与总纲 §4.1 point 3(contract-first 可早合)一致。

Comment thread docs/plans-skeleton/plan-refactor-master-v1.md Outdated
1. **Schema authority**:TypeBox source 是 repo-wide schema source of truth;它拥有 shape、discriminant 与 validation semantics。protobuf、generated Rust/Java、Rust conversion、Java bridge、`ServerDataRouter` registration plumbing、dist/JSON Schema/samples 都是生成或受约束 mirror,不得反向定义 TypeBox 为“被动镜像”。
2. **Domain content vs machinery**:R9 负责 author/review cast domain 的 TypeBox message content(BEGIN/CastSync/PLAY/STOP、identity/source/target/outcome)、reducer/state machine、concrete cast consumers 与 `SkillAvBinding`;R6 负责对**所有 wire domain(含 cast)**运行 generation pipeline,并拥有 generated mirrors、`proto_convert.rs`、`ProtoServerDataBridge`、`ServerDataRouter` 通用 registration plumbing 与 channel migration machinery。R9 定义“cast 消息/状态是什么意思”,R6 定义“canonical schema 如何生成、转换和运输”;双方不得复制对方 artifact。
3. **Contract-first 可早合**:R9 contract-first 工作不等待 R6 production machinery;R9 可先合入 canonical TypeBox cast content、reducer/tests 与未启用 declarations,R6 随后据此生成 mirrors/conversions/plumbing。该阶段不得删除旧 receiver、切 producer 或宣称 BEGIN/CastSync/PLAY/STOP live reachable;R6 的 schema/generation 与 contract stub 也不因 R2 production 接线尚未完成而停止。
4. **Atomic production activation**:旧 receiver removal、新 channel producer activation、R6 bridge/router plumbing、R9 四类 concrete consumers 必须在**同一 merge unit**落地并验证。若平台或跨轨 PR 无法做到单一 merge unit,则旧 producer/receiver 必须原样保留,直到新 consumers 已部署且 live-path 验证通过;随后才在最终 activation merge unit 切 producer并删除旧 receiver。禁止 receiver-removed-before-consumer-installed,也禁止长期 dual emit。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

"R9 四类 concrete consumers" 缺少明确定义。

第 74 行提到 "R9 四类 concrete consumers 必须在同一 merge unit 落地并验证",但本文件未说明这"四类"具体指哪些 consumer。第 72 行只列出了四种消息类型(BEGIN/CastSync/PLAY/STOP),不能确定"四类 consumers"是否与这四种消息一一对应。

实施者在 P1 阶段执行原子切换时,需要明确知道要核对哪四类 consumer,否则容易漏项或产生歧义。建议在 §4.1 中显式列出这四类 consumer 的名称,或在 plan-refactor-cast-av-contract-v1.md 中补充对应定义并双向引用。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans-skeleton/plan-refactor-master-v1.md` at line 74, 在 §4.1 中明确列出“R9
四类 concrete consumers”的具体名称,并说明其与 BEGIN、CastSync、PLAY、STOP 消息类型的对应关系;若定义位于
plan-refactor-cast-av-contract-v1.md,则补充双向引用,确保 P1 原子切换核对项无歧义。

🧹 Nitpick | 🔵 Trivial

跨仓库/跨 PR 的"同一 merge unit"落地在操作上需要额外说明。

第 74 行要求"旧 receiver removal、新 channel producer activation、R6 bridge/router plumbing、R9 四类 concrete consumers 必须在同一 merge unit 落地并验证"。若 R6 与 R9 分属不同代码仓库或不同 PR,GitHub 原生不支持多 PR 原子合并。文本给出了退路(旧 producer/receiver 保留直到新 consumer 部署验证后再切换),但没有说明如何在实施阶段验证"同一 merge unit"这一约束本身是否可达(例如是否要求 R6 与 R9 在同一分支/同一 PR 完成)。

建议在 §10 或 §5(工作流)补充:当 R6/R9 分属不同 tmux 会话/分支时,如何具体执行"同一 activation merge unit",例如是否需要一个专门的联合 PR。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans-skeleton/plan-refactor-master-v1.md` at line 74, 在 §10 或 §5
的工作流说明中补充跨仓库、跨 PR 的执行规则:明确 R6 bridge/router plumbing 与 R9 concrete consumers
若无法纳入同一分支或 PR,必须建立专门的联合 activation merge unit(或等效协调机制),并在其中完成共同验证后再切换
producer、移除旧 receiver;若无法达成,则继续保留旧 producer/receiver,禁止提前拆除。

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 1d7a257ab7d1f72261aa290a8901df1be3e1dc43
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] R6 has no phase that delivers its newly required generation pipeline

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:16 · strict-maintainability

The changed cross-repository contract makes R6 responsible for running a TypeBox-driven generation pipeline that emits protobuf, generated Rust, Rust conversions, Java bridge/router plumbing, dist JSON Schema, and samples. However, the phase list that defines R6's work contains no phase to design, implement, migrate to, or verify that pipeline: P0 inventories bypass channels/builders and freezes scope/snapshot contracts; P1 implements emit/scope; P2 restructures the client bridge/router; P3 migrates channels; P4 adds sample pins and long-tail emit migration; P5 is bot acceptance. Thus the plan can complete every listed phase and acceptance scenario while the newly claimed generation pipeline does not exist, leaving TypeBox unable to serve as the stated source of truth and requiring mirrors/converters to continue being maintained independently.

Root cause: the amendment broadens r6's canonical deliverable to a repo-wide schema generation pipeline but only updates overview, ownership, and dependency prose; it does not add a corresponding implementation phase or acceptance evidence to the authoritative r6 plan.

补足 R6 P1 contract-only pipeline skeleton 与 P3 generated mirrors、ServerDataRouter production integration 的交付锚点,并同步波次依赖。

Model: claude-sonnet-5
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 55d992f3a5a70890da0c7f082fd0c1a5fa261e8a
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] R6 P1/P3 dependencies refer to deliverables absent from the R6 plan

docs/plans-skeleton/plan-refactor-master-v1.md:44 · correctness

The changed master table and Wave rules assign R6 P1 to a contract-only TypeBox generation skeleton and R6 P3 to productionized generated proto/Rust/Java mirrors plus bridge/router integration (docs/plans-skeleton/plan-refactor-master-v1.md:44,55,57). The actual R6 phase list still defines P1 as emit-builder/scope work, P2 as client bridge consolidation, P3 as migration of 28 bypass channels, and P4 as contract samples (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:21-25); it contains no phase that owns the promised generation skeleton or generated-mirror productionization. This also violates the newly added rule that a track may depend only on a phase/artifact that really exists under the same name (docs/plans-skeleton/plan-refactor-master-v1.md:77). Following the plans therefore leaves R9's Wave 2 activation waiting for an R6 P3 artifact that R6 P3 does not deliver, while the generation work has no executable phase or acceptance criteria in its owning plan.

Root cause: the master plan reassigned meanings to r6 p1 and p3 without updating the authoritative r6 child plan's phase definitions, producing an internally inconsistent dependency graph and leaving the new schema-generation deliverables unowned.

[major] Fallback cutover requires live verification before any live traffic exists

docs/plans-skeleton/plan-refactor-master-v1.md:73 · concurrency-atomicity

At docs/plans-skeleton/plan-refactor-master-v1.md:73, the fallback for platforms that cannot deploy one merge unit says to preserve the old producer/receiver until the new consumers are deployed and the live path has been verified, and only then activate the new producer; the same paragraph also forbids dual emission. With the new producer inactive and dual emission forbidden, deployed consumers receive no new-channel traffic, so their live producer-to-router-to-consumer path cannot be verified. Activating the producer to obtain that evidence violates the stated prerequisite, while removing the old path first violates the receiver-before-consumer rule. The R9 child plan delegates activation entirely to this procedure (docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:22,37), so no surrounding phase supplies a missing canary or shadow-delivery mechanism.

Root cause: the non-atomic deployment fallback has a circular ordering dependency: successful live verification requires the new producer to emit, but producer activation is prohibited until that verification succeeds, and the only obvious bridge (bounded dual/shadow emission) is categorically forbidden. thus the plan provides no executable cutover sequence when server, bridge/router, and client consumers cannot become active atomically.

[major] Atomic cast activation requires undefined BEGIN and PLAY consumers

docs/plans-skeleton/plan-refactor-master-v1.md:72 · correctness

The new cast-wire ruling defines the R9 contract as BEGIN/CastSync/PLAY/STOP and requires four corresponding concrete consumers in the atomic activation (docs/plans-skeleton/plan-refactor-master-v1.md:72-74). The R9 plan's contract phase only specifies added cast_sync fields and a STOP event, while its shared lifecycle contract names STOP/INTERRUPT (docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:17,23); BEGIN and PLAY are never defined as messages, states, deliverables, tests, or consumers anywhere in that plan. Consequently the activation gate cannot be evaluated consistently: an implementation matching R9 P1 can omit BEGIN/PLAY yet fail the master's four-consumer requirement, while implementing them has no domain semantics or acceptance evidence to follow.

Root cause: the master amendment introduced two additional cast contract concepts and an activation requirement without adding them to the r9 owning plan's contract, phases, or acceptance criteria.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 1a45b2f29541b041d03aadbc5572f1fa1f9b74de
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] Pin TypeBox-to-generated-artifact synchronization

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:16 · testing

The changed cross-stack contract claims TypeBox is canonical and that R6's generation pipeline synchronizes protobuf, generated Rust, conversion, Java bridge, router plumbing, dist JSON Schema, and samples, but the stated tests only perform S2C sample round-trips. A concrete implementation can modify TypeBox while leaving one generated mirror or the committed dist artifact stale, and those round-trips can still pass when they exercise the stale mirror; no TypeBox-to-generated-artifact freshness/drift test or negative mismatch check is required.

Root cause: the plan changes the schema source-of-truth and adds a multi-artifact generation contract without specifying regression protection that proves generated artifacts were derived from the current typebox source. sample conversion coverage alone does not detect stale generated outputs when both producer and consumer use the same stale representation.

[major] R6 does not phase or verify the newly owned schema generation chain

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:16 · wiring

plan-refactor-wire-s2c-v1.md:16 newly assigns R6 a repo-wide generation pipeline and synchronization of protobuf, generated Rust, Rust conversion, Java bridge, router plumbing, dist/ JSON Schema, and samples. However, the R6 phase deliverables at plan-refactor-wire-s2c-v1.md:20-25 do not assign those generated artifacts or the generation/synchronization step to any phase, nor define acceptance evidence for them. P4 only mentions sample pin coverage and does not establish that the listed mirrors are generated and synchronized from the TypeBox source. Because plan-refactor-master-v1.md:71-77 makes the owner track plan authoritative for concrete artifact, phase, and acceptance definitions, this leaves the newly claimed cross-stack producer-to-consumer path without an actionable owner/phase contract.

Root cause: the change expands r6 ownership from the wire/client refactor to the typebox generation and all cross-stack mirrors, but the r6 plan's phase and acceptance sections were not updated to define that machinery's implementation, artifact inventory, ordering, or verification. the plan can therefore be considered complete while the schema producer, generated representations, and consumers remain disconnected or stale.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Around line 55-57: 为三个 plan 补充统一的 §10 实施工作流:在
docs/plans-skeleton/plan-refactor-master-v1.md 的总纲中新增总纲级工作流,并将现有 flash-review
清算流程移为子章节;在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 的 §10 中列出 R6 的多 PR
依赖顺序、production cutover 条件及最终归档步骤;在
docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md 的 §10 中列出 R9 的多 PR
依赖顺序并绑定 Wave、owner 与 atomicity 条件。三处 §10 末尾均必须包含“单次 consume-plan 全自动到 merge”章节。
- Around line 9-10:
在计划头部补充结构化的“接入面”章节,明确列出进料、出料、复用的共享类型、event、schema,server/agent/client
的跨仓库契约,以及各项对应的 worldview 锚点;内容需与 R6、R9 子计划保持一致,并保留现有 TypeBox source-of-truth 约束。

In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Line 18: 将 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 第18行的 R6 amendment
obligation 改为可执行的 schema generation phase,明确列出 source、mirrors、pin、CI 验证与
acceptance evidence,并定义完成条件;同时更新 docs/plans-skeleton/plan-refactor-master-v1.md
第72行,引用该具体 phase,并将其完成证据明确设为 production cutover gate。
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ee1d469d-21b7-46a9-aa4f-0623afa86fb1

📥 Commits

Reviewing files that changed from the base of the PR and between 1d7a257 and 42be719.

📒 Files selected for processing (3)
  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
docs/**/*.md

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.md: 新 plan 头部必须写明接入面:进料、出料、复用的共享类型/event/schema、server/agent/client 跨仓库契约,以及对应的 worldview.md 锚点。
涉及真元、灵气、衰减、逸散、半衰、距离损耗、排斥或吸力的 plan,必须调用 qi_physics;新物理常数和公式必须先扩展 qi_physics,不得在功能 plan 中重复实现。
所有真元/灵气流动必须遵守守恒律并通过 qi_physics::ledger::QiTransfer;释放使用 qi_release_to_zone,吸收使用 qi_excretion,不得凭空生成或销毁真元。
涉及玩家可感知行为的 plan,必须在对应机制阶段中内联可直接实现的粒子、音效、HUD、环境、动画和 narration 规格;不得将视听内容笼统推迟到独立阶段。纯 server 逻辑 plan 例外。
每份 plan 必须列出开放问题;实施前必须追加 §N.1 决议,逐项给出结论、实施方案、边界条件,并以文件:行号和 plan 章节双锚点落地。
scope 大于或等于 4 个 PR 的 plan,必须在末尾包含 §10 实施工作流,并按依赖顺序在一个 plan 内序列化多个 PR,不得拆成多个 plan。
涉及 NBT 建筑、worldgen layout 或复杂视觉资产的 TODO,必须完成三轮提交:(round 1/3)(round 2/3)(round 3/3);终轮提交必须包含拼写准确的 <PROMISE> 担保块。
§10 最末必须包含“单次 consume-plan 全自动到 merge”章节,明确用户提交 /consume-plan 后即可等待最终归档至 docs/finished_plans/

引用世界观内容时统一使用 worldview.md §X L<line> 格式;不得自动修改 docs/worldview.md 或主动回写 docs/library/

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
docs/plans-skeleton/**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

新 plan 必须先读取 docs/CLAUDE.md;骨架、Active 和 Finished plan 必须遵循三态流转及规定的阶段状态、Finish Evidence 结构。

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: commit message 必须使用中文,每个逻辑单元一个 atomic commit;agent 生成的 commit 必须带真实模型 Model: <精确模型 id> trailer。
禁止使用 --no-verify--no-gpg-sign、关闭签名配置、未经确认的 force push、hard reset、amend 或交互式 rebase。
禁止留下 auto-stash 产生的孤儿 WIP stash;自动 stash 流程完成后必须恢复自己的 stash。

Files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
🧠 Learnings (3)
📚 Learning: 2026-07-17T00:31:10.779Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1218
File: docs/plans-skeleton/plan-skill-av-relink-v1.md:1-1
Timestamp: 2026-07-17T00:31:10.779Z
Learning: 在审查该仓库 `docs/plans-skeleton/` 下的“docs-only skeleton plan”创建类 PR 时:先核对 `docs/CLAUDE.md` 中“Plan 消费规范”,并逐份查看本计划文档里的“§10 实施工作流”,确认后续实施阶段是否会遵循“每个 PR 只修改一个 plan”,且实施/归档时不会出现跨 plan 的修改。该规则不适用于用户显式指定、共享调研基线且计划之间存在互相交叉引用的 skeleton plan 同批创建 PR;对这类情况应按实际交叉引用关系放宽,确保仍能按独立或约定的序列化方式推进。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
📚 Learning: 2026-07-17T00:31:13.643Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1218
File: docs/plans-skeleton/plan-skill-av-relink-v1.md:81-85
Timestamp: 2026-07-17T00:31:13.643Z
Learning: 审核 docs/plans-skeleton/*.md 下的 skeleton 草案 PR 时:不得要求作者在“§N 开放问题(P0 决策门前需收口)”核查完成之前提前填写对应的“§N.1 决议”。仅当计划进入 active 且 P0 实施前,已由 Explore agent 并行核查代码现状后,才允许追加“§N.1 决议”,且该决议需包含结论、实施方案、边界条件,并使用“文件:行号 + plan 章节”的双锚点格式。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
📚 Learning: 2026-07-22T02:11:59.191Z
Learnt from: Kizunad
Repo: Kizunad/Bong PR: 1247
File: docs/plans-skeleton/plan-bughunt-animal-air-spawn-gravity-v1.md:0-0
Timestamp: 2026-07-22T02:11:59.191Z
Learning: 在 `docs/plans-skeleton/` 目录下的计划状态行中,若起草日期同时涉及 UTC 与本地日期(例如时区换算后可能跨到不同日期),请在该行中同时标注 UTC 起草日与本地起草日。这样可以避免基于 UTC 的时间基准在 GitHub/CodeRabbit 审查时将本地日期误判为“未来日期”。

Applied to files:

  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
  • docs/plans-skeleton/plan-refactor-master-v1.md
🔇 Additional comments (3)
docs/plans-skeleton/plan-refactor-master-v1.md (1)

44-50: LGTM!

Also applies to: 63-65

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)

17-17: 🗄️ Data Integrity & Integration

明确 TypeBox source 与 agent/packages/schema 的关系。

Line 17 规定 agent 只消费生成结果。但现有上下文显示 agent/packages/schema/src/client-request.ts 的 Line 1131 定义 TypeBox union,agent/packages/schema/src/schema-registry.ts 的 Line 634 导出 schema registry。请在 R6 P0 或 generation phase 中明确该目录是 canonical TypeBox source 还是 generated mirror,并说明 C2S、S2C 如何共享同一 source。否则实施者可能创建第二个 schema source,或错误删除现有 source。

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md (1)

23-23: 🗄️ Data Integrity & Integration

明确 R9 P1 的 TypeBox-first 和 contract-only 边界。

Line 23 直接描述补充 cast_sync 字段、STOP 事件、SkillAvBinding 注册表和 fail-fast 校验,但没有明确 cast_sync/STOP 必须先修改 TypeBox canonical content,再由 R6 生成并 pin mirrors。也没有说明 registry 和 fail-fast 在 P1 中是 declared、unwired、test-only,还是会进入 production。请写明该顺序,并禁止 P1 提前启用 production traffic 或 live consumer。

Comment on lines +9 to +10
- **玩法/运行时重构只动 `server/` + `client/`**。`worldgen/`、`library-web/` 不动,agent runtime/prompt/arbiter 等行为域独立保留(§6.11-6.12);跨端 wire 的 TypeBox schema source 是本范围的唯一基础设施例外,按 §4.1 分 owner
- **TypeBox source 是 repo-wide schema source of truth**。对外契约(Redis IPC、proto schema)原则上不动形状;确需变更时先改 TypeBox canonical content,再由 R6-owned generation/transport machinery 按 R6 plan 同步其 mirrors,并走必要的 breaking checks。**不写兼容层**——production activation 服从 §4.1 不变量

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

补齐总纲的“接入面”。

该计划头部没有结构化列出进料、出料、复用的共享类型/event/schema、server/agent/client 跨仓库契约和 worldview 锚点。Line 10 只声明 TypeBox source。请在计划头部增加完整的“接入面”,并与 R6、R9 子计划对齐。

As per coding guidelines: 新 plan 头部必须写明接入面:进料、出料、复用的共享类型/event/schema、server/agent/client 跨仓库契约及对应的 worldview 锚点。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans-skeleton/plan-refactor-master-v1.md` around lines 9 - 10,
在计划头部补充结构化的“接入面”章节,明确列出进料、出料、复用的共享类型、event、schema,server/agent/client
的跨仓库契约,以及各项对应的 worldview 锚点;内容需与 R6、R9 子计划保持一致,并保留现有 TypeBox source-of-truth 约束。

Source: Coding guidelines

Comment on lines +55 to +57
- **Wave 0(立即并行)**:V(bot 骨干 + build token 最先)、R3、R5、R2、registry-datafication;同时全部轨道的 P0(设计收口 + 吸收清单验真)都可开工;R6 的 contract-first 工作与 R9 的 cast domain contract-first 工作均可在本波次按各自 plan 开工,不等待 production activation 条件。
- **Wave 1**:R6、R7(R2 合入后)、R1(R3 P1 合入后)按各自 plan 推进;涉及 R2-owned production 接缝的工作须等待 R2 P1。
- **Wave 2**:R4、R9 production activation(R5、R6、R2 的所属责任按各自 plan 就绪后,服从 §4.1 的 ownership 与 atomicity invariants)、R10(R3 P1 后)。本表只裁决跨轨顺序与 activation 边界;各轨具体 deliverable inventory、phase mapping 与验收证据由各自 plan 定义,不在总纲重述。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

为三份 plan 补充同一套 §10 实施工作流

三个 plan 的 scope 都超过 4 个 PR,但没有按依赖顺序序列化实施 PR。总纲现有 §10 还是 flash-review issue 清算流程。请完成以下修改:

  • docs/plans-skeleton/plan-refactor-master-v1.md#L55-L57:增加总纲级 §10 实施工作流,并将现有 flash-review 流程移出该章节或改为子章节。
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L41-L41:列出 R6 的多 PR 依赖顺序、production cutover 条件和最终归档步骤。
  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md#L38-L38:列出 R9 的多 PR 依赖顺序,并绑定 Wave、owner 和 atomicity 条件。

每份 plan 的 §10 末尾都必须包含“单次 consume-plan 全自动到 merge”章节。

As per coding guidelines: scope 大于或等于 4 个 PR 的 plan 必须包含 §10 实施工作流,且 §10 最末必须包含“单次 consume-plan 全自动到 merge”章节。

📍 Affects 3 files
  • docs/plans-skeleton/plan-refactor-master-v1.md#L55-L57 (this comment)
  • docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L41-L41
  • docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md#L38-L38
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/plans-skeleton/plan-refactor-master-v1.md` around lines 55 - 57, 为三个
plan 补充统一的 §10 实施工作流:在 docs/plans-skeleton/plan-refactor-master-v1.md
的总纲中新增总纲级工作流,并将现有 flash-review 清算流程移为子章节;在
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 的 §10 中列出 R6 的多 PR
依赖顺序、production cutover 条件及最终归档步骤;在
docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md 的 §10 中列出 R9 的多 PR
依赖顺序并绑定 Wave、owner 与 atomicity 条件。三处 §10 末尾均必须包含“单次 consume-plan 全自动到 merge”章节。

Source: Coding guidelines

Comment thread docs/plans-skeleton/plan-refactor-wire-s2c-v1.md Outdated
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 42be719cf670c491b7862f0370343a7bc56324c0
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] Dropped-loot cutover gate violates the new sole Wave authority

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:41 · strict-maintainability

The changed master now declares §3 the sole authority for every inter-track start/order/cutover dependency and explicitly forbids child plans from adding ordering not present there (plan-refactor-master-v1.md:53,76). Section §3 only places R6 generally in Wave 1 and R10 generally in Wave 2 after R3 P1 (plan-refactor-master-v1.md:55-57); it never orders the R6 dropped-loot cutover after R10 P2a and R3 P4. Nevertheless this changed R6 line makes those two merges mandatory before that production cutover. A scheduler following the stated sole authority can therefore release R6 work without the child-only gates, while one following R6 blocks it, so the plan family has two conflicting sources of sequencing truth. The dependency existed in earlier prose, but this PR exposes the contradiction by introducing the sole-authority invariant while also rewriting and retaining the child-only gate instead of adding it to §3.

Root cause: the pr centralizes all cross-track ordering in the master wave table but leaves a concrete r10/r3 production ordering rule exclusively in the r6 child plan.

[major] Contract-first cast schema and reducer lack required pin tests

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:22 · testing

P1 now allows the cast contract to land contract-first with new source/target/phase fields and authoritative STOP semantics, and the master assigns R9 the cast TypeBox validation semantics plus reducer/state machine. However, the plan's only automated acceptance scenarios are cast_registry_reachability, which merely observes CASTING/cast_sync emission, cast_stop_semantics, which checks that a STOP event is sent for three termination causes, and cast_av_uniqueness. There is no dedicated positive/negative TypeBox pin for required fields, invalid or unknown phase values, or every lifecycle enum variant, and no reducer transition test for valid and invalid transitions. Thus an implementation that emits the new fields but accepts an invalid phase, drops one field during decoding, or mishandles STOP/INTERRUPT in the client reducer would satisfy every listed test. Existing fail-fast AV registration checks do not validate the wire schema or reducer, and this gap is exposed by this PR's newly permitted contract-first deliverable.

Root cause: the changed p1 deliverable expands the observable typebox and state-machine contract without adding the dedicated schema enum/negative pin tests and reducer transition tests required to protect that contract; the later bot scenarios only verify selected emitted events, not validation and consumption semantics.

[major] R6 still has no phase that delivers the required schema generation chain

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:18 · wiring

The changed master plan requires the R6 plan to add an R6-owned phase that defines, delivers, and verifies the schema generation chain, and says dependent production cutovers cannot be scheduled until that phase is defined and complete (plan-refactor-master-v1.md:72). The corresponding changed R6 plan only records a future "Tracked amendment obligation" at line 18. Its actual phase list at lines 22-27 still contains only P0 inventory/design, P1 emit/scope, P2 client bridge, P3 bypass consolidation, P4 contract pins, and P5 bot acceptance; none defines the generation-chain artifact inventory, sequencing, or acceptance evidence. Consequently the plan named by this docs-only change remains incomplete and every cutover relying on the newly declared canonical TypeBox pipeline is indefinitely blocked by the plan's own gate.

Root cause: the required r6 schema-generation-chain amendment was deferred as an obligation instead of being incorporated into the r6 phase plan in this change, despite the master plan making that defined phase a prerequisite for production wiring.

[major] Dropped-loot producer and atomic page consumer remain split across P1/P2

docs/plans-skeleton/plan-refactor-master-v1.md:73 · concurrency-atomicity

The new master invariant requires a channel's producer, transport plumbing, all consumers, and old-path removal to activate in the same merge unit (docs/plans-skeleton/plan-refactor-master-v1.md:73). The R6 phase plan still activates paginated dropped-loot sending through the shared builder in P1 (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:22), but does not add the client behavior that collects one revision's complete page set and atomically replaces the old view until P2 (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:23). The changed dependency clause at line 40 gates P1 only on the R10 metadata provider and R3 hydration consumer; it does not gate producer activation on the P2 wire consumer or require P1 and P2 to be one merge unit. Therefore, following the phases as written can put the paginated producer live before the consumer that rejects missing or mixed revisions, exposing clients to partial/stale dropped-loot views. The surrounding plan does not prevent this: P0 only freezes the envelope, and line 40 explicitly permits this scoped production cutover once the R10/R3 prerequisites merge. This inconsistency is exposed by this PR's newly added atomic-activation contract without synchronizing the R6 phase boundaries.

Root cause: the master plan introduces a same-merge-unit atomic cutover invariant, but the owner plan continues to split the dropped-loot producer activation and its required atomic page-assembly consumer across sequential phases, with no coupling gate between them.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: 752558b3ac0a54c265d3a01700c2b56209e4da8b
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] Retarget downstream dropped-loot gates from R6 P1 to the new P3 activation

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:22 · schema-contracts

The changed P1 definition now limits dropped-loot to a paginated envelope plus producer/consumer API stubs and pins, explicitly says it does not send, and line 24 moves the real paginated producer, generated conversion/router transport, and revision-aware store replacement to P3. However, the unchanged owner plans still use “R6 P1 recipient projection/page” as the completed authorization consumer: docs/plan-refactor-inventory-core-v1.md:90,94,98 allows R10 P2b OwnerOnly private-writer activation after R6 P1, and docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:28,59 requires hydration to precede R6 P1 projection/page. With the new phase meaning, the R3 ordering is contradicted by Wave-0 P1, and R10's gate can be satisfied by an unwired test stub before the real P3 recipient filter/router/store path exists. Nothing in the changed master gate at docs/plans-skeleton/plan-refactor-master-v1.md:57 prevents that path: it gates R6 dropped-loot P3 on R10 P2a and R3 P4, but does not make R6 P3 a prerequisite of R10 P2b. Thus following the documents literally can activate private drop producers while the production consumer remains the old non-recipient-aware path, exposing OwnerOnly entries or making them unavailable until a later merge. This drift is introduced by moving the production consumer from R6 P1 to P3 without updating the cross-track phase references.

Root cause: the diff reassigns “r6 p1” from the production recipient projection/page consumer to declared, unwired stubs, but leaves r3 and r10 contracts referring to the old phase identity. the master amendment also does not restate the corresponding r10 p2b gate in terms of r6 p3 production activation, so the plan family no longer has one consistent producer-to-consumer cutover contract.

[major] R9 P1 omits the mandatory first-commit cast contract pin suite

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:22 · testing

The changed P1 deliverable introduces the cast_sync source/target/phase schema, STOP event, and binding registry but names no contract pin tests. The only R9 test coverage listed later is deferred to P4 bot acceptance: cast_stop_semantics checks only STOP delivery for interrupt/flee/disconnect, while no test pins required-field rejection, every phase/discriminant (including INTERRUPT), unknown variants, legal/illegal reducer transitions, or registry fail-fast behavior. This directly conflicts with the new master invariant at docs/plans-skeleton/plan-refactor-master-v1.md:74, which requires those pins in the first commit and explicitly makes cast schema/reducer mandatory targets. Under the R9 plan as written, a P1 implementation that accepts a cast_sync missing target, rejects or ignores INTERRUPT, or permits an illegal reducer transition can satisfy all named P1 deliverables and the eventual STOP-only bot scenario.

Root cause: the owner track was updated to start contract-first implementation in p1 without bringing the master plan's mandatory first-commit schema, reducer/state-machine, and registry pin-test acceptance criteria into that phase. because the master also says concrete acceptance evidence belongs in the owner plan, the cross-reference does not supply an executable r9 test inventory and leaves the newly changed contract materially unprotected.

[major] Rephased dropped-loot activation leaves canonical R3/R10 dependencies stale

docs/plans-skeleton/plan-refactor-master-v1.md:56 · strict-maintainability

The changed Wave table and R6 plan move dropped-loot production projection/transport to R6 P3: P1 now permits only an unwired pagination envelope and producer/consumer stubs, P2 only an unwired reducer, and P3 performs the atomic producer/router/store activation. However, the unchanged owner plans still make the live dependency R6 P1: docs/plan-refactor-inventory-core-v1.md:8,89,93,97 allows R10 P2b OwnerOnly private-writer activation after “R6 P1 recipient projection/page,” and docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:27,58 requires hydration before “R6 P1 projection/page.” Under the new phase definitions, R6 P1 can complete before R3 P4 and provides no production visibility consumer, so the R10 sequence can treat test-only stubs as satisfying the privacy gate and activate OwnerOnly writers before the authoritative filtering path is live. Conversely, R3 still documents an ordering constraint against a Wave-0 phase that the changed master explicitly allows to start independently. The changed files do not update those owner-plan references, and the master itself says owner plans are authoritative for phase/artifact details.

Root cause: the diff rephases dropped-loot projection from r6 p1/p2 to the atomic r6 p3 production activation but does not migrate the canonical r10 and r3 cross-track dependency references. this leaves two meanings for “r6 p1 projection/page” and makes a test-only contract phase appear to satisfy a production privacy/consumer prerequisite.

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Central review

Decision: request_changes
Reviewed head: a4d4ec392cb88b39369b68b76bdf696a9f012f05
Policy: project-review-policy.v2
Policy SHA-256: ba594fb26bae4f60ebc26a470e1a7b55bfa5bf3ecb1313dd89c22721e772bcbf

Validated findings

[major] Contract-first schema commits cannot pass the mandatory freshness gate

docs/plans-skeleton/plan-refactor-master-v1.md:73 · correctness

The new contract says R9's P1 TypeBox cast-schema change may merge independently in Wave 0 and remain declared/unwired/test-only (lines 72-75), while every generated or constrained artifact must carry a pin matching the current TypeBox source and CI must fail closed on any stale mirror (line 71). The same phase split assigns mirror generation/refresh to R6 P3 rather than the early R9 commit (line 72; docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:24). Therefore adding source/target/phase and STOP/INTERRUPT to canonical TypeBox in R9 P1 immediately makes the existing protobuf, Rust, Java, dist, and sample artifacts stale; the mandated CI gate rejects that commit, but R9 cannot update R6-owned mirrors and R6 does not refresh them until P3. Declaring the schema unwired does not avoid a freshness check explicitly defined against the current source.

Root cause: the plan separates a canonical schema-source modification from regeneration of its committed pinned mirrors, while simultaneously requiring source-to-mirror freshness on every commit. contract-first wiring status and artifact freshness are independent concerns, so the proposed early schema phase cannot pass its own ci contract.

[major] Production INTERRUPT emission is not covered by the cast acceptance suite

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:23 · testing

The changed P1 contract requires distinct authoritative STOP and INTERRUPT events and unit pins only for schema acceptance and reducer transitions. However, the named production-path scenario at line 43 still drives interruption, escape, and disconnect and asserts only that a STOP event is emitted. An implementation that never produces INTERRUPT (mapping every terminal path to STOP) would satisfy every listed TypeBox pin, reducer pin, registry pin, and this bot scenario because the unit tests can inject INTERRUPT directly without proving a server producer emits it. The observable changed contract, namely authoritative INTERRUPT delivery through server-to-client wiring, therefore has no producer-to-wire-to-consumer regression protection.

Root cause: the contract-first suite validates that interrupt can be decoded and reduced, but the end-to-end acceptance scenario was not updated to require any real interruption path to emit interrupt rather than stop.

[major] P3 activates wire contracts before their semantic parity tests

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:23 · schema-contracts

R6 P3 activates generated protobuf/Rust conversion/Java bridge/router artifacts and migrates all 28 channels into production (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:23), but the exhaustive 113 C2S/144 S2C positive/negative sample parity suite is only scheduled for the later P4 (:24). P1's content pins are limited to dropped-loot pagination cases (:21); its freshness/hash/determinism checks can all pass when a converter consistently generates the wrong enum spelling, uint64 JSON representation, flattened coordinate shape, or field access. This repository has already documented exactly those production bridge failures in docs/finished_plans/plan-wire-format-bridge-v1.md:29-37. Thus a non-dropped-loot channel can be activated in P3 with a misdecoded payload and no required end-to-end contract test fails until P4. This also contradicts the newly added master invariant that schema artifacts carry their pin tests in their first submission (docs/plans-skeleton/plan-refactor-master-v1.md:74).

Root cause: the plan separates production activation from the semantic cross-stack sample tests that validate the generated producer-to-protobuf-to-json/client contract. artifact freshness and source pins prove reproducibility, not that boundary conversions preserve the intended wire shape.

[major] Cast contract fields have no defined production activation chain

docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:23 · wiring

The changed P1 now declares source/target/phase and STOP/INTERRUPT as contract-first artifacts and requires only isolated TypeBox, reducer, and registry pins. The remaining R9 phases never assign a production merge unit that updates the real server producer, generated/protobuf mirror, Rust conversion, Java bridge/router, and CastSyncHandler consumer together. This is not supplied elsewhere: R6 P3 explicitly defines such an atomic activation only for dropped-loot (docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:24), while the master says concrete deliverables and phase mapping must come from the owner plans (docs/plans-skeleton/plan-refactor-master-v1.md:72). The current live chain demonstrates why this is required: CastSyncV1 still has only phase/slot/duration/started_at/outcome (server/src/schema/combat_hud.rs:99), protobuf mirrors those five fields (proto/bong/envelope.proto:1600), and the client still infers source locally (client/src/main/java/com/bong/client/network/CastSyncHandler.java:35). The P4 bot checks only that a cast emits some cast_sync and that STOP is emitted (docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md:42); it does not require source/target to traverse the production producer-to-wire-to-consumer chain. Consequently, an implementation can satisfy every stated P1 pin with manually constructed contract/reducer data and satisfy the existing cast_sync bot assertion while production continues emitting the old payload and the source-drift bug remains. This gap is introduced by this diff's change from a P1 contract “走 R6 契约流程” plus explicit R6 dependency to independent, unwired contract-first work without adding a later cast activation deliverable.

Root cause: the plan separates the cast contract from production activation but delegates activation details to owner plans without any owner plan actually defining the cast-specific producer, transport, conversion, router, and consumer activation unit or an end-to-end acceptance assertion for the new fields.

[major] Sole-authority Wave table omits required child-plan dependencies

docs/plans-skeleton/plan-refactor-master-v1.md:53 · strict-maintainability

The new rule says §3 is the sole authority for every inter-track start/order/cutover claim and that child plans may not add prerequisites absent from this table. However, the same diff leaves the Wave table with only R10 (R3 P1 后) plus the dropped-loot P3/P2b gates (line 57), while the changed inventory plan prescribes additional cross-track ordering such as R5 P3 + R6 P4 → R10 P3 → R4 ... → R10 P2b (docs/plan-refactor-inventory-core-v1.md:98), and the changed persistence plan requires R3 P4 hydration to precede R6 P3 (docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:28). Thus an implementer following the declared sole authority can schedule R10 P3 without the R5/R6 providers, while an implementer following the owner plans is forbidden to do so. The document itself says child-plan details are not restated in §3, so those required orderings have no valid authoritative home under the newly introduced rule.

Root cause: the change simultaneously centralizes all cross-track sequencing in the master wave table and delegates unstated phase-level cross-track prerequisites to owner plans. the wave table was not expanded to contain the dependencies that the edited child plans still require, making the plan family internally contradictory and the production schedule non-deterministic.

[major] The sole-authority Wave table omits required R10 ordering

docs/plan-refactor-inventory-core-v1.md:98 · correctness

This changed sequence still imposes inter-track prerequisites such as R10 P2a waiting for R3 P2, R10 P3 waiting for R5 P3/R6 P4, R4 waiting for R10 P3, and R10 P2b waiting for all of those. The newly added master rule says the §3 Wave table is the sole authority and track plans may not add cross-track prerequisites (docs/plans-skeleton/plan-refactor-master-v1.md:53, reiterated at line 77), but §3 only states that R10 starts after R3 P1 plus the two dropped-loot activation boundaries (docs/plans-skeleton/plan-refactor-master-v1.md:57); it does not contain most of this sequence. Thus an implementer following the declared sole authority may start R10 P2a/P3 before the persistence, qi attrition, or receipt APIs required by this plan exist, while an implementer following this line violates the master rule. The edited plan family has no internally valid schedule.

Root cause: the change introduced a centralized-only dependency policy without moving all existing required cross-track ordering into the centralized wave table or removing it from the child plan. the two documents now define incompatible sources of scheduling truth.

[major] No integration test locks the dropped-loot single-path atomic cutover

docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:24 · testing

The new P3 contract requires a single atomic cutover that enables the paginated producer, generated conversion/router path, and revision assembler while deleting the old producer and receiver. The listed R6 acceptance scenarios cover scope, dimension resync, schema sample round-trips, and join snapshots (lines 44-47); the inventory scenario only states recipient pagination/visibility (docs/plan-refactor-inventory-core-v1.md:125). None asserts that exactly one production transport path handles dropped-loot after activation or that the legacy producer/receiver is absent. Consequently, a P3 implementation that activates the generated route but leaves the legacy route live can pass the declared schema/reducer pins and all named acceptance scenarios while clients receive duplicate or competing dropped-loot updates, directly violating the newly claimed no-dual-emit atomic cutover.

Root cause: the plan added an atomic production migration invariant but did not add an integration assertion for channel-path uniqueness and legacy-path removal; existing tests validate payload behavior, not which production routes are simultaneously active.

@Kizunad
Kizunad merged commit 208169c into main Aug 4, 2026
1 check passed
Kizunad pushed a commit that referenced this pull request Aug 5, 2026
- P0 标记为已完成(2026-08-02),补契约底座落地证据(qi_flow 类型化事务、
  ALL_CONCRETE_QI_TRANSFER_REASONS 全枚举、join 身份锚/退避重试)
- P0 冻结契约新增 §4 生产接线与枚举/边界测试契约,固化 7 个 review major 修复
- 新增「裁决对齐(PR #1902)」:TypeBox 为 repo-wide schema source of truth、
  R6 拥有 generation machinery、R9 拥有 cast domain 语义、原子切换 merge unit、
  master §3 Wave 表唯一权威;本轨只消费冻结 API,不复制他人 artifact
- 跨仓库契约明确 R5 纯 server 内部、不定义 TypeBox schema 内容

Model: cc-sonnet-high
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant