已关闭
[Bug]: [team] 成员把 team_desc 里的产物要求当成行动指令,导致并发抢写覆盖 leader 的正确产物 #1478
张隆敏创建于  24 天前关闭于  23 天前
张隆敏
24 天前 创建

Checklist

🐞 问题详细描述

现象

database 性能诊断 benchmark 14 个 case 中,database_8(session database_8_1785424359916,team FinanceDB-Perf-Diagnosis)出现并发抢写:5 个角色(leader + agent1/2/3/5)在约 14 秒内对同一个产物文件 team-workspace/diagnosis.json 无锁并发写入,最终落盘是 agent2 的富文档(4677 字节,root_causes 结构),而非 leader 写对的最小 JSON({"predicted_labels": ["INSERT_LARGE_DATA", "MISSING_INDEXES"]}),评测判错。

根因链(trace 实测)

  1. 题目把 Output Requirement 直接发给 leaderWrite your diagnosis result to a file named diagnosis.json ... format {"predicted_labels": ["LABEL1","LABEL2"]}

  2. leader 把产物要求原样塞进了 team_descbuild_team 时):

    team_desc = "Diagnose database performance issues ... Final diagnosis must be written to diagnosis.json."

  3. team_desc 被框架原样注入每个成员的 Team Info 段prompt-attachment type="team_info"),label 为 Team Goal & Directives / 团队目标与指令。该 label 没有"仅供了解、非行动指令"的提示。

  4. 成员据此误以为是行动指令。agent2 的 reasoning 原话:

    "Let me take initiative and write the final diagnosis.json based on the evidence, since the team info instructs: 'Final diagnosis must be written to diagnosis.json.'"

  5. 全员汇报完成后,5 个角色各自决定"该写 diagnosis.json 了",用 bash cat > / echo > 抢写(绕过 write_file 的写前读守卫,也无产物 owner 校验)。

  6. leader 写对最小 JSON 并 cat 验证读到正确内容后,1 秒内被 agent2 的富文档覆盖。成员全程"写前不查、写后才发现竞争"(agent2: "It looks like multiple agents wrote diagnosis.json simultaneously. Let me verify.")。

参考issue: https://gitcode.com/openJiuwen/jiuwenswarm/issues/2838

详细的环境信息描述

Linux

其他辅助信息

版本信息

感谢您的贡献 🎉!

likedislike
openJiuwen-bot成员
24 天前 评论:

注意

此 Issue 需要负责人。 如果没有指派时, iamcandiceguo 是默认的负责人

likedislike
OopenJiuwen-bot成员
24 天前 将 iamcandiceguo 设为负责人
OopenJiuwen-bot成员
24 天前 添加了label:sig/sig-agent-core
openJiuwen-bot成员
24 天前 评论:

欢迎来到 openJiuwen 社区

Hey @min_gitcode , 感谢你对社区的贡献.

机器人使用手册

有关指令的使用,可以点击 此处 查看详情。开发人员可以在每个PR或Issue下方评论特定指令来触发机器人任务。

联系指引

有疑问可以联系 SIG: sig-agent-core ,
维护者是: @seanzhang_cn, @xinyu-jiuwen ,
审核者是: @alan_cheng, @deyang, @iamcandiceguo, @yangzequ .

likedislike
张隆敏
24 天前 关联了pull request:fix(team): clarify team_desc is context, not a directive for members
OopenJiuwen-bot成员
23 天前 关闭了 issue
OopenJiuwen-bot成员
23 天前 issue状态由 TODO 改变为 DONE
Gguoqian成员
13 天前 关联了里程碑:V0.1.17