ci-doctor: compiled workflow has no `actions` toolset, so it can't read failed job logs

未关闭 适合新手
#420 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, yaml

调研方向

从 workflows/ci-doctor.md 开始,检查其 GitHub 工具集的配置方式;issue 给出了锁文件当前的工具集和建议的 YAML 更改。确认编译后的工作流包含 actions 工具集,并且代理能够获取失败作业的日志。编译后的工作流提供这些工具且保留默认工具集后,即为完成。

由索引模型根据 Issue 内容生成。

描述

workflows/ci-doctor.md asks the agent to "inspect the workflow run and list its jobs" and "retrieve logs for failed jobs", but the workflow doesn't enable the GitHub actions toolset, so it has no tool that can do either.

Repro

  • Compile the current workflows/ci-doctor.md (578e0e0) with gh-aw v1.2.2.
  • The lock file sets GITHUB_TOOLSETS: "context,repos,issues,pull_requests", which is the default set with no actions.
  • permissions: actions: read is set, but that grants the job token permission; it doesn't add the MCP tools.
  • gh inside the sandbox isn't authenticated, and the workflow has no pre-step that downloads the logs.

What we saw
In an evaluation replaying 15 real CI failures on a private repo (same model and config for every run, apart from this change):

Stock ci-doctor With toolsets: [default, actions]
Runs that ended with no diagnosis 4 of 15 0 of 15
Correct root cause 8 of 15 11 of 15

Without the toolset, the agent reported missing tools in missing_tools ("no tool can list GitHub Actions workflow jobs or fetch job logs") and either stopped or worked from whatever it could find in the checkout. With the toolset, every run called get_job_logs.

Suggested fix

tools:
  github:
    toolsets: [default, actions]

default keeps the current toolsets. I'm happy to open a PR if that's useful.

主要语言
Python
星标
1.1k
派生
163
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

githubnext/agentics 的其他 Issue

查看 githubnext/agentics 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。