Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/plan-refactor-inventory-core-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- ✅ 2026-08-03 P0 完整契约面重写 + absorption audit
- ⬜ P1:inventory 拆分 + txn/capacity 骨架 + inventory-layout/dropped-loot 纯 migration helpers(依赖 R3 P1 seam)
- ⬜ P2:production writer 迁移分为 P2a metadata/provider + Public writer path 与 P2b OwnerOnly private-writer activation;P2a 依赖 R3 P2 atomic commit seam 与旧 dropped-loot compatibility,P2b 必须等 R3 P4 dropped-loot migration/hydration、R6 P1 recipient projection/page、R5 P3 + R6 P4、R10 P3 pickup txn 及 R4 pickup consumer 全部完成后才可启用。
- ⬜ P2:production writer 迁移分为 P2a metadata/provider + Public writer path 与 P2b OwnerOnly private-writer activation;P2a 依赖 R3 P2 atomic commit seam 与旧 dropped-loot compatibility,P2b 必须等 R3 P4 dropped-loot migration/hydration、R6 P3 recipient projection/page production activation、R5 P3 + R6 P4、R10 P3 pickup txn 及 R4 pickup consumer 全部完成后才可启用。
- ⬜ P3:pickup/merge txn(依赖 R5 P3 attrition API、R6 P4 receipt API)
- ⬜ P4:联合 bot/e2e + plan 收口(依赖 R4 handler 与 R3 P4 legacy inventory-layout consumer)

Expand Down Expand Up @@ -87,15 +87,15 @@ R10 的 inventory-layout 与 dropped-loot migration 函数均纯且幂等,保

## 6. 所有权与顺序

- **R10**:`server/src/inventory/**` model/grid/txn/capacity、writer enumeration、typed outcome、纯 migration。P1 仅在 **R3 P1** 的 inventory/overflow seam 冻结后实现 txn/capacity 骨架;P2a 负责 metadata/provider 与 `Public` writer path,依赖 **R3 P2** durable spill/pickup recoverable-commit seam、旧 dropped-loot migration compatibility 与 crash/retry pins;P2b 才能启用 `OwnerOnly` private writers,且必须等 **R3 P4 dropped-loot migration/hydration、R6 P1 recipient projection/page、R5 P3 + R6 P4、R10 P3 pickup txn、R4 pickup consumer** 全部完成;P3 pickup/attrition consumer 只有在 **R5 P3** incoming-only attrition/ledger API 与 **R6 P4** receipt wire/client API 已合入后才可接通。
- **R10**:`server/src/inventory/**` model/grid/txn/capacity、writer enumeration、typed outcome、纯 migration。P1 仅在 **R3 P1** 的 inventory/overflow seam 冻结后实现 txn/capacity 骨架;P2a 负责 metadata/provider 与 `Public` writer path,依赖 **R3 P2** durable spill/pickup recoverable-commit seam、旧 dropped-loot migration compatibility 与 crash/retry pins;P2b 才能启用 `OwnerOnly` private writers,且必须等 **R3 P4 dropped-loot migration/hydration、R6 P3 recipient projection/page production activation、R5 P3 + R6 P4、R10 P3 pickup txn、R4 pickup consumer** 全部完成;P3 pickup/attrition consumer 只有在 **R5 P3** incoming-only attrition/ledger API 与 **R6 P4** receipt wire/client API 已合入后才可接通。
- **R3**:SQL/outbox、spill/pickup recoverable commit、hydration guard、migration consumer;R10 只消费 R3 P1/P2/P4 已冻结并实现的接口。P4 必须拆成 dropped-loot hydration 子批次与 inventory-layout overflow 子批次,前者不等待 R10 P3,后者才等待其实际 durable/capacity 前置。
- **R4**:C2S gate/handler、authoritative pickup context、调用 R10 并转交 R6 outcome;R4 handler/consumer phase 必须等待 **R10 P3 pickup txn、R6 P4** receipt API 与 **R5 P3** attrition API,不得以 R10 mock 或仅 R6 P1 schema 代替。
- **R4**:C2S gate/handler、authoritative pickup context、调用 R10 并转交 R6 outcome;R4 handler/consumer phase 必须等待 **R10 P3 pickup txn、R6 P4** receipt API 与 **R5 P3** attrition API,不得以 R10 mock 或仅 R6 P1 contract-only schema 代替。
- **R5**:incoming-only qi attrition/ledger;provider phase 为 R5 P3。
- **R6**:receipt wire/client、recipient projection/page、decoder;canonical plan 登记 rotate、pack feedback、dropped sync;dropped-loot projection/page consumer 为 R6 P1,必须在 **R10 P2a owner/visibility metadata provider** 与 **R3 P4 dropped-loot migration/hydration consumer** 完成后才可消费;receipt provider phase 为 R6 P4。
- **R6**:receipt wire/client、recipient projection/page、decoder;canonical plan 登记 rotate、pack feedback、dropped sync;dropped-loot projection/page production consumer 为 R6 P3,其 activation gate 仅引用总纲 §3 Wave 表;receipt provider phase 为 R6 P4。
- **R1**:txn stored/spilled 成功后才 teardown,失败保留 session。
- **R7**:UI 消费,不拥有事务。

顺序:**R3 P1 → R10 P1(含纯 inventory-layout/dropped-loot migration helpers)→ R3 P2 atomic seam 实现 + legacy dropped-loot migration/hydration compatibility pins → R10 P2a metadata/provider + Public writer path → R3 P4 dropped-loot migration/hydration consumer → R6 P1 dropped-loot projection/page consumer → R5 P3 + R6 P4 → R10 P3 pickup/merge txn → R4 handler/pickup consumer → R10 P2b OwnerOnly private-writer activation → R3 P4 inventory-layout overflow consumer → R10 P4 联合 e2e**。R10 P2a 在 R3 P2 atomic seam 与旧 dropped-loot migration compatibility 未合入前不得开始;R3 P4 dropped-loot migration/hydration consumer 必须先于 R6 P1 dropped-loot projection/page consumer,确保旧 `entry_json` 已先升级为带 `owner`/`visibility` 的 canonical entry;R10 P2b 只有在 R3 P4 dropped-loot hydration、R6 P1 projection/page、R5 P3 + R6 P4、R10 P3 pickup txn 与 R4 pickup consumer 全部完成后才可启用,避免 OwnerOnly writer 在授权消费链闭合前广播或转移私有掉落;R10 P3 在 R5 P3/R6 P4 provider 未合入前不得开始 pickup consumer;R4/R3 的外轨交付物只作 R10 P4 验收前置、不计入 R10 自身 phase;R10 不越权改 persistence、wire、handler 或 client。
顺序:**R3 P1 → R10 P1(含纯 inventory-layout/dropped-loot migration helpers)→ R3 P2 atomic seam 实现 + legacy dropped-loot migration/hydration compatibility pins → R10 P2a metadata/provider + Public writer path → R3 P4 dropped-loot migration/hydration consumer → R6 P3 dropped-loot projection/page production activation → R5 P3 + R6 P4 → R10 P3 pickup/merge txn → R4 handler/pickup consumer → R10 P2b OwnerOnly private-writer activation → R3 P4 inventory-layout overflow consumer → R10 P4 联合 e2e**。R10 P2a 在 R3 P2 atomic seam 与旧 dropped-loot migration compatibility 未合入前不得开始;R3 P4 dropped-loot migration/hydration consumer 必须先于 R6 P3 dropped-loot projection/page production activation,确保旧 `entry_json` 已先升级为带 `owner`/`visibility` 的 canonical entry;R10 P2b 只有在 R3 P4 dropped-loot hydration、R6 P3 production activation、R5 P3 + R6 P4、R10 P3 pickup txn 与 R4 pickup consumer 全部完成后才可启用,避免 OwnerOnly writer 在授权消费链闭合前广播或转移私有掉落;R10 P3 在 R5 P3/R6 P4 provider 未合入前不得开始 pickup consumer;R4/R3 的外轨交付物只作 R10 P4 验收前置、不计入 R10 自身 phase;R10 不越权改 persistence、wire、handler 或 client。

## 7. 审核要求的 contract pins

Expand Down
2 changes: 1 addition & 1 deletion docs/plans-skeleton/plan-refactor-c2s-gate-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

- ⬜ P0 设计收口 + 吸收清单验真:113 个变体普查(每个标注应有的门禁四元组现状);冻结 `GateSpec` 与拒绝回执语义;等 #1287(冷却重构,同文件大改)merge 定基线。
- ⬜ P1 门禁中间件落地:gate 层上线,先给"已知漏洞簇"的 ~20 个请求类型挂 spec(吸收清单全命中),旧内联校验保留并行断言一个版本期。
- ⬜ P2 巨石拆分批次 A:巨型 match 拆为按域 handler 注册表(combat/production/world/social/npc 五组),行为不变,bot 场景锁住;inventory pickup handler 必须从 ECS `CurrentDimension`、authoritative position/observation range 与 owner/private permission 构造 R10 `PickupAuthorization`,禁止仅凭 client XYZ/instance id 调用 txn,且把 R10 accepted/rejected outcome 交给 R6 emit API。**本批次的 inventory pickup consumer 仅在 R10 P3 pickup/merge txn、R5 P3 attrition API 与 R6 P4 receipt API 均已合入后实施;此前不得以 mock 或旧 R6 P1 schema 接线。**
- ⬜ P2 巨石拆分批次 A:巨型 match 拆为按域 handler 注册表(combat/production/world/social/npc 五组),行为不变,bot 场景锁住;inventory pickup handler 必须从 ECS `CurrentDimension`、authoritative position/observation range 与 owner/private permission 构造 R10 `PickupAuthorization`,禁止仅凭 client XYZ/instance id 调用 txn,且把 R10 accepted/rejected outcome 交给 R6 emit API。**本批次的 inventory pickup consumer 仅在 R10 P3 pickup/merge txn、R5 P3 attrition API 与 R6 P4 receipt API 均已合入后实施;此前不得以 mock R6 P1 contract-only schema 接线。**
- ⬜ P3 巨石拆分批次 B + 全量挂 spec + 删旧:113 变体全部声明门禁(含显式 `no_gate` 声明,杜绝静默无门禁);删除各域内联距离常量与重复维度判断。
- ⬜ P4 bot 验收 + 吸收 plan 批量归档。

Expand Down
6 changes: 3 additions & 3 deletions docs/plans-skeleton/plan-refactor-cast-av-contract-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

## 接入面

- **进料**:`SkillRegistry`/`SkillDef`(既有)R5 后的 qi 访问器(施法扣费)、R6 emit builder(cast_sync 走它)、R2 store 生命周期(client cast 状态店)
- **进料**:`SkillRegistry`/`SkillDef`(既有)R5 qi 访问器、R6 emit builder、R2 store 生命周期是 production activation 的接缝输入,不是 contract-first 的启动门
- **出料**:cast_sync/S2C AV 事件 → client `VfxBootstrap`/`BongAnimationRegistry`/audio recipe/HUD/SkillIcon 单点绑定。
- **共享类型**:`SkillAvBinding { anim, vfx_event, audio_recipe, hud_hint, icon }` 每招一条,注册即校验(缺任何一项 = 启动 fail-fast,对齐「招式 A/V 差异化」红线);cast 生命周期枚举补 STOP/INTERRUPT 权威事件。
- **worldview/AV 锚点**:每招独立可辨五件套是 CLAUDE.md 红线;audio 沿用 Pattern A(cast_center 施法快照,不读实时 Position)。

## 阶段

- ⬜ P0 设计收口 + 吸收清单验真:全部已注册招式普查(server 权威可达性 × client AV 五件套齐备度矩阵,#1249 已给出方法先例);冻结 `SkillAvBinding` 与 cast_sync 契约增量。
- ⬜ P1 契约落地:cast_sync source/target/phase 字段(走 R6 契约流程)+ STOP 权威事件`SkillAvBinding` 注册表 + fail-fast 校验上线(死注册项即启动报错)
- ⬜ P1 契约落地:contract-first 先补 cast_sync source/target/phase 字段与 STOP/INTERRUPT 权威事件`SkillAvBinding` 注册表及 fail-fast 校验;**这些 artifacts 的首次提交必须同时携 pin suite**:TypeBox 正例覆盖每个 phase/discriminant,反例覆盖 source/target/phase 任一缺失与 invalid/unknown phase;client reducer/state-machine 覆盖每条合法转换、非法转换拒绝及 STOP/INTERRUPT 终止路径;registry 覆盖五件套齐备成功与任一缺项 fail-fast。不得把这些 pins 延后到 P4 bot/e2e。production activation 仅按总纲 §3/§4.1 的跨轨顺序、ownership 与 atomicity invariants 放行,具体接缝与验收由 owner track plans 定义
- ⬜ P2 修复批次 A:双源去重(baomai-v3/tuike-v2)、错接纠正(dugu penetrate)、停止语义接线(tribulation brace/打坐腿 pitch 红线修正)。
- ⬜ P3 修复批次 B:skillbar 定义源统一(丹道三招接入)、HUD 提示/图标补齐(dugu-v2、zhenmai sever 标记语义修正)、缺失动画 JSON 补齐(woliu voidpath 五招,遵守 PlayerAnimator 四大坑)。
- ⬜ P4 bot 验收 + 吸收 plan 批量归档。
Expand All @@ -35,7 +35,7 @@ skeleton:dandao-basic-skillbar-bridge、dugu-v2-hud-skill-hint、skillbar-cast

- 独占:server `combat/` 的 cast/AV emit 点、`skill/` 注册表、`network/cast_emit.rs`;client `combat/` handler/store 的 cast 部分、`VfxBootstrap`/动画注册的绑定结构。
- 不碰:qi 扣费语义(R5 访问器,本轨消费);emit 传输层(R6 builder,本轨消费);FPV 手臂动画(fpv-cast-av plan 域)。
- 依赖:基线等 #1287、#1249 merge;R5 P1、R6 P1、R2 P1 之后开工(Wave 2)。P0 普查可先行。
- **依赖**:#1287、#1249 是基线;P0 与 P1 contract-first 可独立开工,不等待其他 track 的 production artifacts。production activation/cutover 只按总纲 §3 Wave 与 §4.1 的 ownership/atomicity invariants 放行;具体接缝、artifact 和验收由各 owner track plan 定义。P0 普查可先行。

## bot 验收场景

Expand Down
Loading