R1 P0: server session 设计收口与吸收清单验真 - #1894
Conversation
|
Warning Review limit reached
Next review available in: 43 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 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 configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughSummary by CodeRabbit
Walkthrough本次变更更新会话生命周期、持久化交付、Craft 协议、客户端状态和跨轨实施计划。新增 Changes会话重构计划
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
Central reviewDecision: Validated findings[major] Bound suspended sessions before retaining facility claims indefinitely
A player can start a checkpointed alchemy or forge session, disconnect, and never reconnect. The new contract requires disconnect to keep the stable owner/facility claim while the session remains Root cause: the frozen lifecycle treats every disconnected checkpointed session as indefinitely resumable and requires its facility claim to be retained, but it defines no bounded suspension lifetime or reclamation path for owners who never return. because later implementation phases are required to preserve this contract, the omission creates an unbounded resource-retention path rather than merely leaving an optional cleanup optimization unspecified. [major] Checkpointed disconnect/shutdown both preserves and refunds escrow
The frozen lifecycle contract says every Root cause: the plan resolved the interruption-refund policy globally by [major] Contract pins omit the termination-cause refund matrix
The plan freezes an observable economic contract in §2.5: Root cause: the test plan does not include a positive/negative matrix over the newly frozen [major] TsyPresence restore is delegated to an R3 deliverable that does not exist
The plan requires Root cause: r1 delegates the actual tsypresence checkpoint and restore producer to r3, but r3's plan does not register or schedule that state, leaving the cross-track persistence connection without an implementation owner. [major] P1 pause/resume contract has no schedulable cross-stack owner
P1 claims craft screen close/pause, explicit cancel, and reopen/resume as its deliverable ( Root cause: the plan assigns a cross-stack wire feature to p1 but neither includes the owning r6/r4/r7 deliverables in that phase nor declares them as prerequisites. its file-ownership and wave rules prevent r1 from implementing the required producer, schema, handler, and client consumer itself. [major] R1 phases are scheduled before their required cross-track wiring
The plan allows the R1 implementation wave after only R3 P1 and says P1 may implement the craft adapter (line 197), while P1's claimed behavior requires screen-close pause, explicit cancel, and reopen resume (lines 203-205). The same document assigns the required proto/bridge changes to R6, request handler/gate changes to R4, and client Screen changes to R7/R2 (lines 193-195). None is made a prerequisite here. The master schedules R1 in Wave 1 but R4 in Wave 2 ( Root cause: the promoted plan consumes mandatory cross-track contracts but records only ownership notes, not dependency gates or matching deliverables in the owning plans, so its implementation phases can be declared complete before their production producers and consumers exist. [major] P1 craft pause/resume has no scheduled wire or handler path
P1 explicitly promises that closing the craft screen pauses, an explicit cancel remains available, and reopening resumes ( Root cause: the plan assigns a cross-stack p1 acceptance behavior to r1 while assigning every required wire producer and dispatcher to other tracks, without adding a blocking dependency or concrete cross-track phase deliverable for that connection. |
Central reviewDecision: Validated findings[major] Terminal delivery loses the existing crash-atomic checkpoint
The new terminal sequence at line 121 is Root cause: the plan splits terminal delivery and session persistence across r10 and r3 without assigning a durable atomic commit or recovery protocol. a live registry lock plus an unspecified idempotency key cannot provide exactly-once behavior across process failure; the contract must require a durable receipt/outbox (or a single transaction where storage permits) atomically coupled to inventory/spill mutation and session terminalization, and test the crash boundary. [major] Persist the TSY entry inventory snapshot across relog
The changed P1 contract fixes the persisted Root cause: the plan duplicates the [major] Require authorization for forced session termination
The new plan requires an “管理员/维护命令” to terminate any suspended session early, and specifies only CAS/registry locking for races. It never requires authentication/authorization of the command executor, defines no trusted operator identity source, and includes no ordinary-player rejection test in the P1/P4 acceptance list. This is not supplied implicitly by the existing command framework: commands registered with Root cause: the plan introduces a destructive cross-player administrative entry point but treats concurrency/idempotency as its only trust boundary; it omits a mandatory operator permission check, authoritative principal, target authorization rules, and negative permission coverage. [major] Bound failed reclamation retries and retained expired sessions
A checkpointed session reaches this path by disconnecting, remaining abandoned until the 1,728,000-tick TTL expires, and then having Root cause: the reclamation contract makes successful inventory delivery the only way to release an expired session, while requiring failed deliveries to remain retryable indefinitely without specifying any resource or retry bound. a sustained delivery failure therefore causes unbounded accumulation of session/checkpoint state and permanent facility claims, with potentially unbounded repeated scan work. |
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)
26-26: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win在 skeleton 末尾补齐
§10 实施工作流。该计划包含 P0-P5 多阶段交付,但文件末尾没有依赖顺序、每 PR 单 plan、中文 atomic commit、
Model:trailer、重新 review 和自动归档规则。请追加
§10,并包含“单次 consume-plan 全自动到 merge”章节。As per coding guidelines,多 PR plan 必须在末尾包含
§10 实施工作流。Based on learnings,skeleton plan 的实施和归档还应保持每个 PR 只修改一个 plan。🤖 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-wire-s2c-v1.md` at line 26, 在计划文档末尾新增“§10 实施工作流”,补充 P0-P5 的依赖执行顺序、每个 PR 仅修改一个 plan、使用中文 atomic commit 并包含 Model: trailer、重新 review,以及自动归档规则;同时加入“单次 consume-plan 全自动到 merge”章节,确保实施与归档遵循每个 PR 只修改一个 plan。Sources: Coding guidelines, Learnings
🤖 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/plan-refactor-server-session-v1.md`:
- Around line 171-185: 在“## 3.1 决议”之前恢复“## 3 开放问题”章节,逐项列出与各项决议对应的 P0
问题并标记为已解决;保留现有“决议 1”和“决议 2”的结论、实施方案、边界与拒绝理由,以及“文件:行号 + plan
章节”双锚点,并确保章节结构符合开放问题先于对应 §N.1 决议的约定。
- Line 266: 在计划文件末尾新增“§10 实施工作流”,覆盖 P0-P4 的依赖与执行顺序、每个 PR 单独维护 plan、中文 atomic
commit 及 Model: trailer 要求、重新 review 流程和自动归档规则;同时加入“单次 consume-plan 全自动到
merge”章节,明确从执行计划到合并的完整自动化流程。
- Around line 255-266: 为 P4 中的每个场景补充可核验的实现锚点,逐项关联具体模块路径、类型或函数、schema、Redis
key、跨仓库契约 symbol 及对应 bot 测试脚本;至少覆盖 SessionRegistry、SessionDeliveryOutbox、R3/R10
事务 symbol 和现有回归脚本。保持现有验收语义不变,确保每项都能直接定位实现、契约与测试。
- Around line 1-3: 统一补齐四份计划的 plan header 接入面规范:在
docs/plan-refactor-server-session-v1.md
第1-3行新增完整“接入面”章节,明确进料、出料、共享类型/event/schema、跨仓库契约及 worldview.md 锚点;在
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
第17行、docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第17行和
docs/plans-skeleton/plan-refactor-client-ui-base-v1.md 第19行补充 worldview.md
章节及准确行号。
In `@docs/plans-skeleton/plan-refactor-c2s-gate-v1.md`:
- Line 25: 在文档末尾追加“§10 实施工作流”,补充 P0-P4 的依赖顺序、每个 PR 仅修改一个 plan、使用中文 atomic
commit、包含 Model: trailer、重新 review 以及自动归档规则;同时新增“单次 consume-plan 全自动到
merge”章节,明确从消费计划到合并的完整自动化流程。
In `@docs/plans-skeleton/plan-refactor-client-ui-base-v1.md`:
- Line 28: 在计划文档末尾补充“§10 实施工作流”,新增“单次 consume-plan 全自动到 merge”章节;明确 P0-P5
的依赖执行顺序、每个 PR 仅修改一个 plan、使用中文 atomic commit 并包含 Model: trailer、重新
review,以及合并后的自动归档规则。
- Around line 19-25: 更新 CraftScreen 的关闭处理,不要在 removed() 中直接将所有 Screen removal
映射为 CraftPause;引入明确的关闭原因或抑制标记,仅用户主动关闭时发送 CraftPause,显式取消路径抑制
Pause,断线或服务端替换路径不发送任何 UI intent并交由 R2/R1 生命周期处理。为用户关闭、取消、断线/服务端替换三条路径分别补充客户端测试。
In `@docs/plans-skeleton/plan-refactor-inventory-core-v1.md`:
- Around line 15-23: 更新 InventoryTxn 的 deliver 幂等契约及 durable
DeliveryCommitReceipt:持久化规范化 payload 摘要与目标身份,并以 delivery_id 强制唯一;delivery_id
已存在且摘要或目标不匹配时返回冲突并完全不执行 mutation,匹配时仅返回原始持久化 receipt,不重复处理。
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Around line 54-55: 为三个计划文件新增严格命名的“§10 实施工作流”,并在各自末尾按依赖顺序序列化
PR:docs/plans-skeleton/plan-refactor-master-v1.md(54-55)覆盖
R3、R1、R10、R6、R4、R7、R2;docs/plans-skeleton/plan-refactor-persistence-slices-v1.md(23-27)覆盖
Slice 框架、guard、flush、TsyPresence parity、outbox 和 bot
验收;docs/plans-skeleton/plan-refactor-inventory-core-v1.md(36-45)覆盖
InventoryTxn、生产调用点迁移、outbox 消费和 DeadLetter 验收。将现有 flash-review
流程顺延至后续章节,并确保每个计划在一个 §10 内完成多 PR 编排。
In `@docs/plans-skeleton/plan-refactor-persistence-slices-v1.md`:
- Around line 47-49: Update the TsyPresence recovery flow and its acceptance
criteria so a missing or invalid presence slice also prevents restoring TSY
position and dimension in the same recovery transaction, or moves them to a
separately trusted safe location and dimension. Preserve the existing
refusal-to-attach and request rejection behavior, and never derive the fallback
destination from corrupted return_to data.
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Line 17: 在跨仓库契约说明中为 Craft 协议切换补充最小协议版本门、feature gate 与原子发布要求,明确未满足版本时拒绝新
intent 和 session-state payload。增加并说明旧 client/new server 及 new client/旧 server
两种组合的拒绝测试,确保 rollout 期间不会写入或解析不兼容的 enum/payload;保留现有一次性切换和 CraftCancel 约束。
---
Outside diff comments:
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Line 26: 在计划文档末尾新增“§10 实施工作流”,补充 P0-P5 的依赖执行顺序、每个 PR 仅修改一个 plan、使用中文 atomic
commit 并包含 Model: trailer、重新 review,以及自动归档规则;同时加入“单次 consume-plan 全自动到
merge”章节,确保实施与归档遵循每个 PR 只修改一个 plan。
🪄 Autofix (Beta)
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: 00ad1f54-e9bd-4bf9-a618-3aa436e70ff7
📒 Files selected for processing (9)
docs/plan-refactor-client-store-lifecycle-v1.mddocs/plan-refactor-server-session-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-server-session-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.md
💤 Files with no reviewable changes (1)
- docs/plans-skeleton/plan-refactor-server-session-v1.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (5)
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/。一个 PR 只允许修改一个 plan;
/consume-plan只能追加 Finish Evidence 或执行允许的 plan 归档移动,不得自动修改其他 docs 文件、CLAUDE.md或 worldview 文档。
Files:
docs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-client-store-lifecycle-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plan-refactor-server-session-v1.md
docs/plans-skeleton/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
新建 plan 前必须先阅读
docs/CLAUDE.md;骨架 plan 必须包含主题和 P0/P1 等阶段总览。
Files:
docs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.md
**/*.{rs,ts,tsx,java,json,md}
📄 CodeRabbit inference engine (CLAUDE.md)
唯一真货币是骨币;矿物是交易筹码,灵石是燃料/衰变物,金银不是货币。
Files:
docs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-client-store-lifecycle-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plan-refactor-server-session-v1.md
**/*
📄 CodeRabbit inference engine (CLAUDE.md)
**/*: 禁止git stash push后不执行对应git stash pop;不得留下孤儿 WIP stash。
每个逻辑单元使用中文 atomic commit;agent 产生的每个 commit 必须包含真实模型 ID 的Model:trailer。
未经明确确认不得执行 force push、hard reset、amend、交互式 rebase、批量删除/移动文件或依赖版本/生产配置修改;严禁--no-verify、--no-gpg-sign及关闭签名。
PR review 只能通过独立评论/review触发;不得等待 Codex,review 修改后必须重新等待 re-review。
Files:
docs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-client-store-lifecycle-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plan-refactor-server-session-v1.md
docs/plan-*.md
📄 CodeRabbit inference engine (CLAUDE.md)
docs/plan-*.md: Active plan 每个阶段必须写出可核验的模块路径、类型/函数、测试、schema、Redis key 或跨仓库契约 symbol。
plan 归档前必须所有阶段标记为✅ YYYY-MM-DD并补充严格标题为## Finish Evidence的证据章节。
Files:
docs/plan-refactor-client-store-lifecycle-v1.mddocs/plan-refactor-server-session-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-wire-s2c-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-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-wire-s2c-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-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-wire-s2c-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.md
🪛 LanguageTool
docs/plan-refactor-server-session-v1.md
[grammar] ~96-~96: Ensure spelling is correct
Context: ...connected_clients及 R3 player save 前接收 disconnect。 2.Checkpointed`:停止 tick → 写 checkpoint(包含 escrow,但不执行 refu...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~242-~242: Ensure spelling is correct
Context: ... volatile adapter;断线/跨维/关服不再 tick 或结算离线 actor。 - qi refund/release 测试从 SPIRIT_QI_TOTAL 与 ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.23.1)
docs/plan-refactor-server-session-v1.md
[warning] 132-132: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
🔇 Additional comments (2)
docs/plan-refactor-client-store-lifecycle-v1.md (1)
27-27: LGTM!docs/plans-skeleton/plan-refactor-persistence-slices-v1.md (1)
16-19: 🗄️ Data Integrity & Integration无需修改。 恢复失败的
release_dormant_qi_to_zone会先设置 NPC/zone shadow balance,再调用qi_release_to_zone构造QiTransfer(ReleaseToZone)并写入 ledger。
| 9. `session_craft_pause_resume_wire`:真实 client producer → R6 proto/bridge → R4 production handler/gate → R1 registry → S2C hydrate → client reopen consumer 全链路。 | ||
| 10. `session_tsy_presence_relog`:R3 guarded presence Slice 完整恢复 `family_id`、`entered_at_tick`、`entry_inventory_snapshot`、`return_to`、schema/version 并与 position/dimension 同事务对拍;校验失败不 attach、不开放 TSY 请求,恢复后 death-drop 仍正确区分原带物与 TSY 所得。 | ||
|
|
||
| 另回归现有 `production_craft_disconnect_resume.py`、`production_craft_cancel_full_inventory_refund.py`、`production_handcraft_stone_knife.py`。对应 implementation PR 合入后,按总纲 §7 为吸收项补 Finish Evidence 并做每轨一次 docs-only 批量归档。 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
在计划末尾补齐 §10 实施工作流。
该计划包含 P0-P4 多阶段交付,但文件在此结束,没有依赖顺序、每 PR 单 plan、中文 atomic commit、Model: trailer、重新 review 和自动归档规则。
请在最后追加 §10,并包含“单次 consume-plan 全自动到 merge”章节。
As per coding guidelines,多 PR plan 必须在末尾包含 §10 实施工作流。
🤖 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/plan-refactor-server-session-v1.md` at line 266, 在计划文件末尾新增“§10 实施工作流”,覆盖
P0-P4 的依赖与执行顺序、每个 PR 单独维护 plan、中文 atomic commit 及 Model: trailer 要求、重新 review
流程和自动归档规则;同时加入“单次 consume-plan 全自动到 merge”章节,明确从执行计划到合并的完整自动化流程。
Source: Coding guidelines
| - ⬜ P1 门禁中间件落地:gate 层上线,先给"已知漏洞簇"与 R1 craft `CraftOpen`/`CraftPause`/`CraftResume` 挂 spec;新增 intent 必须在同一提交进入 production decode/dispatch 和全量 gate matrix,旧内联校验保留并行断言一个版本期。 | ||
| - ⬜ P2 巨石拆分批次 A:巨型 match 拆为按域 handler 注册表(combat/production/world/social/npc 五组),行为不变,bot 场景锁住。 | ||
| - ⬜ P3 巨石拆分批次 B + 全量挂 spec + 删旧:113 变体全部声明门禁(含显式 `no_gate` 声明,杜绝静默无门禁);删除各域内联距离常量与重复维度判断。 | ||
| - ⬜ P4 bot 验收 + 吸收 plan 批量归档。 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
在 skeleton 末尾补齐 §10 实施工作流。
该计划包含 P0-P4 多阶段交付,但文件末尾没有依赖顺序、每 PR 单 plan、中文 atomic commit、Model: trailer、重新 review 和自动归档规则。
请追加 §10,并包含“单次 consume-plan 全自动到 merge”章节。
As per coding guidelines,多 PR plan 必须在末尾包含 §10 实施工作流。Based on learnings,skeleton plan 的实施和归档还应保持每个 PR 只修改一个 plan。
🤖 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-c2s-gate-v1.md` at line 25, 在文档末尾追加“§10
实施工作流”,补充 P0-P4 的依赖顺序、每个 PR 仅修改一个 plan、使用中文 atomic commit、包含 Model: trailer、重新
review 以及自动归档规则;同时新增“单次 consume-plan 全自动到 merge”章节,明确从消费计划到合并的完整自动化流程。
Sources: Coding guidelines, Learnings
Central reviewDecision: Validated findings[major] R3 P1 gate can activate sessions before atomic outbox handoff exists
The changed plan assigns the Root cause: the plan splits one indivisible production dependency across phases: downstream plans gate session activation on r3 p1, while the durable checkpoint-to-outbox ownership transfer and its crash pins are scheduled for r3 p3. the atomic transaction must be an explicit p1 acceptance requirement, or every downstream production gate must wait for p3. [major] Reserve outbox byte capacity, not only a row slot
Root cause: the admission reservation and the resource constrained at terminal handoff use different units: one row slot is reserved, but terminalization also requires unreserved byte capacity for a variable-size payload. consequently, admission does not guarantee that the later atomic handoff can commit, despite the plan relying on that guarantee to release gameplay claims. [major] Assign a production client event to
|
Central reviewDecision: Validated findings[major] Craft reopen pin lacks the no-session negative case
The new client contract says reopening must use server-hydrated session state to decide whether to send Root cause: the planned client tests identify which intent is emitted on the happy paths but do not pin the authoritative hydration precondition under which [major] Do not document the three craft intents as current 116-variant production coverage
Root cause: the documentation updates the baseline enum count and current production coverage without updating the producer, protobuf schema, rust conversion, and handler symbols that would make the three new intents reachable. planned future additions are being represented as if they already exist in the current contract. [major] Offline clients can spoof an allow-listed maintenance operator
The new contract makes Root cause: the plan treats an unauthenticated, client-selected offline-mode username as an operator identity. authorization must instead derive from an identity or capability the client cannot choose (or the maintenance surface must be unavailable in offline mode), with the executor entity used only to bind that authenticated principal. [major] Dead-letter tests allow resolve to discard undelivered payloads
The changed contract says an authorized Root cause: the plan adds a data-conservation requirement for dead-letter resolution but provides no acceptance assertion for the payload's durable disposition after an authorized resolve. [major] Add the three craft intents to the TypeBox source-of-truth deliverable
The changed P1 deliverable says the three new C2S intents will be added to Root cause: the plan treats protobuf/rust conversion as the defining c2s contract and relegates the agent schema to passive regeneration, instead of explicitly changing the typebox source of truth and propagating it through generated json schema, the packaged distribution, rust mirrors/converters, and consumers in one contract change. [major] Serialize delivery, dead-letter, and operator outbox transitions
The changed P2 contract adds automatic retry, threshold-based transition to Root cause: the plan assigns several concurrent writers to [major] Suspension lease rebasing has no restart regression pin
The new contract at line 16 requires Root cause: the plan adds a restart-sensitive suspension-lease invariant but does not add a regression test that persists a partially elapsed lease, restarts, rebases ticks, and verifies expiry after only the original remaining duration (including repeated restarts and boundary ticks). [major] Gate sweep does not test the new craft authorization states
The diff adds Root cause: the acceptance matrix was updated only in variant count, not in input dimensions, so it does not verify the newly claimed owner/phase/busy authorization contract for craft lifecycle requests. [major] TSY shutdown test does not prove atomic location and presence persistence
Line 26 newly requires the Root cause: the acceptance scenario verifies restore-time consistency after an orderly flush, but omits the crash boundary needed to protect the newly claimed atomic shutdown-write contract. [major] No track owns the client producer APIs for the three new craft intents
The changed client plan requires Root cause: the cross-track contract allocates the ui call sites to r7 and client network files to r6, but no r6 deliverable owns the required client-side c2s encoding and sender methods. add those production producer apis and their contract pins to r6's frozen interface before r7 consumes them. |
c0de0a6 to
9821f72
Compare
Central reviewDecision: Validated findings[major] Frozen outbox schema omits required CAS and disposition data
The frozen Root cause: the plan added generation-based concurrency and payload-retaining resolution semantics without updating the authoritative frozen outbox and enum shapes to contain the data those semantics require. [major] Make terminal-obligation quota reservation atomic across concurrent admissions
The changed contract says concurrent checkpointed-session admission/restore must first reserve one outbox row and Root cause: the new quota-reservation contract specifies capacity accounting as a precondition but does not make reservation acquisition/release an atomic persisted state transition or test the concurrent admission/restore race. the outbox generation cas described elsewhere only serializes transitions of an already-created delivery row, so it does not prevent quota check-then-reserve overbooking. [major] C2S reconnaissance claims future craft variants are already wired
The changed baseline statement says the current Root cause: the reconnaissance evidence was updated from 113 to 116 without preserving the conditional nature of the future r6 variants. the same plan now simultaneously treats the three craft intents as present in the production handler and as future additions, so the end-to-end request inventory has no single authoritative baseline. [major] Craft lifecycle plan leaves the required S2C hydration payload unwired
The changed contract says R6 will freeze a corresponding S2C craft session-state payload, while the real consumer contract requires server-hydrated phase plus session key and generation so the client can distinguish a matching paused session from idle, terminal, delivery-pending, stale, or mismatched state ( Root cause: the plan introduces an end-to-end craft lifecycle that depends on a new s2c session-state contract, but only wires and pins the c2s half of that contract. the s2c producer-to-schema-to-bridge-to-client-consumer chain and its required identity/version fields are left undefined, so the phase deliverable does not enforce the cross-layer connection required by the client behavior. [major] Successful session completion has no representable outbox cause
The frozen contract defines Root cause: the frozen termination/cause model omits a successful completion variant even though normal completion is a required producer of the durable delivery outbox whose record includes a cause. [major] Rebase durable outbox deadlines across restarts
The new durable outbox persists Root cause: the plan makes retry and age deadlines durable as absolute process-local ticks without defining an epoch, elapsed-duration representation, or mandatory |
Central reviewDecision: The review could not complete safely. No approval or code finding was inferred from the failed stages.
|
Central reviewDecision: Validated findings[major] Freeze session identity fields for the new craft lifecycle intents
The changed contract declares Root cause: the plan freezes intent names and the s2c identity model but omits the c2s wire shapes needed to bind pause/resume requests to a specific session generation. consequently the typebox, protobuf, rust, and client implementations have no authoritative contract for carrying and validating [major] Add the omitted
|
Central reviewDecision: Validated findings[major] Identity-less Idle clients cannot send the required CraftOpen request
The changed contract requires every Root cause: the plan applies an existing-session identity precondition uniformly to [major] Craft identity pins omit default and uint64 boundary cases
The changed contract forbids omitted or default craft identities and defines Root cause: the test deliverables equate required-field presence and ordinary roundtrips with validation of the identity contract, omitting explicit empty/default and [major] TsyPresence autosave can commit separately from position and dimension
The changed P1 deliverable persists Root cause: the plan treats [major] Resume producer tests omit Running and Suspended hydrations
The changed R7 P2 contract says only a matching server-hydrated Root cause: the production-producer test matrix does not enumerate all non-paused phase variants even though phase is an enum and the observable contract permits resume only from paused; the omitted running and suspended transitions therefore remain unprotected. [major] Initial CraftOpen requires an identity that Idle hydration cannot supply
On the initial craft-screen entry while the authoritative server hydration is Root cause: the plan uses an existing-session identity as a required authorization token for both creating/opening a session and operating an already hydrated session, but the authoritative idle state intentionally supplies no such identity. the protocol needs a distinct server-issued open target/capability or must define craftopen as identity-free with server-side ownership/target validation, while retaining session identity for pause/resume. [major] Durable delivery acceptance omits the production loot path
P2 now requires every Root cause: the plan expands the durable delivery contract to the production loot path without adding a producer-level full-inventory and stable-delivery-id replay test for that fifth call-site category; api-level atomicity tests cannot detect a caller that never adopts the api. [major] Resolved payloads escape the delivery quota and grow without bound
The new terminal-delivery contract releases Root cause: the quota lifecycle accounts only for active outbox obligations. resolving a dead letter transfers its payload into a second durable store and decrements the quota without placing that retained store under any bounded-capacity or retention policy, moving rather than bounding persistent resource growth. [major] Resolved payloads escape the quota and can grow storage without bound
A reachable cycle is: admit a checkpointed session (reserving at most Root cause: the plan makes resolved payload retention permanent for audit/recovery purposes while accounting those bytes as freed capacity. because retained [major] R6's new TypeBox ownership contradicts the master agent boundary
The changed line assigns R6 ownership of edits to the TypeBox source files under Root cause: the new cross-stack contract adds authoritative agent schema-source work to r6 without updating the master scope and ownership boundary that explicitly excludes agent source changes. |
Central reviewDecision: Validated findings[major] Workbench close producer is omitted from the pause/resume wiring
The absorbed defect is explicitly reachable through both Root cause: the cross-track handoff narrows a two-producer lifecycle defect to [major] Resolved delivery payloads bypass every storage quota
The changed contract allows an authorized operator to resolve each failed delivery by moving its complete payload into a durable Root cause: [major] R6's required agent schema wiring is excluded by the master plan
The changed R6 contract assigns Root cause: the diff adds agent typebox source and distribution artifacts to r6's required production wiring without updating the master plan's explicit exclusion and independent-agent ownership boundary. because typebox is the ipc source of truth, this is not an optional documentation reorganization: one of the authoritative plans directs implementers to skip artifacts that the other requires for the cross-stack contract. [major] Authenticated players satisfy the frozen maintenance authorization rule
A normal online-mode player has a server-authenticated principal bound to their current executor entity, so the stated predicate accepts the request even though that principal has no maintenance role. They can submit Root cause: the plan conflates authentication and executor binding with authorization: [major] Freeze a lossless generation representation across the wire bridge
The changed contract requires Root cause: the plan assigns one logical [major] Generation overflow can pass the deferred V2 contract tests
The changed plan defines Root cause: the plan introduces a monotonic cross-stack [major] Resolved dispositions bypass the only payload-storage quota
Root cause: the terminal-obligation quota accounts only for active outbox obligations and is released when a full payload is moved to [major] Define the winner for same-tick insight response and timeout
The new P1 acceptance text requires a test for a Root cause: the plan adds a concurrent deadline transition without freezing a deterministic response-versus-timeout precedence or a single atomic/cas transition keyed by stable offer identity. boundary and off-by-one coverage do not substitute for the missing same-tick state-transition contract, so the implementation can remain schedule-dependent while still satisfying the stated acceptance checklist. [major] P2 Resume tests omit Running and Suspended hydration
The changed P2 contract says Root cause: the plan claims a phase-exclusive resume producer contract but omits two valid non-paused enum states from its negative acceptance matrix, leaving the changed observable contract unprotected against an over-broad phase predicate. |
1 similar comment
Central reviewDecision: Validated findings[major] Workbench close producer is omitted from the pause/resume wiring
The absorbed defect is explicitly reachable through both Root cause: the cross-track handoff narrows a two-producer lifecycle defect to [major] Resolved delivery payloads bypass every storage quota
The changed contract allows an authorized operator to resolve each failed delivery by moving its complete payload into a durable Root cause: [major] R6's required agent schema wiring is excluded by the master plan
The changed R6 contract assigns Root cause: the diff adds agent typebox source and distribution artifacts to r6's required production wiring without updating the master plan's explicit exclusion and independent-agent ownership boundary. because typebox is the ipc source of truth, this is not an optional documentation reorganization: one of the authoritative plans directs implementers to skip artifacts that the other requires for the cross-stack contract. [major] Authenticated players satisfy the frozen maintenance authorization rule
A normal online-mode player has a server-authenticated principal bound to their current executor entity, so the stated predicate accepts the request even though that principal has no maintenance role. They can submit Root cause: the plan conflates authentication and executor binding with authorization: [major] Freeze a lossless generation representation across the wire bridge
The changed contract requires Root cause: the plan assigns one logical [major] Generation overflow can pass the deferred V2 contract tests
The changed plan defines Root cause: the plan introduces a monotonic cross-stack [major] Resolved dispositions bypass the only payload-storage quota
Root cause: the terminal-obligation quota accounts only for active outbox obligations and is released when a full payload is moved to [major] Define the winner for same-tick insight response and timeout
The new P1 acceptance text requires a test for a Root cause: the plan adds a concurrent deadline transition without freezing a deterministic response-versus-timeout precedence or a single atomic/cas transition keyed by stable offer identity. boundary and off-by-one coverage do not substitute for the missing same-tick state-transition contract, so the implementation can remain schedule-dependent while still satisfying the stated acceptance checklist. [major] P2 Resume tests omit Running and Suspended hydration
The changed P2 contract says Root cause: the plan claims a phase-exclusive resume producer contract but omits two valid non-paused enum states from its negative acceptance matrix, leaving the changed observable contract unprotected against an over-broad phase predicate. |
ddfcd9b to
8fcc4d7
Compare
Central reviewDecision: The read-only review job did not produce a verifiable artifact. No code verdict was inferred. |
冻结持久与易失会话的生命周期、忙态和交付原子性边界,并以当前源码验真吸收清单,防止后续迁移跨轨重复实现。 Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
冻结有限 suspension 回收和 termination cause 经济矩阵,并为 craft wire、delivery 与 TSY presence 持久化建立真实生产依赖,避免各轨提前宣称闭环。 Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
明确 durable outbox 与 runtime claim 的提交后幂等关系,补全 TSY 快照、管理员授权、dead-letter 退避和 obligation quota,避免崩溃重放与 retained state 无界增长。 Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
将 atomic handoff 前移至 R3 P1,补齐交付中间态、byte quota、CraftOpen producer、PendingInsightOffer 回归、TSY 拒绝分支与 116 变体计数。 Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
明确 Idle 初开由服务端分配会话身份,并冻结 TsyPresence 耦合快照;其余深度验收留待 Wave 2 接缝收口。 Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
8fcc4d7 to
aa20664
Compare
Central reviewDecision: The review could not complete safely. No approval or code finding was inferred from the failed stages.
|
Central reviewDecision: Validated findings[major] P4 termination matrix omits the required Completed transition
The contract pins explicitly require coverage for normal Root cause: the required acceptance inventory and the declared [major] R6 craft schema ownership contradicts the master agent scope
The updated wire plan assigns R6 ownership of Root cause: the wire plan expands r6 into the agent schema source and distribution artifacts without reconciling the master plan's explicit agent exclusion and ownership matrix. [major] TerminationCause cannot represent authorized administrator closure
An authorized operator can reach Root cause: the plan adds administrator-forced session termination as a first-class reachable lifecycle event but freezes |
补齐 Completed 的 P4 终止矩阵覆盖,新增授权管理员结案原因及审计结算语义,并将 R6 的 agent schema/dist 改为冻结依赖而非所有权。 Model: cc-haiku-max Co-Authored-By: Claude <noreply@anthropic.com>
Central reviewDecision: Validated findings[major] Craft schema artifacts have no consistent production owner
At Root cause: the plan simultaneously assigns schema-source generation to r6 and excludes those artifacts from r6 ownership, without registering any other production owner or prerequisite phase for them. [major] P1 defers the crash evidence needed to verify coupled snapshot atomicity
Root cause: the coupled snapshot's atomicity requirement is declared in p1, but its executable concurrency/crash evidence is assigned to p3 and separately described as deferred. this leaves the phase gate unable to distinguish a genuinely single-transaction implementation from three independently committed writes, so a partial snapshot can be introduced while still satisfying the stated p1 acceptance boundary. [major] Craft release gate has no owner for the TypeBox source-of-truth artifacts
The new stage gate says R6 P1 delivers Root cause: the plan assigns the typebox/schema prerequisite to r6 even though the authoritative ownership contract forbids r6 from producing it, and it omits the independent owner that must update and publish the schema source-of-truth artifacts before r6 consumes them. [major] CraftOpen has no frozen target bridge for workbench sessions
The changed contract says Root cause: the newly frozen craftopen producer/consumer chain specifies that target gating occurs but omits the target-bearing wire field or another authoritative context bridge needed to perform that gate across the existing workbench s2c-to-screen boundary. |
由 Agent 轨原子拥有 TypeBox source 及生成物,R6 仅消费并落 wire;同时把耦合快照强杀证据前移至 R3 P1,并冻结 workbench_key 的跨端校验契约。 Model: cc-haiku-max Co-Authored-By: Claude <noreply@anthropic.com>
吸收 R10 促升及 inventory 接缝更新,同时保留 craft schema 所有权、workbench_key 目标桥与 R3 P1 强杀验收边界。 Model: cc-haiku-max Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 12
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)
12-17: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win在 skeleton 计划的接入面补充
worldview.md锚点。两个接入面已经列出进料、出料、共享类型和跨仓库契约,但没有对应的
worldview.md §X L<line>锚点。请在同一接入面章节中补充准确、可核验的世界观引用。不要使用无法支持计划范围的泛化锚点。
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L12-L17: 补充 wire、作用域广播和跨仓库契约的世界观依据。docs/plans-skeleton/plan-refactor-c2s-gate-v1.md#L12-L17: 补充 C2S 门禁、距离、维度和所有权规则的世界观依据。As per coding guidelines,新的 plan 接入面必须同时包含进料、出料、共享类型/event/schema、跨仓库契约和对应的
worldview.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-wire-s2c-v1.md` around lines 12 - 17, 在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 第12-17行的“接入面”中补充准确、可核验的 worldview.md 锚点,覆盖 wire、作用域广播及跨仓库契约依据;在 docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第12-17行的对应“接入面”中补充覆盖 C2S 门禁、距离、维度和所有权规则的 worldview.md 锚点。两处均需保留进料、出料、共享类型/event/schema 与跨仓库契约内容,并仅引用能支持计划范围的具体章节和行号。Source: Coding guidelines
♻️ Duplicate comments (5)
docs/plan-refactor-server-session-v1.md (4)
1-3: 📐 Maintainability & Code Quality | 🟠 Major两个 plan 的 header 接入面仍不完整。
docs/plan-refactor-server-session-v1.md#L1-L3:新增完整## 接入面,声明进料、出料、共享类型/event/schema、server/agent/client 跨仓库契约和准确的worldview.md §X L<line>。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L13-L19:补充准确的worldview.md章节和行号,并明确“零 wire 改动”是 server/agent/client 契约。As per coding guidelines,plan header 必须声明完整接入面和
worldview.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/plan-refactor-server-session-v1.md` around lines 1 - 3, Update the header of docs/plan-refactor-server-session-v1.md at lines 1-3 by adding a complete “接入面” section covering inputs, outputs, shared types/events/schemas, server/agent/client cross-repository contracts, and an accurate worldview.md §X line anchor. Also update docs/plans-skeleton/plan-refactor-persistence-slices-v1.md at lines 13-19 with the accurate worldview.md section and line reference, explicitly defining “zero wire changes” as the server/agent/client contract.Source: Coding guidelines
174-188: 📐 Maintainability & Code Quality | 🟠 Major恢复
## 3 开放问题。当前文件从
§2.5直接进入## 3.1 决议(原开放问题 §N.1)。计划没有列出这些决议所对应的 P0 问题。请在第 174 行前恢复## 3 开放问题,逐项标记解决状态,并保留结论、实施方案、边界条件以及文件:行号和 plan 章节双锚点。As per coding guidelines,每份 plan 必须先列出开放问题,再追加对应的
§N.1 决议。🤖 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/plan-refactor-server-session-v1.md` around lines 174 - 188, 在“## 3.1 决议(原开放问题 §N.1)”之前恢复“## 3 开放问题”章节,列出与“决议 1”和“决议 2”对应的 P0 开放问题并明确标记已解决状态;保留现有各决议的结论、实施方案、边界与拒绝理由,以及文件:行号和 plan 章节双锚点内容不变。Source: Coding guidelines
271-271: 📐 Maintainability & Code Quality | 🟠 Major统一补齐两个 plan 的
§10 实施工作流。
docs/plan-refactor-server-session-v1.md#L271-L271:追加 P0-P4 的依赖顺序、中文 atomic commit、Model: <精确模型 id>trailer、Git/stash 约束、重新 review、Finish Evidence 和归档流程。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L65-L66:追加 P0-P5 的同类执行顺序和阶段门禁。两个 plan 的末尾都必须包含“单次 consume-plan 全自动到 merge”,明确
/consume-plan后最终归档到docs/finished_plans/。As per coding guidelines,scope >= 4 个 PR 的 plan 必须在末尾包含
§10 实施工作流和自动归档章节。🤖 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/plan-refactor-server-session-v1.md` at line 271, 为 docs/plan-refactor-server-session-v1.md 的末尾补齐 §10 实施工作流,包含 P0-P4 依赖顺序、中文 atomic commit、精确 Model trailer、Git/stash 约束、重新 review、Finish Evidence、每轨 docs-only 批量归档及自动归档流程;为 docs/plans-skeleton/plan-refactor-persistence-slices-v1.md 的末尾补齐同类 §10,使用 P0-P5 阶段门禁。两个文件都必须明确单次 /consume-plan 全自动执行至 merge,并最终归档到 docs/finished_plans/。Source: Coding guidelines
259-270: 📐 Maintainability & Code Quality | 🟠 Major为每个 P4 场景补充可执行实现锚点。
当前 P4 主要列出场景名称和断言。每个场景仍缺少具体模块路径、类型/函数、schema 或 Redis key、跨仓库契约 symbol 及 bot 脚本路径。请逐项补充实现锚点。至少覆盖
server/src/session/registry.rs::SessionRegistry、SessionDeliveryOutbox、R3/R10 transaction symbol 和实际scripts/bot/...路径。🤖 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/plan-refactor-server-session-v1.md` around lines 259 - 270, 为 P4 清单中的每个场景补充可执行实现锚点,不要只保留场景名称和断言;至少明确相关模块路径、类型/函数、schema 或 Redis key、跨仓库契约 symbol 及实际 bot 脚本路径。重点覆盖 server/src/session/registry.rs 中的 SessionRegistry、SessionDeliveryOutbox、R3/R10 transaction symbol,并为每项补充对应 scripts/bot/... 路径。docs/plans-skeleton/plan-refactor-master-v1.md (1)
54-58: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win补齐严格命名的
§10 实施工作流。当前
§10是flash-review issue 消化流程,不是按依赖顺序序列化实施 PR 的工作流。请在计划末尾新增严格命名的
§10 实施工作流,覆盖 Wave 0、Wave 1、Wave 2、R1-R10、V 和 registry-datafication 的 PR 顺序、依赖、原子边界、中文 commit、Model:trailer、验收证据,以及末尾的“单次 consume-plan 全自动到 merge”章节。将现有 flash-review 内容顺延到后续编号。As per coding guidelines, scope 大于或等于 4 个 PR 的 plan 必须在末尾包含
§10 实施工作流,并按依赖顺序序列化多个 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` around lines 54 - 58, 在文档末尾新增严格命名的“§10 实施工作流”,按依赖顺序覆盖 Wave 0、Wave 1、Wave 2、R1-R10、V 和 registry-datafication 的 PR 排序、依赖关系、原子边界、中文 commit、Model: trailer、验收证据,以及“单次 consume-plan 全自动到 merge”章节;将现有 flash-review issue 消化流程顺延至后续编号,并保持计划原有依赖与阶段约束。Source: Coding guidelines
🤖 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/plan-refactor-client-store-lifecycle-v1.md`:
- Around line 27-30: 统一三个计划文档中的 CraftStore 生命周期契约:在
docs/plan-refactor-client-store-lifecycle-v1.md:27-30 明确将同一个 CraftStore 同时写入
P0/P1 及 FQCN manifest,并规定 R6 P1 先完成创建与登记,R2 P1 后方可放行 R7 P2 使用;在
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:21-22 调整 R6 P1 交付表述,避免产生第二个状态
owner;在 docs/plans-skeleton/plan-refactor-client-ui-base-v1.md:39 对齐 Craft
Screen 接线依赖,确保其只消费该已登记的单一 CraftStore。
In `@docs/plan-refactor-server-session-v1.md`:
- Line 133: 在标题“2.3 durability 决议矩阵”前补充一个空行,使其与前方列表内容分隔并符合 Markdown 标题格式要求。
- Around line 127-130: Freeze terminal-obligation quota until each
ResolvedDisposition payload reaches a bounded retention or compaction boundary;
update docs/plan-refactor-server-session-v1.md lines 127-130 to define this
release condition and update
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md lines 55-56 to
specify retention/compaction, a separate disposition quota, or equivalent
storage budget with atomic cleanup boundaries. Ensure quota cannot be repeatedly
reused while durable resolved payloads remain indefinitely retained.
- Line 146: 在 TsyPresence 的 coupled restore 事务中定义校验失败时的安全回退:阻止 TSY
position/dimension 恢复,或将其移动到独立可信的安全位置与维度,且不得使用损坏的 return_to 推导目标;同步更新
docs/plan-refactor-server-session-v1.md:146 和
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:45-49,将该行为写入
tsy_presence_relog_parity 与 coupled-snapshot crash acceptance。
In `@docs/plans-skeleton/plan-refactor-client-ui-base-v1.md`:
- Around line 19-25: 在 Craft Screen 的移除与共享 close callback 流程中引入明确的 close reason
或 suppression flag,区分用户关闭、显式取消、断线和 server 驱动替换;仅用户关闭发送 hydrated identity/version
的 CraftPause,显式取消发送 CraftCancel,断线或 server 替换不得发送任何带旧 identity 的 UI
intent。补充客户端单测覆盖这四种 removal 路径。
- Line 49: 统一该段对 CraftSessionStateV2 phase 的引用:先依据共享 wire/schema 契约确认 Paused 与
Suspended 是否等价且可用于 Resume;若不等价,将 Running/Suspended 调整为实际定义的 Paused
phase,确保负例覆盖真实的 Paused Resume 拒绝路径,避免使用未定义 phase。
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Around line 61-64: 将 CraftOpen 的 facility gate 与 facility claim 合并为由单一 owner
执行的原子检查并占用操作,使用同一事务、锁或 compare-and-claim 确保并发请求不会同时通过检查;R4 负责调用该原子流程,R1
仅接受仍有效的检查结果并在过期或占用冲突时拒绝请求。
- Around line 61-64: 在 §4 或 §6.11 为 Agent schema 交付增加唯一且可验证的版本锚点,至少明确 schema
version、commit/tag、artifact digest 或 contract sample。更新 R6、R4、R7、R1 的 craft gate
与消费说明,统一引用该锚点,并要求 TypeBox source、generated schema 与 dist 均与其匹配,避免各轨消费不同版本。
- Around line 61-64: 为 CraftPause/CraftResume 的服务端处理增加独立的调用者身份校验:从认证连接获取 caller
identity,并在状态转移前验证其为 session owner 或具备明确授权关系。不要复用或依赖 CraftOpen 的 owner
gate;将该校验纳入 R4/R10 各自的 gate 决议,同时保留现有 hydrated session identity/version 校验。
- Line 9: 补全 plan-refactor-master-v1.md 的 skeleton→active 促升证据与决议链条,在计划头部明确
server/agent/client 契约、复用的 shared type/event/schema 及 worldview.md 锚点。按
docs/CLAUDE.md §10 模板在文末新增本 plan 的实施工作流,并在对应 §10.N 明确保留单次 /consume-plan 全自动执行至
merge 并归档到 docs/finished_plans/ 的声明。
- Line 103: 将计划完成定义中的“116 个 C2S 变体全部有声明”改为“当前为 113 个,待 R6 三个 craft intent 合入后扩至
116”。不要直接宣称 116 已同步;仅在补充三个新增变体、生成来源、schema/source trace,以及 scenarios 与
handler/gate 的全量声明、矩阵和样本证据后,才可保留 116 的表述。
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Line 17: 在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:17-17 补充 S2C
payload 与 CraftSessionStateV2 的最低协议/schema 版本门、feature gate、原子发布顺序及 old
client/new server 的 typed reject 测试;若依赖现有原子发布契约,明确引用并增加验证。在
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md:17-17 使用同一版本门接入 C2S production
decode/dispatch 与 gate matrix,并覆盖 new client/old server 的拒绝测试,确保混合版本不会进入业务处理。
---
Outside diff comments:
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Around line 12-17: 在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
第12-17行的“接入面”中补充准确、可核验的 worldview.md 锚点,覆盖 wire、作用域广播及跨仓库契约依据;在
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第12-17行的对应“接入面”中补充覆盖 C2S
门禁、距离、维度和所有权规则的 worldview.md 锚点。两处均需保留进料、出料、共享类型/event/schema
与跨仓库契约内容,并仅引用能支持计划范围的具体章节和行号。
---
Duplicate comments:
In `@docs/plan-refactor-server-session-v1.md`:
- Around line 1-3: Update the header of docs/plan-refactor-server-session-v1.md
at lines 1-3 by adding a complete “接入面” section covering inputs, outputs, shared
types/events/schemas, server/agent/client cross-repository contracts, and an
accurate worldview.md §X line anchor. Also update
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md at lines 13-19 with
the accurate worldview.md section and line reference, explicitly defining “zero
wire changes” as the server/agent/client contract.
- Around line 174-188: 在“## 3.1 决议(原开放问题 §N.1)”之前恢复“## 3 开放问题”章节,列出与“决议 1”和“决议
2”对应的 P0 开放问题并明确标记已解决状态;保留现有各决议的结论、实施方案、边界与拒绝理由,以及文件:行号和 plan 章节双锚点内容不变。
- Line 271: 为 docs/plan-refactor-server-session-v1.md 的末尾补齐 §10 实施工作流,包含 P0-P4
依赖顺序、中文 atomic commit、精确 Model trailer、Git/stash 约束、重新 review、Finish Evidence、每轨
docs-only 批量归档及自动归档流程;为
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md 的末尾补齐同类 §10,使用 P0-P5
阶段门禁。两个文件都必须明确单次 /consume-plan 全自动执行至 merge,并最终归档到 docs/finished_plans/。
- Around line 259-270: 为 P4
清单中的每个场景补充可执行实现锚点,不要只保留场景名称和断言;至少明确相关模块路径、类型/函数、schema 或 Redis key、跨仓库契约 symbol
及实际 bot 脚本路径。重点覆盖 server/src/session/registry.rs 中的
SessionRegistry、SessionDeliveryOutbox、R3/R10 transaction symbol,并为每项补充对应
scripts/bot/... 路径。
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Around line 54-58: 在文档末尾新增严格命名的“§10 实施工作流”,按依赖顺序覆盖 Wave 0、Wave 1、Wave
2、R1-R10、V 和 registry-datafication 的 PR 排序、依赖关系、原子边界、中文 commit、Model:
trailer、验收证据,以及“单次 consume-plan 全自动到 merge”章节;将现有 flash-review issue
消化流程顺延至后续编号,并保持计划原有依赖与阶段约束。
🪄 Autofix (Beta)
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: c5657253-954d-4694-ac76-5f261109eccd
📒 Files selected for processing (8)
docs/plan-refactor-client-store-lifecycle-v1.mddocs/plan-refactor-server-session-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-server-session-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.md
💤 Files with no reviewable changes (1)
- docs/plans-skeleton/plan-refactor-server-session-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/plan-refactor-client-store-lifecycle-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-server-session-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/plan-refactor-client-store-lifecycle-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-server-session-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-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/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-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/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-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/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-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-client-ui-base-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.md
🪛 LanguageTool
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
[grammar] ~45-~45: Ensure spelling is correct
Context: ...sfer_resync:bot 跨位面→断言 env/season/zone 大气全量重发。 3. wire_contract_sweep`:对 144 S2C 变体的 sample 对拍在 CI 常绿(配 proto-br...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/plan-refactor-server-session-v1.md
[grammar] ~96-~96: Ensure spelling is correct
Context: ...connected_clients及 R3 player save 前接收 disconnect。 2.Checkpointed`:停止 tick → 写 checkpoint(包含 escrow,但不执行 refu...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~246-~246: Ensure spelling is correct
Context: ... volatile adapter;断线/跨维/关服不再 tick 或结算离线 actor。 - qi refund/release 测试从 SPIRIT_QI_TOTAL 与 ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.23.1)
docs/plan-refactor-server-session-v1.md
[warning] 133-133: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
🔇 Additional comments (7)
docs/plan-refactor-server-session-v1.md (3)
72-75: 🗄️ Data Integrity & Integration统一
SessionPhase的状态集合。
SessionPhase当前包含六个 variant:Running、Paused、Suspended、AwaitingDelivery、DeliveryPending、Terminal。PR objective 声明冻结五态生命周期,但本文件将DeliveryPending也定义为 phase。请在 P0 冻结前明确它是第六个 durable handoff state,还是应移到独立的 delivery state,并同步更新 transition、consumer contract 和 acceptance pins。
5-71: LGTM!Also applies to: 76-126, 131-132, 134-145, 147-173, 189-258
127-130: 🔒 Security & PrivacySensitive Data Exposure (CWE-359)
补充完整 delivery payload 的访问控制和 retention 合同。
docs/plan-refactor-server-session-v1.md#L127-L130:为ResolvedDisposition的 payload 定义 operator read ACL、tenant isolation、访问审计和 erasure deadline。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L55-L56:不要把完整 payload 的保留边界完全延期到后续阶段;至少冻结一个可验证的最小保护合同。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md (1)
21-44: LGTM!Also applies to: 49-54, 58-64
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)
28-34: LGTM!Also applies to: 38-40, 46-47, 53-54
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md (1)
3-7: LGTM!Also applies to: 36-36, 40-43
docs/plans-skeleton/plan-refactor-master-v1.md (1)
54-58: 🗄️ Data Integrity & Integration无需修改当前总纲的
R10 deliver表述。
plan-refactor-server-session-v1.md已明确R10 P1 deliver由库存核心冻结 contract,R10 P2把 craft/alchemy/forge production delivery 迁入执行点;R3只负责 durable outbox handoff 与 receipt 预留,不定义InventoryTxn::deliver,不会形成 R1↔R10 循环。
Central reviewDecision: The review could not complete safely. No approval or code finding was inferred from the failed stages.
|
Central reviewDecision: Validated findings[major] Register the mandatory Agent craft-schema producer in the plan graph
The changed ownership rule says an independent Agent-track craft-schema batch "must" land before R6 P1 and must deliver the TypeBox source, generated schema/dist, and variant count. However, the actual Agent-track inventory in §6.11 (line 84) contains only the pre-existing named active/skeleton plans and does not contain a craft-schema plan or phase, while the wave schedule (lines 53-55) also schedules no Agent craft-schema work. Consequently the documented production chain has no actionable owner that can produce R6's prerequisite: R6 is required to consume frozen artifacts it is forbidden to edit, so R6 P1 and every downstream CraftOpen/Pause/Resume path remain blocked. The surrounding R6/R4/R7/R1 assignments cannot fill this gap because this same line explicitly reserves all source/generated/dist files to the absent Agent delivery. Root cause: the plan introduces a mandatory cross-track producer as an informal "independent batch" but does not register that batch as a concrete agent plan/phase in the master coverage and wave schedule, leaving the first producer in the craft lifecycle wiring chain unscheduled. [major] Payload boundary test rejects the contract's valid maximum
The plan first defines the payload contract as Root cause: the payload-size acceptance case conflates the inclusive maximum with the first invalid value, leaving the serialization/storage boundary internally contradictory instead of pinning [major] Final acceptance gate omits the three newly required bot scenarios
The changed acceptance section says the bot e2e gate covers only Root cause: the final acceptance declaration was not updated when the plan added three mandatory bot scenarios, leaving two conflicting definitions of completion in the same document. [major] Losing a concurrent busy-claim race permanently leaks delivery quota
The new contract requires every checkpointed session to reserve durable terminal-obligation capacity before obtaining its gameplay claim ("在取得 claim 前预留"), while Root cause: admission is split across a durable quota reservation and an in-memory busy-claim acquisition without a shared linearization/rollback contract. the plan mandates reservation first but defines reservation release only for terminal delivery outcomes, omitting cancellation of an unconsumed reservation when claim acquisition or subsequent admission validation fails. [major] Terminal delivery outbox has no planned production consumer
The changed R3 P1 deliverable creates Root cause: the diff adds the durable terminal-delivery producer and storage contract to r3, but the cross-track plan set never assigns the matching production outbox worker, cas/lease processing, receipt commit, and acknowledgement deliverables to an implementable r10 phase. references to a future “r10 durable-delivery” window do not create that consumer in r10's canonical scope. [major] Restore retries cannot reuse the durable terminal reservation
A normally admitted checkpointed session first creates Root cause: [major] Craft migration is allowed before workbench identity can survive restart
The new Wave 2 gate allows the craft host migration after Root cause: the dependency graph treats a runtime |
以唯一 reservation 状态矩阵消除额度泄漏和重复计量,并为 craft schema、稳定工作台身份及 terminal outbox 建立可执行的生产消费与验收顺序。 Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
保留生命周期与生产消费表为唯一权威,将重复规则收敛为规范性引用,使结构整改保持可执行且控制文档体量。 Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (7)
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md (3)
13-19: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win补齐 plan header 的
worldview.md锚点。
## 接入面已列出进料、出料、共享类型和跨仓库契约,但没有worldview.md §X L<line>锚点。请补充准确的章节和行号,不要自动修改docs/worldview.md。As per coding guidelines,新 plan 头部必须写明完整接入面和对应的
worldview.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-persistence-slices-v1.md` around lines 13 - 19, 在计划头部的“接入面”部分补充准确的 docs/worldview.md 章节与行号锚点,覆盖该计划涉及的接入契约;不要修改 docs/worldview.md 本身,并保留现有进料、出料、共享类型和跨仓库契约内容。Source: Coding guidelines
57-58: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift在释放 obligation quota 前冻结有界 retention。
ResolvedDisposition必须保留完整 payload,但当前计划允许在释放 quota 后无限保留 durable disposition。这样 admission quota 可以重复复用,而 disposition payload 持续占用数据库容量。
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L57-L58:定义 bounded retention/compaction、独立 disposition quota 或等价 storage budget。docs/plan-refactor-server-session-v1.md#L127-L130:把 quota release 绑定到已完成的 retention/compaction 边界。docs/plan-refactor-inventory-core-v1.md#L57-L57:让 worker、scanner 和 operator resolve 遵守同一释放条件。🤖 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-persistence-slices-v1.md` around lines 57 - 58, 在 docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:57-58 中更新 ResolvedDisposition 设计:在释放 obligation quota 前明确有界 retention/compaction、独立 disposition quota 或等价 storage budget。同步修改 docs/plan-refactor-server-session-v1.md:127-130,使 quota release 绑定已完成的 retention/compaction 边界;修改 docs/plan-refactor-inventory-core-v1.md:57,使 worker、scanner 与 operator resolve 统一遵守该释放条件。
16-16: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win移除接入面中的旧 reservation API。
Line 16 仍要求调用
reserve_terminal_obligation(session_key),并描述 create-only 的+Q行为。Line 25 又明确废止该语义,改用reserve_new_terminal_obligation、reuse_terminal_obligation和cancel_unconsumed_reservation。请直接更新接入面文本。否则实现者可能在 restore/retry 时重复增加 quota,或遗漏 busy loser 的
-Q。Also applies to: 25-25
🤖 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-persistence-slices-v1.md` at line 16, 更新接入面中描述 terminal obligation reservation 的文字,移除旧的 reserve_terminal_obligation(session_key) 及其仅执行 +Q 的 create-only 语义。改为明确使用 reserve_new_terminal_obligation、reuse_terminal_obligation 和 cancel_unconsumed_reservation,并保留 restore/retry 不重复增加 quota、busy loser 正确执行 -Q 的行为。docs/plan-refactor-server-session-v1.md (2)
77-77: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win统一 outbox 状态集合。
DeliveryOutboxState在 Line 77 只定义了Pending、InFlight、DeadLetter、Committed和ResolvedDisposition。但 Line 145-148 又使用CommittedReleased和DispositionReleased作为持久状态。请选择一个唯一的持久状态模型。否则 worker、恢复和 quota replay 无法确定应读写哪个状态。若
Released是派生状态,请改为独立的 release 标记;若它是持久状态,请加入 enum 并补齐转移规则。Also applies to: 145-148
🤖 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/plan-refactor-server-session-v1.md` at line 77, 统一 DeliveryOutboxState 的持久状态模型:在 DeliveryOutboxState 及 Line 145-148 的 worker、恢复和 quota replay 语义中,明确 CommittedReleased 与 DispositionReleased 是派生状态还是持久 enum 成员;若为持久状态,将其加入 enum 并补齐所有状态转移及 (state,generation) CAS 规则,若为派生状态则改用独立 release 标记,并确保所有读写路径采用同一模型。
191-191: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win改用 R10 的唯一
deliver合同。Line 191 冻结了
deliver(delivery_id, items) -> Delivered | Spilled(fallback)。但docs/plan-refactor-inventory-core-v1.mdLine 28-38 的 canonical contract 是InventoryTxn::deliver(DeliveryRequest, Option<&mut SpillContext>) -> Result<InventoryDeliveryReceipt, InventoryTxnError>。请删除第二套 API 表述,并明确
delivery_id如何进入DeliveryRequest、如何生成 receipt,以及如何处理 spill。否则 R1 与 R10 会实现不兼容的生产接口。🤖 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/plan-refactor-server-session-v1.md` at line 191, 更新退款交付表述,统一采用 R10 的唯一 `InventoryTxn::deliver(DeliveryRequest, Option<&mut SpillContext>) -> Result<InventoryDeliveryReceipt, InventoryTxnError>` 合同;删除 `deliver(delivery_id, items) -> Delivered | Spilled(fallback)` 这套并行 API,并明确将 `delivery_id` 写入 `DeliveryRequest`、由成功调用生成 `InventoryDeliveryReceipt`,以及通过 `SpillContext` 处理 spill。docs/plans-skeleton/plan-agent-craft-schema-v1.md (1)
40-47: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win补充“开放问题”章节。
当前计划直接进入验收和
Finish Evidence,没有列出未决问题。请先列出仍需在 P0 前收口的边界、依赖和验收决策。不要在 skeleton 阶段提前填写§N.1 决议;进入 active 且完成 P0 前核查后,再补充结论、实施方案、边界条件和双锚点。Based on learnings,当前阶段只需补充开放问题,不要求现在填写
§N.1 决议。🤖 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-agent-craft-schema-v1.md` around lines 40 - 47, 在“验收与边界”之前补充“开放问题”章节,列出进入 P0 前仍需收口的边界、依赖和验收决策。仅记录待决事项,不提前填写“§N.1 决议”;待计划进入 active 并完成 P0 核查后,再补充结论、实施方案、边界条件和双锚点。Sources: Coding guidelines, Learnings
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)
53-54: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win在两个多 PR plan 末尾补齐
§10 实施工作流。当前两个 plan 都在多阶段交付后直接结束,没有定义依赖顺序、提交约束、重新 review 和自动归档流程。
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L53-L54: 追加 P0-P5 的序列化实施流程,以及每个 PR 只修改一个 plan、中文 atomic commit、Model: <精确模型 id>trailer、危险 Git 操作禁止项和自动归档规则。docs/plans-skeleton/plan-refactor-c2s-gate-v1.md#L40-L44: 追加 P0-P4 的相同工作流,并明确 gate matrix 验收后再进入归档。- 两个 plan 都必须在
§10最末包含“单次 consume-plan 全自动到 merge”。As per coding guidelines,多 PR plan 必须包含
§10 实施工作流。Based on learnings,实施和归档默认保持每个 PR 只修改一个 plan。
🤖 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-wire-s2c-v1.md` around lines 53 - 54, 在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 第53-54行末尾追加 §10 实施工作流,定义 P0-P5 的依赖顺序、每个 PR 只修改一个 plan、中文 atomic commit、精确的 “Model: <模型 id>” trailer、禁止危险 Git 操作、重新 review 与自动归档,并以“单次 consume-plan 全自动到 merge”收尾;在 docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第40-44行末尾追加对应的 §10,覆盖 P0-P4,并明确 gate matrix 验收后才能归档及同样的提交约束和自动流程。Sources: Coding guidelines, Learnings
♻️ Duplicate comments (3)
docs/plan-refactor-server-session-v1.md (2)
291-291: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win补齐三份计划末尾的
§10 实施工作流。这些计划均包含多个 PR 阶段,但末尾没有依赖顺序、中文 atomic commit、
Model: <精确模型 id>trailer、重新 review 和自动归档流程。Deferred-to-implementation-wave不能替代实施工作流。
docs/plan-refactor-server-session-v1.md#L291-L291:在文件末尾新增§10 实施工作流。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L160-L171:将 deferred decisions 与实施顺序分开,并补齐 workflow。docs/plan-refactor-inventory-core-v1.md#L160-L171:补齐 P1-P4、P2a/P2b/P2c 的依赖序列和归档规则。
§10最末必须包含“单次 consume-plan 全自动到 merge”,明确用户提交/consume-plan后可等待最终归档至docs/finished_plans/。As per coding guidelines,scope 大于或等于 4 个 PR 的 plan 必须在末尾包含
§10 实施工作流。🤖 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/plan-refactor-server-session-v1.md` at line 291, 在 docs/plan-refactor-server-session-v1.md 第291行末尾新增 §10 实施工作流;在 docs/plans-skeleton/plan-refactor-persistence-slices-v1.md 第160-171行分离 deferred decisions 与实施顺序并补齐该工作流;在 docs/plan-refactor-inventory-core-v1.md 第160-171行补充 P1-P4、P2a/P2b/P2c 的依赖序列和归档规则。三份 §10 均需包含依赖顺序、中文 atomic commit、精确的 Model: <模型 id> trailer、重新 review、自动归档,以及“单次 consume-plan 全自动到 merge”,明确提交 /consume-plan 后可持续至最终归档到 docs/finished_plans/。Source: Coding guidelines
165-165: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift在 coupled restore 中定义
TsyPresence失败回退。当前验收只要求缺失或非法 presence 时不 attach 并拒绝 TSY 请求。它没有冻结 position/dimension 是否仍会恢复。这样可能形成“玩家位于 TSY,但没有有效 presence”的断裂状态。
docs/plan-refactor-server-session-v1.md#L165-L165:presence 校验失败时,禁止恢复 TSY position/dimension,或移动到独立可信的安全位置和维度。docs/plan-refactor-server-session-v1.md#L288-L288:为四类 guarded-load 失败增加上述回退断言。docs/plans-skeleton/plan-refactor-persistence-slices-v1.md#L49-L50:在同一恢复事务中验证回退。不得从损坏的return_to推导目标。🤖 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/plan-refactor-server-session-v1.md` at line 165, 问题:coupled restore 在 TsyPresence 校验失败时未定义位置与维度的安全回退,可能恢复出位于 TSY 但无有效 presence 的状态。更新 docs/plan-refactor-server-session-v1.md:165 的 TsyPresence/guarded restore 规则,明确失败时禁止恢复 TSY position/dimension,或仅移动到独立可信的安全位置和维度;在 docs/plan-refactor-server-session-v1.md:288 的四类 guarded-load 失败验收中加入该回退断言;在 docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:49-50 明确回退必须在同一恢复事务中完成验证,且不得从损坏的 return_to 推导目标。docs/plans-skeleton/plan-refactor-master-v1.md (1)
9-9: 📐 Maintainability & Code Quality | 🟠 Major在计划头部补齐接入面与跨仓契约。
当前头部没有列出进料、出料、复用的 shared type/event/schema、server/agent/client 跨仓契约,也没有
worldview.md §X L<line>锚点。请在§0前增加“接入面与冻结合同”小节。As per coding guidelines,
docs/**/*.md新 plan 头部必须写明进料、出料、复用的共享类型/event/schema、跨仓契约和worldview.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 9, 在计划正文的 §0 之前新增“接入面与冻结合同”小节,明确列出计划的进料、出料、复用的 shared type/event/schema、server/agent/client 跨仓契约,并补充对应的 worldview.md §X L<line> 锚点;保留现有 R1-R10 修改范围及 §6.11-6.12 独立交付约束不变。Source: Coding guidelines
🤖 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/plan-refactor-inventory-core-v1.md`:
- Line 55: 在 docs/plan-refactor-inventory-core-v1.md 第55行定义唯一的 terminal-delivery
transaction coordinator API,并明确 R10 worker 如何加入同一 R3 durable transaction,涵盖
rollback、ack、quota release 责任。同步更新 docs/plan-refactor-server-session-v1.md
第240-244行统一 R3/R10 ownership 与上述协调边界;更新
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md 第24行,使 P1 acceptance
引用同一 transaction boundary,避免双重 durable commit。
In `@docs/plans-skeleton/plan-agent-craft-schema-v1.md`:
- Around line 14-17: 补齐三个 plan 的接入面锚点:在
docs/plans-skeleton/plan-agent-craft-schema-v1.md 第14-17行的“接入面与冻结合同”中加入
server/agent/client 跨仓库契约、复用的共享 schema/type/event,以及对应的 worldview.md §X L<line>
锚点;在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md 第12-17行和
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第12-17行分别加入对应的 worldview.md §X
L<line> 锚点,并确保新增 plan 的接入面字段完整。
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Around line 53-58: 在计划文档中新增严格命名的“§10 实施工作流”章节,按依赖顺序编排并序列化所有实施 PR,覆盖 scope 不少于
4 个 PR 的执行流程;将现有 flash-review issue 消化流程顺延至后续章节,并在“§10 实施工作流”末尾明确单次
`/consume-plan` 可自动执行至合并并归档到 `docs/finished_plans/`。
- Around line 64-65: 明确要求 Craft admission 校验与 BusyClaim 获取由单一 owner 通过同一事务、锁或
compare-and-claim 原子完成,覆盖 R4 的实体存活、WorkbenchBlock、同维、距离、owner、busy、facility 检查及
R1 的 try_acquire/BusyClaim 映射;任一检查结果过期或发生占用冲突时必须拒绝请求,不能依赖 race tests 替代原子性约束。
- Line 64: 为 CraftPause 和 CraftResume 定义并实现独立的 R4/R10 授权 gate,在执行状态转移前校验认证连接的
caller identity 属于目标 session 的 owner 或具备明确授权关系;不要依赖 CraftOpen 的 owner
gate,也不要仅信任请求中的 session identity/version。更新协议与处理流程以传递并验证所需 caller/session
归属信息,并确认两个 handler 在授权失败时拒绝请求且不会修改会话状态。
- Line 64: Update the CraftPause/CraftResume contract wording in the plan so
“hydrated session identity/version” uses the exact required fields “session_key
+ generation” defined by plan-agent-craft-schema-v1.md §4; ensure it continues
to state that target is not included and aligns the R6, R4, R7, and R1 payload
terminology.
- Line 75: 更新计划中所有使用“116”的 C2S 变体数量记录,明确区分当前 registry 基线 113 与合入三个新增 craft
intent 后的目标 116,并列出这三个变体及 generated registry、SHA 和 sample 证据。同步为“144
S2C”补充同类生成证据,覆盖 `craft proto/Rust mirror/converter/samples` 条目及其他对应位置,避免在
A-CS/R6 尚未合入时将目标值误报为当前值。
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Line 17: Define and apply one unified protocol/schema version gate for S2C,
CraftSessionStateV2, and the new Craft intents: document the minimum versions
and feature gate, specify atomic publication order (or cite the deployment
contract and add verification), and require typed rejection before
decode/dispatch for incompatible peers. In
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md:17-17, cover S2C/intent
producers plus tests rejecting old clients; in
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md:17-17, apply the same gate to
production C2S decode/dispatch and test both new-client/old-server rejection
paths.
---
Outside diff comments:
In `@docs/plan-refactor-server-session-v1.md`:
- Line 77: 统一 DeliveryOutboxState 的持久状态模型:在 DeliveryOutboxState 及 Line 145-148 的
worker、恢复和 quota replay 语义中,明确 CommittedReleased 与 DispositionReleased 是派生状态还是持久
enum 成员;若为持久状态,将其加入 enum 并补齐所有状态转移及 (state,generation) CAS 规则,若为派生状态则改用独立
release 标记,并确保所有读写路径采用同一模型。
- Line 191: 更新退款交付表述,统一采用 R10 的唯一 `InventoryTxn::deliver(DeliveryRequest,
Option<&mut SpillContext>) -> Result<InventoryDeliveryReceipt,
InventoryTxnError>` 合同;删除 `deliver(delivery_id, items) -> Delivered |
Spilled(fallback)` 这套并行 API,并明确将 `delivery_id` 写入 `DeliveryRequest`、由成功调用生成
`InventoryDeliveryReceipt`,以及通过 `SpillContext` 处理 spill。
In `@docs/plans-skeleton/plan-agent-craft-schema-v1.md`:
- Around line 40-47: 在“验收与边界”之前补充“开放问题”章节,列出进入 P0
前仍需收口的边界、依赖和验收决策。仅记录待决事项,不提前填写“§N.1 决议”;待计划进入 active 并完成 P0
核查后,再补充结论、实施方案、边界条件和双锚点。
In `@docs/plans-skeleton/plan-refactor-persistence-slices-v1.md`:
- Around line 13-19: 在计划头部的“接入面”部分补充准确的 docs/worldview.md
章节与行号锚点,覆盖该计划涉及的接入契约;不要修改 docs/worldview.md 本身,并保留现有进料、出料、共享类型和跨仓库契约内容。
- Around line 57-58: 在
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:57-58 中更新
ResolvedDisposition 设计:在释放 obligation quota 前明确有界 retention/compaction、独立
disposition quota 或等价 storage budget。同步修改
docs/plan-refactor-server-session-v1.md:127-130,使 quota release 绑定已完成的
retention/compaction 边界;修改 docs/plan-refactor-inventory-core-v1.md:57,使
worker、scanner 与 operator resolve 统一遵守该释放条件。
- Line 16: 更新接入面中描述 terminal obligation reservation 的文字,移除旧的
reserve_terminal_obligation(session_key) 及其仅执行 +Q 的 create-only 语义。改为明确使用
reserve_new_terminal_obligation、reuse_terminal_obligation 和
cancel_unconsumed_reservation,并保留 restore/retry 不重复增加 quota、busy loser 正确执行 -Q
的行为。
In `@docs/plans-skeleton/plan-refactor-wire-s2c-v1.md`:
- Around line 53-54: 在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
第53-54行末尾追加 §10 实施工作流,定义 P0-P5 的依赖顺序、每个 PR 只修改一个 plan、中文 atomic commit、精确的
“Model: <模型 id>” trailer、禁止危险 Git 操作、重新 review 与自动归档,并以“单次 consume-plan 全自动到
merge”收尾;在 docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第40-44行末尾追加对应的
§10,覆盖 P0-P4,并明确 gate matrix 验收后才能归档及同样的提交约束和自动流程。
---
Duplicate comments:
In `@docs/plan-refactor-server-session-v1.md`:
- Line 291: 在 docs/plan-refactor-server-session-v1.md 第291行末尾新增 §10 实施工作流;在
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md 第160-171行分离 deferred
decisions 与实施顺序并补齐该工作流;在 docs/plan-refactor-inventory-core-v1.md 第160-171行补充
P1-P4、P2a/P2b/P2c 的依赖序列和归档规则。三份 §10 均需包含依赖顺序、中文 atomic commit、精确的 Model: <模型 id>
trailer、重新 review、自动归档,以及“单次 consume-plan 全自动到 merge”,明确提交 /consume-plan
后可持续至最终归档到 docs/finished_plans/。
- Line 165: 问题:coupled restore 在 TsyPresence 校验失败时未定义位置与维度的安全回退,可能恢复出位于 TSY 但无有效
presence 的状态。更新 docs/plan-refactor-server-session-v1.md:165 的
TsyPresence/guarded restore 规则,明确失败时禁止恢复 TSY
position/dimension,或仅移动到独立可信的安全位置和维度;在
docs/plan-refactor-server-session-v1.md:288 的四类 guarded-load 失败验收中加入该回退断言;在
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md:49-50
明确回退必须在同一恢复事务中完成验证,且不得从损坏的 return_to 推导目标。
In `@docs/plans-skeleton/plan-refactor-master-v1.md`:
- Line 9: 在计划正文的 §0 之前新增“接入面与冻结合同”小节,明确列出计划的进料、出料、复用的 shared
type/event/schema、server/agent/client 跨仓契约,并补充对应的 worldview.md §X L<line>
锚点;保留现有 R1-R10 修改范围及 §6.11-6.12 独立交付约束不变。
🪄 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: 39fc7b5e-25b4-4997-9916-3941bdd44ffa
📒 Files selected for processing (7)
docs/plan-refactor-inventory-core-v1.mddocs/plan-refactor-server-session-v1.mddocs/plans-skeleton/plan-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plan-refactor-server-session-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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plan-refactor-inventory-core-v1.mddocs/plans-skeleton/plan-refactor-master-v1.mddocs/plan-refactor-server-session-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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/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-agent-craft-schema-v1.mddocs/plans-skeleton/plan-refactor-c2s-gate-v1.mddocs/plans-skeleton/plan-refactor-persistence-slices-v1.mddocs/plans-skeleton/plan-refactor-wire-s2c-v1.mddocs/plans-skeleton/plan-refactor-master-v1.md
🪛 LanguageTool
docs/plans-skeleton/plan-agent-craft-schema-v1.md
[grammar] ~38-~38: Ensure spelling is correct
Context: ...gest、最终 C2S/S2C count 与 exports。R6 只接受该 SHA并做 TypeBox↔proto/Rust/client roundtrip;不一致...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
docs/plan-refactor-inventory-core-v1.md
[style] ~130-~130: Consider using the more formal “until”.
Context: ...ot-only baseline 不通过。 10. forge 深链保留;另锁 /give hoe_iron → 新 snapshot → 真实非零 instance → held/equip → lingtian_start_till,禁止 instance_id=0 或任意 server-data 冒充成...
(TILL)
[grammar] ~133-~133: Ensure spelling is correct
Context: ...ation failure 保留旧行可重试。 ## 8. Named bot acceptance(P4) 以下名称即 scripts/bot/scenarios/<name>.py ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🔇 Additional comments (10)
docs/plan-refactor-server-session-v1.md (1)
40-76: LGTM!Also applies to: 81-118, 134-144, 152-164, 169-190, 252-262
docs/plans-skeleton/plan-refactor-persistence-slices-v1.md (3)
1-3: 📐 Maintainability & Code Quality核对 skeleton plan 的三态元数据。
此文件位于
docs/plans-skeleton/。可见头部只有阶段列表,没有显示 skeleton、active、finished 状态和 Finish Evidence。请先读取docs/CLAUDE.md,确认这些字段是否位于未展示段落;若缺失,请补齐元数据,但不要在 P0 验真前提前填写§N.1 决议。As per coding guidelines,
docs/plans-skeleton/**/*.md必须遵循三态流转和 Finish Evidence 结构。Based on learnings,应先核对docs/CLAUDE.md的 Plan 消费规范。Sources: Coding guidelines, Learnings
19-19: 🗄️ Data Integrity & Integration核对真元释放出口。
Line 19 指定
release_dormant_qi_to_zone。编码规则要求释放使用qi_release_to_zone,并通过qi_physics::ledger::QiTransfer。如果前者是严格委托给 canonical API 的 wrapper,请在计划中明确该关系并增加守恒测试;否则请改用 canonical API。As per coding guidelines,所有真元流动必须通过
QiTransfer,释放必须使用qi_release_to_zone。Source: Coding guidelines
67-67: 🎯 Functional Correctness无需修正 Cargo 验收命令的过滤语义。
--package bong-server只选择包;没有 test target filter 时,Cargo 会运行该包下的测试 target,persistence在此处是传给测试用例的 name filter,而不是选择模块的 Cargo flag。> Likely an incorrect or invalid review comment.docs/plan-refactor-inventory-core-v1.md (1)
117-158: LGTM!docs/plans-skeleton/plan-refactor-master-v1.md (2)
61-63: LGTM!Also applies to: 66-66
68-74: LGTM!Also applies to: 76-79, 87-101
docs/plans-skeleton/plan-agent-craft-schema-v1.md (1)
1-12: LGTM!Also applies to: 18-38
docs/plans-skeleton/plan-refactor-wire-s2c-v1.md (1)
21-25: LGTM!Also applies to: 38-40, 46-47
docs/plans-skeleton/plan-refactor-c2s-gate-v1.md (1)
3-7: LGTM!Also applies to: 18-24, 36-36
| ## 接入面与冻结合同 | ||
|
|
||
| - **进料**:总纲 §4 canonical shape、R1 phase/identity/generation、`agent/packages/schema/src/{craft.ts,client-request.ts,server-data.ts,schema-registry.ts}`。 | ||
| - **出料/owner**:本 plan 唯一修改 `agent/packages/schema/**`,原子交付 `CraftOpen`、`CraftPause`、`CraftResume`、`CraftSessionStateV2` 的 source/generated/dist;R6 只消费记录 SHA,不回改 Agent artifacts。 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
统一补齐三个 plan 的接入面锚点。
三个 plan 都缺少 worldview.md §X L<line> 锚点。该缺口会阻断后续实现对共享世界观规则和跨轨合同的追溯。
docs/plans-skeleton/plan-agent-craft-schema-v1.md#L14-L17: 增加 server/agent/client 跨仓库契约、复用的共享 schema/type/event,以及worldview.md §X L<line>锚点。docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L12-L17: 增加对应的worldview.md §X L<line>锚点。docs/plans-skeleton/plan-refactor-c2s-gate-v1.md#L12-L17: 增加对应的worldview.md §X L<line>锚点。
As per coding guidelines,新增 plan 的接入面必须包含这些字段。
📍 Affects 3 files
docs/plans-skeleton/plan-agent-craft-schema-v1.md#L14-L17(this comment)docs/plans-skeleton/plan-refactor-wire-s2c-v1.md#L12-L17docs/plans-skeleton/plan-refactor-c2s-gate-v1.md#L12-L17
🤖 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-agent-craft-schema-v1.md` around lines 14 - 17, 补齐三个
plan 的接入面锚点:在 docs/plans-skeleton/plan-agent-craft-schema-v1.md
第14-17行的“接入面与冻结合同”中加入 server/agent/client 跨仓库契约、复用的共享 schema/type/event,以及对应的
worldview.md §X L<line> 锚点;在 docs/plans-skeleton/plan-refactor-wire-s2c-v1.md
第12-17行和 docs/plans-skeleton/plan-refactor-c2s-gate-v1.md 第12-17行分别加入对应的
worldview.md §X L<line> 锚点,并确保新增 plan 的接入面字段完整。
Source: Coding guidelines
| - **Wave 0(立即并行)**:V(bot 骨干 + build token 最先)、R3、R5、R2、registry-datafication;同时全部轨道的 P0(设计收口 + 吸收清单验真)都可开工。§6.11 登记的 Agent `A-CS`(`plan-agent-craft-schema-v1`)也在本波启动并独立提交,必须先于 R6 P1 合入。 | ||
| - **Wave 1**:R6(R2 + Agent `A-CS` 合入后)、R7 基础设施(R2 合入后)、R1 framework-only(仅 `InteractionSession`/registry/lifecycle 骨架,R3 P1 合入后;不得宣称 craft pause/resume 或 delivery 生产闭环)。 | ||
| - **Wave 2**:R4(#1287 + R6 P1 后)、R9(R5/R6/R2 P1 后)、R10(R3 P1 后);R1 宿主迁移按显式 gate 分批放行:craft 需 Agent `A-CS` + R3 P1 reservation/outbox + R3 P4 placeable-entity stable `placed_id` 持久化/hydration/runtime 映射 + R6 craft intents + R4 craft handler/gate + R7 P2 Craft Screen + R2 P1 已登记的 `CraftStore` + R10 P1 `deliver`/receipt contract + R10 P2c production outbox worker,alchemy/forge 同样需 R3 P1 与 R10 P2c,`TsyPresence` 需 R3 P1 auxiliary Slice 与 R3 P4 restore parity。 | ||
| - 近完成独立 plan(§6.9)在 Wave 0 窗口内优先收尾清场。 | ||
| - R5 P1(字段收私有的全仓编译大爆破)挑在飞 PR 队列清空的窗口单独合入。 | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major
补充严格命名的 §10 实施工作流。
本计划包含多轨道和多 PR 依赖,但当前 §10 是 flash-review issue 消化流程,不是按依赖顺序编排实施 PR 的工作流。请新增严格命名的 §10 实施工作流,将 flash-review 流程顺延,并在该节末尾写明单次 /consume-plan 可自动执行至 merge 并归档到 docs/finished_plans/。
As per coding guidelines,scope 大于或等于 4 个 PR 的 plan 必须包含 §10 实施工作流,并在同一 plan 内序列化多个 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` around lines 53 - 58,
在计划文档中新增严格命名的“§10 实施工作流”章节,按依赖顺序编排并序列化所有实施 PR,覆盖 scope 不少于 4 个 PR 的执行流程;将现有
flash-review issue 消化流程顺延至后续章节,并在“§10 实施工作流”末尾明确单次 `/consume-plan` 可自动执行至合并并归档到
`docs/finished_plans/`。
Source: Coding guidelines
| - `persistence/**`+autosave=R3;`session/`+7 域 session.rs=R1;`client_request_handler.rs`+`gate/`=R4;`*_emit.rs` 公共层+`proto_convert.rs`=R6;`qi_physics/**`+qi 字段直写行=R5;`inventory/**`=R10;cast/AV emit+skill 注册=R9。 | ||
| - client:Store 生命周期+`clearClientStateOnDisconnect` 区段=R2;channel 注册区段+桥+router=R6(与 R2 同文件不同区段,merge 前互 fetch);Screen/hud/keybind/InspectScreen=R7;combat cast store=R9。 | ||
| - `agent/packages/schema/src/**`、generated JSON Schema 与提交的 `@bong/schema` dist=§6.11 Agent 轨;craft schema prerequisite 的 production owner 是 Agent 轨的独立 craft-schema 交付批次,必须在 R6 P1 前提交并验收 TypeBox source、generated schema/dist 与变体计数。理由:TypeBox 是 agent-side source of truth,生成物必须与 source 同 owner 原子提交;让 R6 同时改 source 和 wire 会违反本总纲的 agent 排除边界并形成双 owner。R6 独占 proto/Rust mirror/converter、client wire encode/send 与 bridge/router plumbing,只消费该冻结版本并负责一次性 wire 反映。R6、R4、R7、R1 的 craft gate 均以本处 ownership 决议为准。 | ||
| - CraftOpen target bridge(跨轨 canonical contract):`CraftOpen` 必须携带 required `target` 判别联合:`Handcraft` 或 `Workbench { workbench_key }`,不得省略。`workbench_key` 是现有成功 S2C `WorkbenchOpen.entity_id` 的 ECS `Entity::to_bits()` locator:逻辑/Rust 类型 `u64`、protobuf `uint64`、JSON/TypeBox 为无符号十进制字符串;它只在当前进程的首次请求中定位 runtime entity,不是授权能力,也绝不写进 checkpoint。普通手搓发送 `Handcraft`;`WorkbenchScreen` 必须从 response 保留该 key 并在初次 `CraftOpen` 原样回传。R4 将 key 解析为 entity 后重验实体存活且携带 `WorkbenchBlock`、玩家同维且在既有距离内,并执行 owner/busy/facility gate。missing、malformed、stale、despawned、跨维或越距 key 均拒绝;R7 不得从 UI 猜测或改写 key。`CraftPause`/`CraftResume` 只携带 hydrated session identity/version,不重复 target。 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major
IDOR (CWE-639): Authorization Bypass Through User-Controlled Key (IDOR)
为暂停和恢复请求增加独立的调用者授权。
当前合同只描述 session identity/version,没有绑定认证连接中的 caller identity。若服务端接受请求中的 session identity,已认证客户端只要获得其他会话的 identity/version,就可能暂停或恢复其他玩家的会话。请在状态转移前校验 caller 是 session owner 或具备明确授权关系。不要依赖 CraftOpen 的 owner gate;请为 CraftPause 和 CraftResume 定义独立的 R4/R10 gate。当前未提供 handler 实现,请验证该校验确实存在。
🤖 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 64, 为 CraftPause 和
CraftResume 定义并实现独立的 R4/R10 授权 gate,在执行状态转移前校验认证连接的 caller identity 属于目标 session
的 owner 或具备明确授权关系;不要依赖 CraftOpen 的 owner gate,也不要仅信任请求中的 session
identity/version。更新协议与处理流程以传递并验证所需 caller/session 归属信息,并确认两个 handler
在授权失败时拒绝请求且不会修改会话状态。
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate files =="
git ls-files | rg '(^|/)plan-refactor-master-v1\.md$|(^|/)plan-agent-craft-schema-v1\.md$|(^|/)worldview\.md$' || true
echo "== outline context =="
for f in docs/plans-skeleton/plan-refactor-master-v1.md docs/plan-agent-craft-schema-v1.md; do
if [ -f "$f" ]; then
echo "--- $f line count"
wc -l "$f"
echo "--- $f relevant lines"
nl -ba "$f" | sed -n '1,120p'
fi
done
echo "== searches =="
rg -n "CraftPause|CraftResume|session_key|generation|version|target|hydrated" docs/plans-skeleton/plan-refactor-master-v1.md docs/plan-agent-craft-schema-v1.md docs || trueRepository: Kizunad/Bong
Length of output: 526
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
printf '%s\n' docs/plans-skeleton/plan-agent-craft-schema-v1.md docs/plans-skeleton/plan-refactor-master-v1.md docs/worldview.md
echo "== plan-refactor-master-v1 relevant lines =="
awk 'NR>=50 && NR<=75 {printf "%d:\t%s\n", NR, $0}' docs/plans-skeleton/plan-refactor-master-v1.md
echo "== plan-agent-craft-schema-v1 relevant lines =="
awk 'NR>=1 && NR<=40 {printf "%d:\t%s\n", NR, $0}' docs/plans-skeleton/plan-agent-craft-schema-v1.md
echo "== target schema mentions =="
rg -n "CraftPause|CraftResume|session_key|generation|version|target|hydrated|CraftOpen" docs/plans-skeleton/plan-agent-craft-schema-v1.md docs/plans-skeleton/plan-refactor-master-v1.mdRepository: Kizunad/Bong
Length of output: 9512
使用 CraftPause/CraftResume 的精确字段名。
docs/plans-skeleton/plan-agent-craft-schema-v1.md §4 将 pause/resume 合同定义为 required session_key + generation,且不得携带 target;总纲 line 64 的 hydrated session identity/version 会引入未定义的 version 别名。将 version 对齐为 generation,或同步两处字段名,避免 R6、R4、R7、R1 实现不一致的 payload。
🤖 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 64, Update the
CraftPause/CraftResume contract wording in the plan so “hydrated session
identity/version” uses the exact required fields “session_key + generation”
defined by plan-agent-craft-schema-v1.md §4; ensure it continues to state that
target is not included and aligns the R6, R4, R7, and R1 payload terminology.
| - CraftOpen target bridge(跨轨 canonical contract):`CraftOpen` 必须携带 required `target` 判别联合:`Handcraft` 或 `Workbench { workbench_key }`,不得省略。`workbench_key` 是现有成功 S2C `WorkbenchOpen.entity_id` 的 ECS `Entity::to_bits()` locator:逻辑/Rust 类型 `u64`、protobuf `uint64`、JSON/TypeBox 为无符号十进制字符串;它只在当前进程的首次请求中定位 runtime entity,不是授权能力,也绝不写进 checkpoint。普通手搓发送 `Handcraft`;`WorkbenchScreen` 必须从 response 保留该 key 并在初次 `CraftOpen` 原样回传。R4 将 key 解析为 entity 后重验实体存活且携带 `WorkbenchBlock`、玩家同维且在既有距离内,并执行 owner/busy/facility gate。missing、malformed、stale、despawned、跨维或越距 key 均拒绝;R7 不得从 UI 猜测或改写 key。`CraftPause`/`CraftResume` 只携带 hydrated session identity/version,不重复 target。 | ||
| - **Stable workbench addendum**:R4 还须从 R3 P4 registry 把 runtime entity 映射为唯一 `placed_id` 后才交 R1 持久化 claim;restore 以 `placed_id` 绑定本次 hydrate 的新 Entity。missing/duplicate/unhydrated mapping 按 `InvalidRestore` fail closed。 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major
把 Craft admission 校验与 BusyClaim 合并为原子操作。
Line 64 描述 R4 的实体、owner、busy、facility 检查。Lines 80-86 又把该 admission 映射到 R1 的 try_acquire 和 BusyClaim。当前合同没有要求检查和占用由同一事务、锁或 compare-and-claim 完成;race tests 也不能替代原子性约束。请明确单一 owner 执行原子检查并占用,并在结果过期或占用冲突时拒绝请求。
Also applies to: 80-86
🤖 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 64 - 65, 明确要求
Craft admission 校验与 BusyClaim 获取由单一 owner 通过同一事务、锁或 compare-and-claim 原子完成,覆盖 R4
的实体存活、WorkbenchBlock、同维、距离、owner、busy、facility 检查及 R1 的 try_acquire/BusyClaim
映射;任一检查结果过期或发生占用冲突时必须拒绝请求,不能依赖 race tests 替代原子性约束。
| | Artifact | Producer | Production consumer | Gate / evidence | | ||
| |---|---|---|---| | ||
| | craft TypeBox source + generated schema + committed dist | Agent `A-CS` P1-P2 | R6 P1 mirror/converter;agent runtime | A-CS SHA;正反 sample、freshness、variant count | | ||
| | craft proto/Rust mirror/converter/samples | R6 P1 | R4 P1 decode;R1 P1 emit | `A-CS`;buf/sample、116 C2S/144 S2C | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major
将 C2S 变体数量绑定到 registry-derived 基线和目标。
Lines 75、121、140 使用 116,但没有区分当前基线和 A-CS/R6 合入后的目标。上游合同在 docs/plan-agent-craft-schema-v1.md Lines 14-20 明确当前 registry 基线为 113,新增三个 craft intent 后目标为 116。请记录当前值、目标值、三个新增变体及 generated registry/SHA/sample 证据;144 S2C 也应使用同类生成证据。否则未完成 A-CS/R6 合入时可能被错误报告为 116。
Also applies to: 121-121, 140-140
🤖 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 75, 更新计划中所有使用“116”的
C2S 变体数量记录,明确区分当前 registry 基线 113 与合入三个新增 craft intent 后的目标 116,并列出这三个变体及
generated registry、SHA 和 sample 证据。同步为“144 S2C”补充同类生成证据,覆盖 `craft proto/Rust
mirror/converter/samples` 条目及其他对应位置,避免在 A-CS/R6 尚未合入时将目标值误报为当前值。
Central reviewDecision: Validated findings[major] A-CS cannot reach its claimed 116-variant schema baseline within its declared scope
The new plan states that adding the three craft lifecycle requests takes the TypeBox Root cause: the plan uses the rust/production request count (113) as though it were the current typebox union baseline, despite the repository's known schema drift, and omits an ordering/ownership dependency that would first bring the typebox union to parity. [major] Terminal delivery failure has contradictory session ownership semantics
A terminal delivery reaches this conflict after R3 has committed the outbox and removed the live gameplay session, then the P2c worker encounters a retryable inventory/spill failure (for example, persistence unavailable). The new R1 contract says that after handoff the live session/claim is removed and delivery failure must not reattach it ( Root cause: the pr introduced the durable asynchronous outbox lifecycle without removing or narrowing r10's earlier synchronous delivery/teardown rule, leaving duplicated canonical failure semantics that now prescribe opposite session states for the same retryable worker failure. [major] Worker commit can acknowledge one outbox payload while delivering another
The fixed worker API accepts both Root cause: the proposed outbox-consumer boundary duplicates the delivery payload across an authoritative claimed record and an unconstrained caller-provided request without defining validation or derivation between them. [major] Successful delivery receipts have no bounded retention
The new lifecycle requires a durable Root cause: the exactly-once design makes successful delivery receipts permanently durable but specifies lifecycle and quota release only for active obligations; it omits any bounded retention or compaction contract for terminal [major] Terminal handoff and teardown use conflicting linearization points
The new P2c contract makes terminal delivery asynchronous: line 55 says the worker claims an already-terminal outbox row and atomically commits inventory/spill, receipt, obligation deletion, and quota release. The new R1 plan likewise states that outbox/checkpoint commit is followed immediately by claim release and live-session removal, and that delivery failure must not reattach either (docs/plan-refactor-server-session-v1.md:123-126, 265). However, the unchanged R10 ownership rule at line 112 still says R1 tears down only after Root cause: the plans define two different linearization points for teardown: the new durable outbox handoff commit versus the later asynchronous inventory delivery success. the legacy synchronous-delivery rule was not narrowed or replaced when p2c was added, leaving claim/session state non-atomic with the authoritative terminal handoff. [major] R6 P1 requires a craft producer before its R1 state source exists
The changed P1 deliverable requires R6 to ship the Root cause: the phase assigns production ownership and completion of the v2 s2c emitter to r6 before the r1 adapter that supplies its authoritative state is reachable, while simultaneously making r6 p1 a prerequisite of that adapter. the plan needs to separate r6's schema/converter/emit api and contract pins from activation of the real [major] R6 P1 requires downstream R4/R7 consumers before they are allowed to exist
The changed P1 deliverable requires both a real Root cause: the p1 phase mixes r6-owned wire/api artifacts with acceptance evidence owned by downstream r4 and r7 phases, despite those phases being explicitly gated on completion of r6 p1. [major] A-CS omits two contracts required by the craft lifecycle chain
The new A-CS plan makes itself the only owner of agent schema changes but limits its output to Root cause: the schema production batch scopes ownership to only four newly named symbols, but the end-to-end lifecycle it is meant to enable also depends on two existing wire contracts that are absent from the authoritative typebox schema. the cross-track ownership rules then leave those omissions with no production owner. [major] R6 P1 requires R4 rejection pins before R4 can start
Changed P1 line 22 makes “R4 pins” for stale/despawned/cross-dimension/out-of-range workbench keys part of the R6 P1 deliverable. However, line 40 says the R4 handler/gate lands only afterward, line 39 forbids R6 from touching Root cause: the plan assigns downstream r4 production-gate tests to the upstream r6 p1 phase even though ownership and wave ordering explicitly prevent r4 from existing until r6 p1 has completed. the r6 phase should limit its evidence to wire/conversion boundaries and make the runtime-key rejection pins an r4 deliverable/gate after r6. [major] Maintenance tests omit the authenticated capability binding boundary
The new permission contract at line 78 allows maintenance only for server-console origin or an authenticated principal/capability bound to the current executor entity. The required P1 tests at line 260 cover a generic authorized administrator and several unauthenticated/identity negatives, but never pin the two allowed origins separately or the critical case where an otherwise valid authenticated capability is bound to a different executor. An implementation that accepts every valid capability without checking its executor binding (or that supports console only and rejects the authenticated-capability branch) would satisfy the listed tests while violating the changed authorization contract. No surrounding plan assigns this missing permission-branch test to another track; the master plan likewise only says Root cause: the acceptance matrix does not enumerate all branches of the newly defined maintenance authorization boundary, especially capability-to-current-executor binding and separate positive coverage for console versus authenticated capability origins. [major] Terminal delivery is specified as both outbox-only and an optional direct transaction
For any terminal refund or output delivery (for example a volatile-session disconnect or a checkpointed completion), this line permits either a "crash-atomic transaction" or the durable outbox/receipt path. That directly conflicts with the same plan's invariant at line 88, which requires every checkpointed completion to follow reservation -> outbox -> R10 P2c and forbids a second direct-delivery protocol, and with Root cause: the new plan retains an alternative synchronous/direct terminal-delivery contract while simultaneously declaring the durable outbox worker to be the only production delivery protocol. the authoritative path was not made singular consistently across the document. [major] Failed admission cancellation can leak terminal-delivery quota until restart
The new protocol requires admission to durably create a reservation before the runtime busy claim, and line 25 assigns Root cause: the plan splits admission rollback across an in-memory busy claim and a durable quota/reservation transaction without defining an atomic handoff or mandatory live retry/reconciliation path when |
Model: claude-sonnet-5 Co-Authored-By: Claude <noreply@anthropic.com>
Central reviewDecision: Validated findings[major] Keep the C2S P3 phase as a separate deliverable
The P2 bullet ends with Root cause: a missing newline/list delimiter merged two phase entries during the plan rewrite. this makes the stated implementation phase boundary and its completion unit ambiguous, so a consumer can mark p2 complete without a distinct p3 work item or acceptance boundary. [major] Remove conflicting ownership of delivery-retention limits
The plan fixes Root cause: the rewrite simultaneously introduced fixed canonical retention constants and retained wording that delegates the concrete retention policy to the durable-storage implementation. r3/r1 can therefore implement different replay/compaction boundaries while both claiming to satisfy the plan, breaking the shared o-21..o-24 contract and its acceptance evidence. [major] Pin every CraftSessionStateV2 phase and identity rule
The A-06 contract explicitly expands Root cause: the a-cs acceptance criteria do not enumerate the observable phase/state-identity matrix required by the newly claimed statev2 contract, so coverage can pass while a phase is missing or assigned the wrong resumability/identity rules. |
Model: cc-sonnet-high Co-Authored-By: Claude <noreply@anthropic.com>
Summary
docs/plans-skeleton/plan-refactor-master-v1.md的 R1 轨道、文件所有权与覆盖矩阵,将plan-refactor-server-session-v1从 skeleton 促升为 activeInteractionSession、SessionRegistry、durability、busy claim、五态生命周期与 completion delivery 原子性合同Checkpointed/Volatile经 R3 单一出口;非自愿中断全退、主动取消沿用域内规则Test plan
git diff --checkorigin/main完成 rebase(主线无新增差分)Plan
docs/plans-skeleton/plan-refactor-master-v1.mddocs/plan-refactor-server-session-v1.md主导模型:
cc-sonnet-high(Claude Code 客户端占位模型;AxonHub 实际上游未在请求中可靠暴露)