issue-arborist: `gh issue list` fails under DIFC proxy because /meta returns 403
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
调研方向
从 workflows/issue-arborist.md 的“Fetch issues data”步骤开始,检查其输出是如何被使用的。在通过 DIFC 代理的环境中运行 workflow,验证 issue 数据是否以预期字段写入 /tmp/gh-aw/issues-data/issues.json,并确认 MCP server 启动时没有下游 telemetry 错误。检查其他 workflow 是否也通过 shell 调用 gh 来预取数据。
由索引模型根据 Issue 内容生成。
描述
Summary
The Fetch issues data step in workflows/issue-arborist.md uses gh issue list, which fails immediately on any GitHub Enterprise / DIFC-proxied runner because the gh CLI hits the /meta endpoint on startup and gets HTTP 403 from the proxy.
Repro
Run the unmodified workflow in a repo whose runners are behind GitHub's corporate DIFC proxy (localhost:18443 redirect for GITHUB_API_URL / GITHUB_GRAPHQL_URL, with a custom CA). The step fails on the first gh invocation:
HTTP 403: 403 Forbidden (https://localhost:18443/api/v3/meta)
##[error]Process completed with exit code 1.
Because this step runs before the MCP server starts, the rest of the job collapses with a misleading downstream symptom:
ERR_SYSTEM: rpc-messages.jsonl is present but zero bytes — MCP telemetry capture failed
(server may not have started or crashed before any RPC)
Example failed run from microsoft/testfx: https://github.com/microsoft/testfx/actions/runs/26294701799
Root cause
gh CLI always probes /meta to verify the host before any subcommand. In DIFC-proxied environments the proxy blocks /meta, so every gh command fails — regardless of whether the actual GraphQL/REST endpoint would have worked.
Suggested fix
Replace the gh issue list invocation in workflows/issue-arborist.md with a direct REST API call via curl to GITHUB_API_URL/search/issues, which doesn't trigger the /meta probe. We've been carrying this patch downstream since #8185 in microsoft/testfx and just had to re-apply it in microsoft/testfx#8507 after re-syncing to upstream.
The drop-in replacement (preserves the same JSON shape so the agent prompt is unchanged):
- name: Fetch issues data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_AW_ORIGINAL_GITHUB_API_URL: ${{ github.api_url }}
GH_AW_GITHUB_REPOSITORY: ${{ github.repository }}
run: |
mkdir -p /tmp/gh-aw/issues-data
echo "⬇ Downloading the last 100 open issues (excluding sub-issues)..."
# Use REST API directly to avoid gh CLI /meta check blocked by DIFC proxy.
# State is normalized to uppercase (OPEN/CLOSED) to match gh CLI GraphQL output format.
curl -s \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github+json" \
--get \
--data-urlencode "q=repo:${GH_AW_GITHUB_REPOSITORY} is:issue is:open -is:sub-issue" \
--data-urlencode "sort=created" \
--data-urlencode "order=desc" \
--data-urlencode "per_page=100" \
"${GH_AW_ORIGINAL_GITHUB_API_URL}/search/issues" \
| jq '.items // [] | map({
number: .number,
title: .title,
author: {login: .user.login},
createdAt: .created_at,
state: (.state | ascii_upcase),
url: .html_url,
body: .body,
labels: [.labels[] | {name: .name}],
updatedAt: .updated_at,
closedAt: .closed_at,
milestone: (if .milestone != null then {title: .milestone.title} else null end),
assignees: [.assignees[] | {login: .login}]
})' \
> /tmp/gh-aw/issues-data/issues.json \
|| echo '[]' > /tmp/gh-aw/issues-data/issues.json
echo "✓ Issues data saved to /tmp/gh-aw/issues-data/issues.json"
echo "Total issues fetched: $(jq 'length' /tmp/gh-aw/issues-data/issues.json)"
Scope
Any agentic workflow that shells out to gh <subcommand> for prefetch (rather than going through the MCP server) will hit this same /meta 403. issue-arborist is the one biting us today, but it'd be worth auditing the others in the same way and either swapping them to curl or routing prefetches through the MCP server.
Happy to send a PR if useful.
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 163
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
githubnext/agentics 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
githubnext/agentics#420 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
githubnext/agentics#402 ·
-
agentic-workflows automated documentation
难度 1/5 1 小时以内 新手友好度 1/100
githubnext/agentics#419 ·
-
Frontend未关闭
难度 5/5 一周以上 新手友好度 1/100
githubnext/agentics#418 ·
-
agentic-workflows
难度 2/5 1 小时以内 新手友好度 8/100
githubnext/agentics#415 · 1 条评论 ·
查看 githubnext/agentics 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
bad-antics/lateralus-lang#1489 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 1/5 1 小时以内 新手友好度 69/100
anderspitman/awesome-tunneling#330 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
scikit-hep/coffea#1668 ·