Skip to content

🐛 sidecar: plugin-hooks-bridge 非 JSON shell hook 输出未包装为 {message}(#495 后预存失败) #498

Description

@CavinHuang

现象

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions