Skip to content

[bug] BTW 平台明确拒绝工作结果后仍记录任务已完成 #156

Description

@BegoniaHe

Preflight

  • I searched open and closed Issues and PRs.
  • I tested the current master branch or the exact commit.
  • This report contains no secrets, tokens, or private data.
  • This is not a security vulnerability (those use a private advisory).
  • I filled exactly one of Human note or Agent note, matching who wrote this Issue.

Affected area

Providers / agent runners

What happened

P2 / medium · AUD-20260910-agent-005

WorkLoop 仅捕获 result_dispatcher 异常,但真实 RespondStage 将平台拒绝或发送异常转换成 delivery_receipt 后正常返回。真实 PipelineScheduler、RespondStage 与 WorkLoop 组合实验得到 receipt=failed 而工作状态为 completed;发送异常则为 unknown,不能断言用户未收到。独立复核已修正判定行号与未知结果的影响边界。

Minimal reproduction

建立真实 PipelineScheduler、WorkLoop、RespondStage;平台发送替身对开始确认返回成功,对最终工作结果返回 PlatformSendResult(success=False)。运行工作到结束,然后读取事件 delivery_receipt 与 WorkSession。

Expected: 最终结果被明确拒绝不能沿成功交付路径报告 completed;至少应记录可查询的交付失败,并与 unknown 区分。

Actual: 确认 accepted;最终 receipt=failed;WorkSession.status=completed。独立复核也验证 send 异常会得到 receipt=unknown、status=completed;unknown 不证明用户没有收到。

Impact: 确认消息已获接受而最终结果被明确拒绝时,用户没有最终结果,但状态查询报告任务完成;提交异常则结果未知却仍报完成。

Code evidence

Suggested acceptance criteria

  • 将最终投递结果纳入工作状态,保留失败与未知结果的区别,并使用真实 RespondStage 回归测试。
  • 在当前真实控制流上增加失败路径组合回归,不能只断言测试替身抛异常或手工设置工作状态。
  • 保持 BTW 默认关闭、现有授权和原请求身份;如调整用户行为,同步中英文文档。

Validation and limits

真实 scheduler、RespondStage 和 WorkLoop 组合,只有平台及模型执行边界是内存替身。

本次审计运行:首轮 BTW/入口/状态/能力路由相关测试 173 passed;Agent、工具、历史、配置与导入边界测试 327 passed;pipeline/WebChat/生命周期测试 108 passed;两套循环选择器测试 3 passed。另运行上述确定性组合探针,并完成独立只读反证。现有测试通过不代表已覆盖此缺陷。未改动产品代码。

已检索全部 61 条 Issue 与 89 条 PR(含关闭/合并状态,审计开始时快照),未发现本缺陷的重复报告。关联已完成的功能跟踪 #125#126#127,以及总跟踪 #122;自动分类器实验 #133#135 不属于此缺陷。

Commit or version

037994ea4c8c289e4d5c8e7611a835ced93eeddd (master)

Environment

Linux,源码 checkout;Python 3.14.6;Node.js v26.8.1。后端探针使用内存/临时目录,不访问开发者数据或真实 IM、付费模型。

Author

Agent

Agent note

Codex 按用户授权结合代码审查与仓库 audit-product 技能报告此问题,并使用独立只读 AI agent 反证。目标是修复 BTW 工作循环的实际行为;涉及路径见上方证据,已运行检查与剩余限制如上。本 Issue 按 bug_report.yml 填写;本次只审计、建单,没有修改产品代码或声称修复已完成。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions