Files
cbb-refresh-verify-795/docs/superpowers/plans/2026-09-23-system-audit-and-native-verify.md
T
阿白叔 11a2b2e46e Import CBB refresh verify r4 stability baseline
Preserve tested Verify source, authoritative READY checks, bounded bridge retries, diagnostics and failure-only reporting. Include 336-test suite and packaging assets; exclude live Mentor samples, field logs, backups and distributions.
2026-09-29 15:05:20 +08:00

44 lines
2.9 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.
# CBB Verify 系统审计与原生触发修复计划
> 适用于当前 `dist-repaired-20260922-win10-native-menu-fallback-r1` 现场数据。
## 已确认的根因
现场 `events.jsonl` 依次出现 `verify_invoke`、`verify_invoke_returned` 和 `verify_menu_fallback`,但没有任何 `pcb_launch` 或 `pcb_worker_started`。`post_verify_observations.jsonl` 显示 UIA 调用后原生 `#32768` 菜单仍存在,坐标消息后菜单消失,进程列表始终只有 `LibraryManager.exe`。因此当前失败点是 LMC 原生 MFC 菜单命令没有进入 LMC 的命令路由。此前旧数据中的 `pcb_launch` 来自直接启动 `common\\ExpeditionPCB.exe`,不能作为 LMC Verify 成功证据。
## 目标链路
```text
定位唯一 CBB
-> 打开该节点原生菜单
-> UIA InvokePattern
-> 若菜单仍在:私有 popup 坐标消息兜底(仅关闭菜单,不等同于成功)
-> 观察菜单消失 + 新的 ReusableCircuit PCB
-> 绑定 PCB COM
-> Project Integration
-> 保存/关闭
-> 状态桥复核 IsVerifiedReuseBlock
```
## 修改边界
1. `WM_COMMAND` 曾作为实验路径,但已由 `API-FINDINGS.md` 的 Win32 实测否定:广播无效,`SendMessage` 还可能阻塞 LMC 线程;它只保留在历史记录,不进入生产代码。
2. UIA Verify 调用没有启动迹象且菜单仍可见时,只允许向该私有 popup 投递相对坐标消息;菜单消失本身不再视为 Verify 成功。
3. `post_verify_diagnostics.py` 和 `verify_runner.py` 记录 `verify_invoke`、`verify_invoke_returned`、`pcb_worker_started`,必须观察到新的 PCB 后才能进入 COM 链路。
4. LMC 阶段持续观察属于本次私有桌面的模态框;未知窗口原样记录,已知安全确认框才自动处理。
5. PCB 绑定只在出现新的、命令行包含目标 `.pcb` 与 `-ReusableCircuit` 的进程后进行,防止绑定残留 PCB。
6. 备份继续作为旁路证据,网络盘超时不能阻塞 Verify;备份失败不能改变 Verify 触发状态。
7. worker 被外层超时/弹窗错误终止后,由 supervisor 根据本次 CBB 的命令行和基线 PID 再做一次定向清理,避免 `common/wg/LibraryManager` 孤儿化。
## 验收门槛
- 离线回归测试覆盖 `RECT`、命令 ID、菜单状态和重复触发保护。
- 全量 Python 测试通过,冻结包 smoke test 通过。
- Win10 现场单项测试必须出现:
`verify_command_posted` → `verify_dispatch_result=menu_closed` → `pcb_start_observed` → `integration_status` → `saved_and_closed` → `complete`
- 若命令发送后菜单消失但没有 PCB,结果必须明确为 `VERIFY_DISPATCH_FAILED`,不再笼统报告 60 秒超时。
- 无论 PASS、FAIL 还是 TIMEOUT,`events.jsonl` 都必须出现 `source=supervisor_cleanup` 的 `process_cleanup` 记录;现场复测后进程列表中不得留下本次目标 PCB/LMC。
- 未通过单项现场验收前,不启用批量或并发。