346 lines
41 KiB
Markdown
346 lines
41 KiB
Markdown
|
||
## 2026-07-05 16:23:55 +08:00 pi 审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划/审批/日志:docs/go-mcp-minimal-plan.md,docs/process/business-manager-review.md,docs/process/go-implementation-log.md,docs/process/csharp-helper-log.md。
|
||
- 验证脚本:scripts/verify-win-helper.ps1,scripts/build-win-helper.ps1。
|
||
- C# Helper 关键源码:native/ISphereWinHelper/Program.cs,HelperProtocol.cs,WindowScanner.cs,UiaDumper.cs。
|
||
- 边界检查:git status --short --untracked-files=all;git ls-files;文件系统中 go.mod/*.go 检查;native/scripts 禁止能力关键词检查。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N1 验证不是硬编码成功:verify-win-helper.ps1 会调用 build-win-helper.ps1(本次复核用 -SkipBuild 避免重新写构建产物),并通过 helper --json 实际调用 version、self_check、scan_windows、dump_uia;dump_uia 还会创建临时 WinForms 窗口并断言 root control_type 为 Window。
|
||
- 已做新鲜复核:powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1 -SkipBuild 退出码 0,输出 {"ok":true,"helper":"E:\\coding\\codex\\isphere-ai-bridge\\runs\\win-helper\\ISphereWinHelper.exe","version":"0.1.0","scan_window_count":30,"uia_available":true}。
|
||
- 未见 N2 越界:git ls-files -- 'go.mod' '*.go' 'src/isphere_ai_bridge/*' 'tests/test_*.py' 无输出;文件系统 go.mod/*.go 检查无输出。
|
||
- 未见提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力;native/scripts 关键词检查仅命中 message 字段、control_type、build 脚本 File 参数等非能力实现内容。
|
||
- 低风险观察:verify-win-helper.ps1 会输出 helper_version 和 uia_available,但脚本没有单独硬断言 helper_version 必须等于 0.1.0、uia_available 必须为布尔类型;本次实际输出符合 N1 验收,因此不构成阻塞。
|
||
- 工作树观察:存在未跟踪过程/计划文档 docs/go-mcp-minimal-plan.md、docs/process/business-manager-review.md、docs/process/csharp-helper-log.md、docs/process/go-implementation-log.md,以及审查期间新出现的 docs/process/opencode-review.md;未见代码文件或 Go 工程文件越界。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N2,也不代表本轮可直接实施 N2。进入 N2 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
N0/N1 的实现与验证证据可信;未发现硬编码成功、伪造测试结果或绕过计划节点的阻塞证据。N1 的测试确实覆盖 helper 的四个只读 op,并通过临时 WinForms 窗口验证 dump_uia 的实际 UIA 行为。建议作为低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 17:29:28 +08:00 pi 第二轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N2;docs/process/business-manager-review.md 的 N2 执行前审批。
|
||
- 实现证据:go.mod;docs/process/go-implementation-log.md 的 N2 记录。
|
||
- 验证命令:go version;go list ./...;go list -m all;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path cmd/isphere-mcp、internal/helperclient、internal/tools、go.sum;git ls-files -- '*.go' 等;PowerShell 文件系统 .go/go.sum 检查;native/scripts 禁止能力关键词复核。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N2 实现真实:go.mod 当前内容仅为 module isphere-ai-bridge 和 go 1.23,符合最小 Go module skeleton。
|
||
- Go 工具链复核通过:go version 输出 go version go1.23.4 windows/amd64。
|
||
- N2 验证命令复核通过:go list ./... 输出 warning matched no packages,go_list_exit=0,符合 N2 无 package 阶段的验收条件。
|
||
- 最小依赖复核通过:go list -m all 仅输出 isphere-ai-bridge,go_list_m_exit=0;go.mod 无 require;go.sum 不存在。
|
||
- 未发现进入 N3:cmd/isphere-mcp=False,internal/helperclient=False,internal/tools=False;git ls-files -- '*.go' 等无输出;文件系统 .go/go.sum 检查无输出。
|
||
- 未发现硬编码成功或伪造结果:结论来自实际读取 go.mod 和现场执行 go version/go list/go list -m all;不是只引用实现智能体报告。
|
||
- 未发现提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力;本轮没有新增 .go 代码,native/scripts 关键词复核仅命中 HelperProtocol 的 message 字段等非业务动作内容。
|
||
- 工作树观察:git status 显示 go.mod 以及过程/计划文档未跟踪;其中 go.mod 是 N2 预期产物,docs/process/pi-review.md 是本审查允许追加的过程文档。未见 N3 目录或 Go 源码文件。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N3,也不代表可直接实施 N3。进入 N3 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第二轮 N2 的 Go module skeleton 实现可信、范围最小、无外部依赖,验证命令真实覆盖 N2 要求;未发现绕过计划节点进入 N3,未发现伪造测试结果或提前实现禁止能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 17:39:38 +08:00 pi 第三轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N3;docs/process/business-manager-review.md 的 N3 执行前审批。
|
||
- 实现证据:internal/helperclient/contract.go;internal/helperclient/client_test.go;go.mod;docs/process/go-implementation-log.md 的 N3 记录。
|
||
- 验证命令:go test ./internal/helperclient -run Contract -v -count=1;go test ./... -count=1;go list -m all;go test ./internal/helperclient -run '^TestContractSuccessResponsePreservesDataFields$' -v -count=1;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path internal/helperclient/client.go、cmd/isphere-mcp、internal/tools、go.sum;git ls-files -- '*.go' 等;PowerShell 文件系统 .go/go.sum 检查;Go 源码禁止能力关键词复核。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N3 实现真实:contract.go 定义 HelperRequest、HelperResponse、HelperError,字段覆盖 protocol、request_id、op、timeout_ms、args、ok、data、error、warnings;没有进程调用代码。
|
||
- Contract 测试真实覆盖 N3 行为:TestContractVersionRequestMarshalsProtocol 验证 version request 的 protocol/request_id/op/args;TestContractSuccessResponsePreservesDataFields 验证 ok=true、data.helper_name=ISphereWinHelper 且 extra_unknown 未丢失;TestContractErrorResponseUnmarshalsErrorCode 验证 ok=false、error.code=WINDOW_NOT_FOUND、data null 处理。
|
||
- 现场复跑通过:go test ./internal/helperclient -run Contract -v -count=1 三个 Contract 测试均 PASS,exit=0。
|
||
- 补充复跑通过:go test ./... -count=1 输出 ok isphere-ai-bridge/internal/helperclient,exit=0。
|
||
- unknown data fields 保留方式可信:HelperResponse.Data 使用 map[string]json.RawMessage;单测 payload 中 extra_unknown 被检查存在,专项复跑 TestContractSuccessResponsePreservesDataFields 通过。
|
||
- 未发现外部依赖:go.mod 仅 module isphere-ai-bridge 和 go 1.23;Select-String 未发现 require/replace/exclude;go list -m all 仅输出 isphere-ai-bridge;go.sum 不存在。
|
||
- 未发现进入 N4:internal/helperclient/client.go=False,cmd/isphere-mcp=False,internal/tools=False,go.sum=False;文件系统 .go/go.sum 检查仅发现 internal/helperclient/client_test.go 和 contract.go。
|
||
- 未发现提前启动 C# helper 或实现进程调用:Go 源码关键词复核未命中 os/exec、exec.Command、--json、Start-Process 等进程调用内容;仅命中测试样例中的 ISphereWinHelper 字符串。
|
||
- 未发现提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力。
|
||
- 非阻塞观察:Red 阶段失败无法在当前已实现状态下不改代码复现,只能通过 go-implementation-log 审查其记录;这不影响当前 Green 和边界复核结论。unknown 字段测试目前验证 key 未丢失,结合 RawMessage 类型可满足“保留为 raw JSON”的 N3 要求。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N4,也不代表可直接实施 N4。进入 N4 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第三轮 N3 的纯 JSON contract 实现可信,测试真实覆盖 request marshal、success/error response unmarshal 和 unknown data 保留;未发现硬编码成功、伪造测试结果、外部依赖、C# helper 启动或 N4 进程调用越界。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 17:52:01 +08:00 pi 第四轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N4;docs/process/business-manager-review.md 的 N4 执行前审批。
|
||
- 实现证据:internal/helperclient/client.go;internal/helperclient/client_test.go;internal/helperclient/contract.go;go.mod;docs/process/go-implementation-log.md 的 N4 记录。
|
||
- 验证命令:go test ./internal/helperclient -run Client -v -count=1;go test ./... -count=1;go list -m all;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path cmd/isphere-mcp、internal/tools、internal/mcpserver、go.sum;git ls-files 对 N5/N8 相关路径检查;PowerShell 文件系统 .go/go.sum 检查;Go 源码禁止业务能力关键词复核;Get-Process helper-stub/ISphereWinHelper 泄漏复核。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N4 实现真实:client.go 定义 Client、Client.Call(ctx, op, args) 和 ClientError;默认 helper 路径解析到 repo 下 runs\win-helper\ISphereWinHelper.exe;使用 exec.CommandContext(helperPath, "--json") 启动 helper,stdin 写入 isphere.helper.v1 请求 JSON,stdout 解析为 HelperResponse,stderr/exit code/stdout 保留在结构化错误中。
|
||
- 现场复跑 Client 测试通过:go test ./internal/helperclient -run Client -v -count=1 五个 Client 测试全部 PASS,exit=0。
|
||
- 真实 helper version 测试不是伪造:本次测试日志明确输出 real helper version ok: helper_name=ISphereWinHelper path=E:\coding\codex\isphere-ai-bridge\runs\win-helper\ISphereWinHelper.exe,说明没有 skip,确实调用了 runs\win-helper\ISphereWinHelper.exe。
|
||
- process client 行为测试覆盖可信:missing helper 返回 MISSING_HELPER;bad helper output 返回 BAD_JSON;timeout 测试使用 10 秒 sleep stub 和 100ms context,并断言耗时不超过 3 秒;non-zero exit stub 退出码 7 且断言 stderr 包含 stub stderr boom;真实 helper version 返回 ok=true 且 helper_name=ISphereWinHelper。
|
||
- timeout/进程泄漏风险已做复核:实现使用 exec.CommandContext 绑定 context;timeout 测试通过且耗时约 1.53 秒;测试后 Get-Process helper-stub/ISphereWinHelper 输出 NO_HELPER_PROCESSES_FOUND。
|
||
- stderr 捕获已验证:client.go 将 cmd.Stderr 指向 bytes.Buffer,ClientError.Stderr 保存 stderrText;TestClientNonZeroExitCapturesStderrAsStructuredError 断言 stderr 内容和 ExitCode=7。
|
||
- 补充复跑通过:go test ./... -count=1 输出 ok isphere-ai-bridge/internal/helperclient,exit=0。
|
||
- 未发现外部依赖:go list -m all 仅输出 isphere-ai-bridge,exit=0;go.mod 未发现 require/replace/exclude;go.sum 不存在。
|
||
- 未发现进入 N5/N8:cmd/isphere-mcp=False,internal/tools=False,internal/mcpserver=False,go.sum=False;git ls-files 对相关路径无输出;文件系统 .go/go.sum 检查仅发现 internal/helperclient/client_test.go、client.go、contract.go。
|
||
- 未发现复制 C# UIA 逻辑到 Go:client.go 只做路径解析、进程启动、stdin/stdout/stderr、timeout 和错误封装,未实现 window scan、UIA dump 或 selector 逻辑。
|
||
- 未发现提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力;Go 源码禁止业务能力关键词复核无输出。
|
||
- 非阻塞观察:Red 阶段失败无法在当前已实现状态下不改代码复现,只能通过 go-implementation-log 审查其记录;这不影响当前 Green、真实 helper 调用和边界复核结论。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N5,也不代表可直接实施 N5。进入 N5 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第四轮 N4 的 Go helper process client 实现可信,测试真实覆盖 missing helper、bad JSON、timeout、non-zero exit/stderr 捕获和真实 helper version 调用;未发现硬编码成功、伪造测试结果、外部依赖、N5/N8 越界、MCP server/tools 创建、C# 修改或禁止业务能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 18:01:28 +08:00 pi 第五轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N5;docs/process/business-manager-review.md 的 N5 执行前审批。
|
||
- 实现/验证证据:docs/process/go-implementation-log.md 的 N5 记录;docs/process/csharp-helper-log.md 的 N5 记录;scripts/verify-win-helper.ps1;internal/helperclient/client_test.go;go.mod。
|
||
- 验证命令:powershell -NoProfile -ExecutionPolicy Bypass -File scripts\verify-win-helper.ps1 -SkipBuild;go test ./internal/helperclient -v -count=1;go list -m all;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path cmd/isphere-mcp、internal/tools、internal/mcpserver、go.sum;git ls-files 对 N6/N8 相关路径检查;PowerShell 文件系统 .go/go.sum 检查;verify-win-helper.ps1/helperclient 源码禁止业务动作关键词复核。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N5 验证真实:go-implementation-log 和 csharp-helper-log 均记录本轮只做 live verification;未报告功能代码变更。
|
||
- 本次复跑 PowerShell helper 验证使用 -SkipBuild,原因是本轮审查只允许追加 pi-review.md,避免重写构建产物;verify-win-helper.ps1 在 -SkipBuild 下仍实际调用 version、self_check、scan_windows、dump_uia,并创建临时 WinForms 窗口验证 dump_uia。复跑退出码 0,输出 {"ok":true,"helper":"E:\\coding\\codex\\isphere-ai-bridge\\runs\\win-helper\\ISphereWinHelper.exe","version":"0.1.0","scan_window_count":30,"uia_available":true}。
|
||
- Go helperclient live test 复跑通过:go test ./internal/helperclient -v -count=1 退出码 0,Contract 测试和 Client 测试全部 PASS。
|
||
- Go test 确实包含 real helper version 调用:本次测试日志出现 real helper version ok: helper_name=ISphereWinHelper path=E:\coding\codex\isphere-ai-bridge\runs\win-helper\ISphereWinHelper.exe,说明 TestClientRealVersionCallWhenHelperIsBuilt 没有 skip,确实调用了 runs\win-helper\ISphereWinHelper.exe。
|
||
- 未发现伪造测试结果:结论来自现场复跑 PowerShell helper 验证和 Go test,而非只引用智能体报告。
|
||
- 未发现进入 N6:go list -m all 仅输出 isphere-ai-bridge,go.mod 未发现 require/replace/exclude;go.sum 不存在;没有 MCP library decision 产物。
|
||
- 未发现进入 N8/MCP server/tools:cmd/isphere-mcp=False,internal/tools=False,internal/mcpserver=False;git ls-files 对这些路径无输出;文件系统 .go/go.sum 检查仅发现 internal/helperclient/client_test.go、client.go、contract.go。
|
||
- verify-win-helper.ps1 的 op 范围复核为 version、self_check、scan_windows、dump_uia;未发现点击、输入、发送、上传、下载相关 API 或业务动作实现。
|
||
- helperclient/verify 脚本禁止业务动作关键词复核无输出:未发现 SearchContact、OpenSession、SendMessage、SendFile、ReceiveFile、auto login、hook、inject、ReadProcessMemory、OpenProcess、WriteProcessMemory、CreateRemoteThread、SetWindowsHookEx、点击/输入/发送/上传/下载等能力。
|
||
- 工作树观察:git status 显示 go.mod、internal/helperclient 代码文件和多个过程文档仍未跟踪;本轮 pi 审查仅追加 docs/process/pi-review.md,未改代码。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N6,也不代表可直接实施 N6。进入 N6 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第五轮 N5 live verification 可信:C# helper 单体验证通过,Go helperclient 测试通过,且 Go 测试日志明确证明真实调用 runs\win-helper\ISphereWinHelper.exe 的 version op;未发现伪造测试结果、N6/N8 越界、MCP 依赖或点击/输入/发送/上传/下载等禁止能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 18:13:25 +08:00 pi 第六轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N6;docs/process/business-manager-review.md 的 N6 执行前审批。
|
||
- 决策与依赖证据:docs/go-mcp-library-decision.md;go.mod;go.sum;docs/process/go-implementation-log.md 的 N6 记录。
|
||
- 现场验证命令:go version;go list github.com/modelcontextprotocol/go-sdk/mcp;go list -m -json github.com/modelcontextprotocol/go-sdk;go list -m all;go doc github.com/modelcontextprotocol/go-sdk/mcp.StdioTransport;go doc github.com/modelcontextprotocol/go-sdk/mcp.AddTool;go doc github.com/modelcontextprotocol/go-sdk/mcp.NewServer;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path cmd/isphere-mcp、internal/tools、internal/mcpserver;git ls-files 对 cmd/tools/mcpserver/verify-go-mcp.ps1 检查;文件系统 .go 检查;Go 源码中 MCP server/tool 注册关键词和禁止业务能力关键词复核。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N6 决策真实:docs/go-mcp-library-decision.md 选择官方 SDK module github.com/modelcontextprotocol/go-sdk v1.3.1,package github.com/modelcontextprotocol/go-sdk/mcp;go.mod 当前包含 require github.com/modelcontextprotocol/go-sdk v1.3.1 // indirect;go.sum 仅有该 SDK 的两条校验和记录。
|
||
- 兼容性复核通过:go version 输出 go version go1.23.4 windows/amd64;go list -m -json github.com/modelcontextprotocol/go-sdk 显示 Version v1.3.1、GoVersion 1.23.0。
|
||
- package 可用性复核通过:go list github.com/modelcontextprotocol/go-sdk/mcp 退出 0,输出 github.com/modelcontextprotocol/go-sdk/mcp。
|
||
- stdio 能力复核通过:go doc mcp.StdioTransport 显示其通过 stdin/stdout 使用 newline-delimited JSON 通信。
|
||
- tool registration/JSON schema 复核通过:go doc mcp.AddTool 显示 AddTool adds a tool and typed tool handler,并在 input/output schema 为 nil 时从 Go type 推断 JSON schema,支持 jsonschema struct tag。
|
||
- server skeleton 入口仅作为后续能力被确认:go doc mcp.NewServer 显示 NewServer 创建无 feature 的 MCP server,需要后续 AddTool 等方法添加功能;本轮未写 server code。
|
||
- go list -m all 现场复跑退出 0;模块列表中与 MCP 相关的条目只有 github.com/modelcontextprotocol/go-sdk v1.3.1,MCP_RELATED_COUNT=1。其余为 SDK transitive dependencies,不是额外 MCP 框架。
|
||
- 决策文档字段完整:已包含 package/module name、stdio support、tool registration style、JSON schema support、maintenance risk、why enough for four tools,并说明不需要 HTTP server、Python/Node runtime、后台 daemon 或多 MCP 框架。
|
||
- 未发现硬编码成功或伪造命令结果:结论来自现场 go list/go doc/go.mod/go.sum 读取,而非只引用实现智能体报告。
|
||
- 未发现进入 N7:cmd/isphere-mcp=False,internal/tools=False,internal/mcpserver=False;git ls-files 对这些路径和 scripts/verify-go-mcp.ps1 无输出;文件系统 .go 检查仅发现 internal/helperclient/client.go、client_test.go、contract.go。
|
||
- 未发现 Go server/tool 注册代码:文件系统 .go 中未命中 modelcontextprotocol、mcp.NewServer、AddTool、StdioTransport、Server{、Tool{ 等关键词;说明 SDK 仅被选型和加入依赖,未进入 N7/N8 实现。
|
||
- 未发现提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力;helperclient Go 源码禁止业务能力关键词复核无输出。
|
||
- 工作树观察:git status 显示 docs/go-mcp-library-decision.md、go.mod、go.sum、internal/helperclient 代码文件和多个过程文档仍未跟踪;本轮 pi 审查仅追加 docs/process/pi-review.md,未改代码或 go.mod/go.sum。
|
||
- 非阻塞观察:由于 N6 尚未 import SDK,go.mod 中 SDK 处于 // indirect 状态;这与 N6 只做 library decision、不写 server code 的边界一致,后续 N7 首次 import 后可由 Go 工具调整为 direct。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N7,也不代表可直接实施 N7。进入 N7 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第六轮 N6 MCP library decision 可信:官方 Go MCP SDK v1.3.1 与本机 Go 1.23.4 兼容,stdio、typed AddTool 和 JSON schema 推断能力经 go doc 现场验证,go list -m all 仅有一个 MCP-related dependency;未发现伪造结果、N7/N8 越界、server/tool 代码、额外 MCP 框架或禁止业务能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 18:26:20 +08:00 pi 第七轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N7;docs/process/business-manager-review.md 的 N7 执行前审批。
|
||
- 实现证据:cmd/isphere-mcp/main.go;internal/mcpserver/server.go;internal/mcpserver/server_test.go;go.mod;docs/process/go-implementation-log.md 的 N7 记录。
|
||
- 现场验证命令:go test ./internal/mcpserver -v -count=1;go test ./... -count=1;go build ./cmd/isphere-mcp;go list -m all;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path internal/tools、cmd/isphere-mcp、internal/mcpserver、isphere-mcp.exe;git ls-files 对 internal/tools 和 scripts/verify-go-mcp.ps1 检查;PowerShell 文件系统 .go/.exe 检查;N7 源码中 AddTool、helperclient import、HTTP listener、gRPC、named pipe、Python runtime、C# helper、禁止业务能力关键词复核;进程残留检查。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N7 实现真实:cmd/isphere-mcp/main.go 创建 context 后调用 mcpserver.NewServer,并以 mcp.StdioTransport 运行;internal/mcpserver/server.go 只用 mcp.NewServer 创建带 Name/Title/Version 的空 MCP server;server_test.go 只验证 NewServer 返回非 nil。
|
||
- server construction 测试复跑通过:go test ./internal/mcpserver -v -count=1 输出 TestNewServerConstructsEmptyMCPServer PASS,exit=0。
|
||
- 全量 Go 测试复跑通过:go test ./... -count=1 输出 cmd/isphere-mcp [no test files]、internal/helperclient ok、internal/mcpserver ok,exit=0。
|
||
- build 真实通过:go build ./cmd/isphere-mcp 退出码 0。本次审查前确认 isphere-mcp.exe 不存在;build 生成 isphere-mcp.exe 后已删除,清理后 EXE_EXISTS_AFTER_CLEANUP=False。
|
||
- 未发现硬编码成功或伪造测试结果:结论来自现场 go test 和 go build 复跑,以及源码读取,不是只引用实现智能体报告。
|
||
- 未发现进入 N8:internal/tools=False,git ls-files 对 internal/tools 和 scripts/verify-go-mcp.ps1 无输出;PowerShell 检查返回 NO_INTERNAL_TOOLS_DIR。
|
||
- 未注册工具:N7 三个源码文件中未命中 AddTool、internal/tools 或 Tool handler 相关实现;server.go 只调用 mcp.NewServer。
|
||
- server construction 不启动 C# helper:internal/mcpserver 源码和测试未导入 helperclient,未命中 ISphereWinHelper、exec.Command、Start-Process 等进程调用关键词;复核后未发现 ISphereWinHelper 或 isphere-mcp 残留进程。说明空 server 构造测试未触发 helper。
|
||
- 未引入 HTTP listener/gRPC/named pipe/Python runtime:N7 源码关键词复核无 net/http、ListenAndServe、grpc、named pipe/npipe、python 命中。
|
||
- 未发现提前实现搜索联系人、打开会话、发送消息、发送/接收文件、自动登录、注入、hook、读内存、规避安防等能力;N7 源码禁止业务能力关键词复核无输出。
|
||
- go list -m all 退出 0,仍只使用 N6 选定的 github.com/modelcontextprotocol/go-sdk v1.3.1 及其传递依赖,未发现第二个 MCP SDK。
|
||
- 工作树观察:git status 显示 cmd/isphere-mcp/main.go、internal/mcpserver/server.go、server_test.go、go.mod、go.sum、helperclient 文件和过程文档仍未跟踪;本轮 pi 审查仅追加 docs/process/pi-review.md,未改代码。
|
||
- 非阻塞观察:go test ./... 会包含既有 internal/helperclient 测试,其中 real version 测试可能启动 C# helper;但 N7 关注的是 simple server construction test 不启动 C# helper。本次 internal/mcpserver 专项测试和 N7 源码复核均满足该边界。
|
||
- 非阻塞观察:Red 阶段失败无法在当前已实现状态下不改代码复现,只能通过 go-implementation-log 审查其记录;这不影响当前 Green、build 和边界复核结论。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N8,也不代表可直接实施 N8。进入 N8 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第七轮 N7 Go MCP server skeleton 实现可信:空 MCP server 构造测试、全量 Go 测试和 go build 均现场通过,build 产物已清理;未发现伪造结果、N8 越界、internal/tools、AddTool/tool 注册、HTTP listener、helperclient/C# helper 调用或禁止业务能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 18:40:31 +08:00 pi 第八轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N8;docs/process/business-manager-review.md 的 N8 执行前审批。
|
||
- 实现证据:internal/tools/winhelper.go;internal/tools/winhelper_test.go;internal/mcpserver/server.go;internal/mcpserver/server_test.go;docs/process/go-implementation-log.md 的 N8 记录。
|
||
- 现场验证命令:go test ./internal/tools -v -count=1;go test ./internal/mcpserver -run WinHelper -v -count=1;go test ./... -count=1;go list -m all;git status --short --untracked-files=all。
|
||
- 边界检查:Test-Path scripts/verify-go-mcp.ps1;git ls-files 对 scripts/verify-go-mcp.ps1/internal/tools 检查;PowerShell 搜索 mcp.AddTool 数量、工具名、helper op 映射、schema 字段、helperclient 调用链、直接 UIA/窗口 API、send/search/file/autologin/injection/hook/memory 等关键词。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N8 实现真实:internal/tools/winhelper.go 新增 RegisterWinHelperTools、HelperCaller、四个参数结构和 callHelper;internal/mcpserver.NewServer 已接入 tools.RegisterWinHelperTools(server, helperclient.Client{})。
|
||
- 现场复跑 internal/tools 测试通过:go test ./internal/tools -v -count=1 三个测试均 PASS,exit=0。
|
||
- 现场复跑 mcpserver 接入测试通过:go test ./internal/mcpserver -run WinHelper -v -count=1 中 TestNewServerRegistersN8WinHelperToolsWithoutCallingHelper PASS,exit=0。
|
||
- 全量 Go 测试复跑通过:go test ./... -count=1 输出 cmd/isphere-mcp [no test files]、internal/helperclient ok、internal/mcpserver ok、internal/tools ok,exit=0。
|
||
- 只注册四个工具:源码中 mcp.AddTool 恰好 4 处,分别对应 win_helper_version、win_helper_self_check、win_helper_scan_windows、win_helper_dump_uia;测试也通过 ListTools 断言工具名集合完全等于这四个。
|
||
- 工具名与 helper op 映射正确:win_helper_version -> version;win_helper_self_check -> self_check;win_helper_scan_windows -> scan_windows;win_helper_dump_uia -> dump_uia;TestWinHelperHandlersCallHelperClientAbstractionWithCorrectOps 使用 fake HelperCaller 验证了调用顺序和 op。
|
||
- schema/argument fields 范围正确:VersionArgs/SelfCheckArgs 无 JSON 字段;ScanWindowsArgs 仅 include_all_visible;DumpUIAArgs 仅 hwnd、max_depth、include_text、max_children;测试同时通过结构体 tag 和 MCP input schema properties 断言。
|
||
- handler 未绕过 helperclient:生产代码通过 HelperCaller 接口和默认 helperclient.Client{} 调用 caller.Call(ctx, op, args);未在 internal/tools 中实现窗口枚举、UIA dump 或 C# helper 之外的业务逻辑。
|
||
- 未发现直接 UIA/窗口实现:internal/tools 和 internal/mcpserver 源码未命中 UIAutomation、AutomationElement、WindowScanner、UiaDumper、user32、FindWindow、SendKeys、EnumWindows、InvokePattern 等关键词。
|
||
- 未进入 N9:scripts/verify-go-mcp.ps1=False,git ls-files 对 scripts/verify-go-mcp.ps1 无输出;未创建 smoke verification 脚本。
|
||
- 未发现 send/search/file/autologin/injection/hook/memory 越界能力:生产源码未命中 SearchContact、OpenSession、SendMessage、SendFile、ReceiveFile、Upload、Download、auto login、hook、inject、ReadProcessMemory、OpenProcess、WriteProcessMemory、CreateRemoteThread、SetWindowsHookEx、点击/输入/发送/上传/下载等能力;测试中出现 send/search/file 等词仅用于 forbidden words 断言,不是能力实现。
|
||
- 未发现硬编码成功或伪造测试结果:结论来自现场 go test 复跑、源码读取、AddTool 计数和 schema/op 映射检查,不是只引用实现智能体报告。测试使用 fake HelperCaller 是为了验证 handler 映射和参数,不代表伪造真实 helper 行为;真实 MCP stdio smoke 按计划留到 N9。
|
||
- go list -m all 退出 0,仍只使用 N6 选定的 github.com/modelcontextprotocol/go-sdk v1.3.1 及其传递依赖,未发现第二个 MCP SDK。
|
||
- 工作树观察:git status 显示 internal/tools/winhelper.go、winhelper_test.go、internal/mcpserver 修改文件、helperclient 文件、cmd、go.mod/go.sum 和过程文档仍未跟踪;本轮 pi 审查仅追加 docs/process/pi-review.md,未改代码。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N9,也不代表可直接实施 N9。进入 N9 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第八轮 N8 四个只读 MCP tool handlers 实现可信:只注册四个 win_helper_* 工具,工具名、helper op 映射和 schema 参数均符合计划,handler 通过 internal/helperclient 调用且未直接实现 UIA/窗口逻辑;现场测试全部通过,未发现伪造结果、N9 越界、第五工具、send/search/file/autologin/injection/hook/memory 等禁止能力。建议低风险通过本轮 pi 审查。
|
||
|
||
## 2026-07-05 18:56:19 +08:00 pi 第九轮审查
|
||
|
||
### 审查范围
|
||
- 工作目录:E:\coding\codex\isphere-ai-bridge。
|
||
- 计划与审批:docs/go-mcp-minimal-plan.md 的 N9;docs/process/business-manager-review.md 的 N9 执行前审批。
|
||
- 实现/验证证据:scripts/verify-go-mcp.ps1;docs/process/go-implementation-log.md 的 N9 记录;internal/tools/winhelper.go;internal/mcpserver/server.go;internal/mcpserver/server_test.go。
|
||
- 只读复核命令:Test-Path docs/go-mcp-runbook.md、scripts/verify-go-mcp.ps1、runs/win-helper/ISphereWinHelper.exe;git status --short --untracked-files=all;Select-String 复核 verify-go-mcp.ps1 的 build、SDK harness、tools/list、tools/call、Assert-True、cleanup、forbiddenTerms 和最终 JSON 输出;PowerShell 复核 tools/mcpserver 中 mcp.AddTool、win_helper_*、越界动作关键词。
|
||
- 未复跑完整 scripts\verify-go-mcp.ps1:该脚本会调用 build-win-helper.ps1、创建临时 Go MCP binary、在 runs 下创建临时 harness 目录再删除;本轮硬性约束要求不要创建任何文件(除 pi-review.md 追加),因此为避免违反约束,本次只做源码/日志/边界审查。
|
||
|
||
### 发现的问题
|
||
- 未发现阻塞问题。
|
||
- N9 脚本存在且内容真实:scripts/verify-go-mcp.ps1=True;脚本会构建 C# helper、构建 Go MCP binary、写入临时 SDK harness,并在 finally 中删除 tempRoot 和 harnessDir。
|
||
- 脚本不是简单硬编码 ok=true:最终 ok=true 之前有 Assert-True 检查 harnessJson.ok、helper_name == ISphereWinHelper、tool_count == 4;harness 内部会 initialize/connect、ListTools、CallTool win_helper_version,并检查 structuredContent.ok、data.helper_name。
|
||
- 四个 tools 验证逻辑真实:脚本 expectedTools 为 win_helper_version、win_helper_self_check、win_helper_scan_windows、win_helper_dump_uia;harness 对 tools/list 结果排序后要求 len(toolNames)==4 且集合完全等于 expectedTools。
|
||
- win_helper_version 调用验证真实:脚本使用 session.CallTool(ctx, Name=win_helper_version, Arguments={}),检查 callResult.IsError 为 false、structured ok 为 true、data.helper_name 为 ISphereWinHelper。
|
||
- action tools 检查存在:脚本 forbiddenTerms 包含 send、search、file、login、conversation、upload、download、receive、autologin;若任一工具名包含这些词会 fail。最终 action_tools_present=false 是在该检查通过后输出。
|
||
- N9 过程日志记录脚本 green 执行 exit 0,输出包含 ok=true、helper_name=ISphereWinHelper、tool_count=4、四个 tool 名、python_runtime_required=false、real_isphere_login_required=false、action_tools_present=false。本次未现场复跑完整脚本,原因见审查范围。
|
||
- 未发现 N10 越界:docs/go-mcp-runbook.md=False;未发现 runbook 文件。
|
||
- 未发现新增工具 beyond four:internal/tools 中 mcp.AddTool 为四处,工具名仍为四个 win_helper_*;mcpserver 接入测试期望这四个名称。
|
||
- 未发现 send/search/file/autologin/injection/hook/memory 越界能力:tools/mcpserver 生产源码未命中 SearchContact、OpenSession、SendMessage、SendFile、ReceiveFile、Upload、Download、auto login、hook、inject、ReadProcessMemory、OpenProcess、WriteProcessMemory、CreateRemoteThread、SetWindowsHookEx、点击/输入/发送/上传/下载等能力;测试中出现 send/search/file 等词仅用于 forbidden words 断言。
|
||
- helper 文件存在:runs/win-helper/ISphereWinHelper.exe=True,符合脚本调用目标的前置状态。
|
||
- 工作树观察:git status 显示 scripts/verify-go-mcp.ps1、cmd、internal/tools/mcpserver/helperclient、go.mod/go.sum 和过程文档仍未跟踪;本轮 pi 审查仅追加 docs/process/pi-review.md,未改代码。
|
||
- 非阻塞观察:脚本当前使用 SDK in-memory harness 验证 initialize/list/call,并构建 Go MCP binary;未直接运行生成的 cmd/isphere-mcp stdio 进程。N9 计划允许“start over stdio or use MCP library test harness”,因此不构成阻塞。
|
||
- 非阻塞观察:由于本轮硬约束禁止创建文件,未现场复跑完整 verify-go-mcp.ps1;若业务经理要求更强独立运行证据,需要在允许创建/清理临时构建产物的审批下复跑。
|
||
|
||
### 风险等级
|
||
低。
|
||
|
||
### 是否阻止进入下一轮
|
||
不阻止进入下一轮审批/准备;但本轮 pi 审查没有进入 N10,也不代表可直接实施 N10。进入 N10 仍应按流程另行获批。
|
||
|
||
### 结论
|
||
第九轮 N9 smoke verification 脚本实现可信:脚本包含真实 build、SDK harness initialize/connect、tools/list、tools/call win_helper_version、四工具集合校验、helper_name/tool_count 断言和 action tool 禁止词检查;未发现 ok=true/tool_count 纯伪造、额外 action tools、N10 runbook 或搜索/发送/文件/自动登录/注入/hook/读内存等越界能力。建议低风险通过本轮 pi 审查;完整复跑因本轮“不得创建文件”约束未执行,作为非阻塞观察记录。
|
||
|
||
## 2026-07-05 第十轮 N10 pi 审查
|
||
|
||
- 审查范围:
|
||
- `docs/go-mcp-minimal-plan.md` 的 N10 Operator runbook and process scripts 节点。
|
||
- `docs/go-mcp-runbook.md`。
|
||
- `docs/process/go-implementation-log.md` 的 N10 记录。
|
||
- `README.md` 状态、`git status --short --untracked-files=all`、tracked/staged diff、近期提交记录。
|
||
- 使用 `Select-String` 复核必需命令、四个允许工具、非目标边界、Python MCP/发送/搜索/文件相关表述;未使用 `rg`。
|
||
- 审查证据:
|
||
- Runbook 覆盖必需命令:`scripts\verify-win-helper.ps1`、`go test ./...`、`go build ./cmd/isphere-mcp`、`scripts\verify-go-mcp.ps1`。
|
||
- Runbook 覆盖四个允许工具:`win_helper_version`、`win_helper_self_check`、`win_helper_scan_windows`、`win_helper_dump_uia`,并列出允许参数。
|
||
- Runbook 覆盖边界:`no login automation`、`no send message`、`no send file`、`no receive/download file`、`no process injection`、`no hook`、`no memory reading`,并额外列出 no search contacts/open conversation/automatic login/Python MCP fallback。
|
||
- Runbook 明确 `Python is not required`、`Python MCP is not part of this path`,未暗示 Python MCP 是必需项。
|
||
- Runbook 明确 message/file/search action tool 不存在,future send/file operations 需明确人工审批和审计,当前阶段未实现。
|
||
- `git status --short -- README.md` 与 `git diff --name-only -- README.md` 无输出,未发现 README 修改。
|
||
- `git diff --name-only` 与 `git diff --cached --name-only` 无输出,未发现 tracked/staged 代码或文档差异;当前工作树仍包含前序节点留下的未跟踪 Go/script/docs 文件。
|
||
- 近期提交记录未显示 N10/N11 提交;Go 日志明确“未进入 N11,未提交”。
|
||
- 发现的问题:
|
||
- 未发现阻塞问题。
|
||
- 观察项:工作树仍有前序未跟踪实现文件,属于多智能体累积状态;本轮审查没有回退或修改这些文件。
|
||
- 风险等级:低。
|
||
- 是否阻止进入下一轮:不阻止进入下一轮审批;N11 仍需业务经理单独批准后再执行。
|
||
- 结论:N10 runbook 文档覆盖计划要求的命令、允许工具、MCP client command、explicit non-goals、real-login UIA capture procedure;未发现硬编码成功、伪造验证、Python MCP 必需表述、发送/搜索/文件能力已实现暗示、README 修改、提交或 N11 越界迹象。
|
||
|
||
## 2026-07-05 第十一轮 N11-A pi 审查
|
||
|
||
- 审查范围:
|
||
- `docs/go-mcp-minimal-plan.md` 的 N11 Commit and review checkpoint 节点。
|
||
- `docs/process/go-implementation-log.md` 的 N11-A 验证与精确提交记录。
|
||
- `git status --short --untracked-files=all`、`git log --oneline -8`。
|
||
- 四个 N11-A 提交:`63cda71`、`8956f33`、`17fa9dd`、`57f1d42` 的 `git show --stat --name-only` / `--shortstat`。
|
||
- `git ls-files` 对 Python MCP 路径与构建产物的检查。
|
||
- Go 源码中 `mcp.AddTool`、四个工具名与禁止能力关键词的 PowerShell `Select-String` 检查;未使用 `rg`。
|
||
- 现场复核 `go test ./... -count=1`。
|
||
- 审查证据:
|
||
- N11-A 前置状态复核:追加本审查前,`git status --short --untracked-files=all` 无输出,符合 N11-A 后 clean worktree 报告。
|
||
- 最近提交为:`57f1d42 docs: add go mcp runbook`、`17fa9dd test: add go mcp verification script`、`8956f33 feat: add go helper client and mcp tools`、`63cda71 docs: add go mcp plan and process logs`。
|
||
- 提交范围与主题匹配:
|
||
- `63cda71` 仅包含 plan/library-decision/process review/log 文档。
|
||
- `8956f33` 包含 Go module、helperclient、mcpserver、tools 与 cmd 入口。
|
||
- `17fa9dd` 仅包含 `scripts/verify-go-mcp.ps1`。
|
||
- `57f1d42` 仅包含 `docs/go-mcp-runbook.md`。
|
||
- 未发现提交临时 build 产物:HEAD 中仅有 `runs/.gitkeep` 命中 runs/exe 相关检查;`isphere-mcp.exe` 与 `cmd\isphere-mcp\isphere-mcp.exe` 均不存在。
|
||
- 未发现 Python MCP 文件:`git ls-files -- 'src/isphere_ai_bridge/*' 'tests/test_*.py' '*.py'` 无输出。
|
||
- 现场复核 `go test ./... -count=1` 退出 0:`cmd/isphere-mcp [no test files]`,`internal/helperclient`、`internal/mcpserver`、`internal/tools` 均 ok。
|
||
- 生产 Go 源码 `mcp.AddTool` 数量为 4,工具名仅为 `win_helper_version`、`win_helper_self_check`、`win_helper_scan_windows`、`win_helper_dump_uia`。
|
||
- 生产 Go 源码禁止能力关键词检查未命中 SearchContact/OpenSession/SendMessage/SendFile/ReceiveFile/Upload/Download/auto login/process injection/ReadProcessMemory/OpenProcess/WriteProcessMemory/CreateRemoteThread/SetWindowsHookEx/SendKeys/UIAutomation/AutomationElement/FindWindow 等实现。
|
||
- `docs/process/go-implementation-log.md` 记录 N11-A 已运行 `verify-win-helper.ps1`、`verify-go-mcp.ps1`、`go test ./...`、`go build ./cmd/isphere-mcp`,并清理顶层 `isphere-mcp.exe`;本轮 pi 审查未复跑会创建/重写构建产物的 helper/MCP build 脚本,仅复跑不会在仓库留下产物的 `go test`。
|
||
- 发现的问题:
|
||
- 未发现阻塞问题。
|
||
- 观察项:`63cda71` 文档提交插入量较大,但文件类型均为计划/过程/审查文档,未混入功能代码或构建产物;属于 N0-N10 累积过程日志归档。
|
||
- 风险等级:低。
|
||
- 是否阻止进入下一轮:不阻止 N11-B / 下一步流程 checkpoint;但不代表允许进入 N12,真实登录 UIA 采集仍需单独审批。
|
||
- 结论:N11-A 验证与提交记录可信;四个提交按文档、Go helper/MCP、验证脚本、runbook 分组,未发现 broad stage 混入临时 exe 或无关产物;当前无 Python MCP、无 search/send/file action tools、无 N12 真实登录 UIA 采集或越界能力迹象。
|