现象
apps/sidecar/src/services/agent-runtime/plugins/plugin-hooks-bridge.test.ts 中
「allow-ed shell hook with non-JSON output returns {message}」确定性失败:
test.ts:159 expect(out?.message).toBe("plain text")
Received: undefined
基线对照
在 origin/main(2e58469f4,detach worktree + bun install)上运行同一文件同样 6 pass / 1 fail,
排除本分支改动引入,定性为 main 预存缺陷。文件近三次变更为 #495 层叠重构相关提交
(2c6dbcb65 / 00506ad / 71ab93f),疑似重构中 hook 输出包装路径的语义回归。
期望
非 JSON stdout 的 allow-ed shell hook 应返回 { message: <原文> };现 message 为 undefined。
请排查 buildPluginAgentHooks 的 spawner 结果→hook 返回值转换链路。
发现于 #388 第二批 PR #497 的验证过程。
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
现象
apps/sidecar/src/services/agent-runtime/plugins/plugin-hooks-bridge.test.ts中「allow-ed shell hook with non-JSON output returns {message}」确定性失败:
基线对照
在 origin/main(2e58469f4,detach worktree + bun install)上运行同一文件同样 6 pass / 1 fail,
排除本分支改动引入,定性为 main 预存缺陷。文件近三次变更为 #495 层叠重构相关提交
(2c6dbcb65 / 00506ad / 71ab93f),疑似重构中 hook 输出包装路径的语义回归。
期望
非 JSON stdout 的 allow-ed shell hook 应返回
{ message: <原文> };现 message 为 undefined。请排查 buildPluginAgentHooks 的 spawner 结果→hook 返回值转换链路。
发现于 #388 第二批 PR #497 的验证过程。
Co-Authored-By: Claude Fable 5 noreply@anthropic.com