Skip to content

[bug] skill_exec 漏传 workspace_runtime,导致指定的输出文件无法收集 #350

Description

@kinolo

skill_exec 执行结束后,_collect_final_result 调用 _prepare_outputs 时少传了一个参数:

files, manifest = await run_tool._prepare_outputs(
    ctx, exec_session.ws, fake_run_input
)

当前方法签名是:

async def _prepare_outputs(self, ctx, ws, workspace_runtime, input_data):

因此会抛出:

TypeError: SkillRunTool._prepare_outputs() missing 1 required positional argument: 'input_data'

这个异常被 except Exception 捕获后,仅记录 warning,并降级为 files=[], manifest=None。命令本身仍可正常执行,stdout 和 exit code 也正常,但通过 output_files / outputs 指定的文件无法收集,返回结果的 warnings 中也没有提示。结果随后被标记为 finalized,轮询不会重试收集。

影响范围是 skill_exec 的输出文件收集;只读取终端输出的任务通常没有可见影响,skill_run 不受此问题影响。

从 Git 历史看,614b07d(2026-05-26)为 _prepare_outputs 增加了 workspace_runtime 参数,同时更新了 skill_run 的调用,但遗漏了这里。

目前 test_skill_exec.py 没有覆盖执行结束后的文件收集流程,其中 _prepare_outputs 也使用了不校验签名的普通 AsyncMock。

建议将执行时获取的 workspace_runtime 经 _start_session 保存到 _ExecSession,收集结果时传入,并补充验证非空输出文件的回归测试。

Activity

  1. changed the title [-]skill_exec 漏传 workspace_runtime,导致指定的输出文件无法收集[/-] [+][BUG] skill_exec 漏传 workspace_runtime,导致指定的输出文件无法收集[/+] on Sep 29, 2026
  2. kinolo commented on Sep 30, 2026

    @kinolo
    Author

    已在 #351 提交修复,根因已处理,并补充了相关回归测试。目前 CI 已通过。

  3. changed the title [-][BUG] skill_exec 漏传 workspace_runtime,导致指定的输出文件无法收集[/-] [+][bug] skill_exec 漏传 workspace_runtime,导致指定的输出文件无法收集[/+] on Sep 30, 2026
  4. raychen911 commented on Oct 9, 2026

    @raychen911
    Contributor

    已经提了pr: #356

  5. kinolo commented on Oct 9, 2026

    @kinolo
    Author

    收到好滴

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions