fix: 恢复安全 nodeprobe 四轴状态与前台身份 - #86
Conversation
Synchronize tools/nodeprobe from 863c316 (auto-discovered .js observer, default pi-activity dir, web /api/status schema 1, unique-Pi missing channel health=normal). Replace Go title/process classifiers with a typed nodeprobe adapter, extend protocol/APP data models with four axes, and leave list/icon/animation/favorite UI unchanged.
After Ctrl+C back to zsh, listing still showed an Agent icon because walk_comms matched every descendant, including SN leftovers, while the foreground group (stat +) was the shell. Identity now prefers the tty foreground process group so a nested Agent in a bash wrapper still matches, but a background leftover does not. Closes #85.
5ee2f9c dropped every pane whose job-control foreground was still zsh, including live Agent TUIs that left the fg process group. PR11 then filtered unknown and listing went empty. Identity now: Agent in fg group wins; if tmux current command is a shell, do not promote background leftovers; otherwise keep the full descendant walk. Also embed providers.tsv so a cross-compiled binary still loads the whitelist when CARGO_MANIFEST_DIR is gone. Both reds: leftover_background_agent_is_not_identity and running_agent_still_identified_when_shell_holds_plus.
四轴兼容性复核:不能用本 PR 的 Cargo 绿色作为 Pi 工作状态回归的验收核对 HEAD 已确认的事实,不等于生产归因HEAD 的 tools/nodeprobe/src/lib.rs 的 Report/Node 仍是旧结构:没有 schema_version/activity/session_name/health。base 也同样缺少这些字段。因此不能把这项缺失写成“PR86 的两个新增提交删了四轴”,简单 revert 这两个提交也不会恢复四轴。 corral-serve PR11 head 1858a535 的 adapter 要求 schema_version=1,并验证 activity、state/activity 一致性、health。按这两个 Rust 版本的声明构造合成 JSON,运行摘出的 Go 类型/验证谓词:两份旧结构都得到 同一服务端 manifest 仍钉 binary SHA-256 保持分开的四条追踪
进入回退/部署前缺少的验收需要同一 daemon、同一组仍运行的合成 Agent,核对原/新二进制摘要及各自源码 SHA,并实际发 listing/Level2;只保留 ref、计数、Provider、activity、session_name、health、Name 等状态/结构字段。ref 集合不得变空或丢仍运行的 Agent,也不得把 bash 加回来。 本轮未连接生产/验收 daemon,所以没有这份计数与 ref 对照。保持本 PR 未合并,不把接口反例、Cargo 通过或 App 投影通过替代它。未读取 pane 正文、真实 argv、凭据或真实对话。 |
恢复 provider、activity、session_name、health 的独立投影,并保留 Ctrl+C 返回 shell 后不复活残留 Agent 的前台身份判断。探测使用受限 list-panes 与窄字段 ps,包含 Pi 生命周期通道和 fail-closed 控制。
已验源码 4f77e3b;CI 实际 checkout 6e47021 与其完整 tree 相同。交付 head 4619b56;run 34090337772 三 jobs success,Rust 46 lib + 1 main + 1 fake_tmux,G-SAFE 合成隔离调用及拒绝控制通过。详细证据保留在 DELIVERY.md / N-RECEIPT.json。
用户已完成最终组合的手机验收并授权合并。此 PR 已以 merge commit 进入 main;完整 App 与服务端依赖按后续 owning PR 顺序并线。历史 archwiki partial 和独立验收未覆盖项不追认成通过。