Files
cc-web/.trellis/tasks/08-11-unify-ccweb-message-reply/research/test-map.md

41 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 测试影响图
## 最小覆盖层次
1. **公开契约**:正式 `TOOLS/tools/list` 与 Codex App 备用列表只公开一个
`ccweb_send_message`;`replyMode` 必填且 enum 精确。
2. **统一发送 E2E**:`one_way` 不建 request;`return_and_continue` 建 request、
自动回传、来源忙碌时排队。
3. **隐藏兼容**:旧 `ccweb_request_reply` 不在 tools/list,但正式 MCP `tools/call`、
Codex App 旧 dynamic call 和内部 dispatcher 仍接受。
4. **提示语义**:目标提示区分模式;来源续跑包含 requestId、目标、原请求和完整性检查。
## 现有可复用入口
- `scripts/regression.js` 已有 `TOOLS` 静态断言、server 源码片段断言和完整跨对话 E2E。
- `callInternalMcp`、`nextMessage`、`waitForJsonCondition` 可复用。
- 现有单向发送、request-reply、busy source 三段应改为:
- 公开单向:`ccweb_send_message(replyMode='one_way')`;
- 公开回传:`ccweb_send_message(replyMode='return_and_continue')`;
- 旧别名:单独保留一条隐藏兼容用例。
## 必须先失败的断言
- `TOOLS` 不包含 `ccweb_request_reply`。
- send schema 的 required 包含 `replyMode`,enum 为
`['one_way', 'return_and_continue']`。
- send description 含“仅当来源不需要结果才 one_way / 依赖结果必须 return”。
- Codex App 备用列表与正式通信定义一致,且无旧公开工具。
- `return_and_continue` 返回 waiting requestId。
- 自动回传目标提示禁止手工重复回传。
- 来源 auto-run 文本包含 requestId、目标 ID、原始请求和完整性判断规则。
- hidden legacy allowlist 仍允许 `ccweb_request_reply`。
## 关键风险
- `lib/ccweb-mcp-server.js` 的 JSON-RPC `tools/call` 当前使用公开 `TOOLS` allowlist。
直接删除定义会让已缓存旧工具 schema 的客户端在 dispatcher 前失败;必须增加隐藏兼容 allowlist。
- 只测 Schema 不能证明 dispatcher 使用 replyMode,必须保留 E2E。
- 完整 regression 覆盖面很大,TDD 循环应优先使用可聚焦的静态/跨对话目标,最终再跑完整回归。