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 摘要。