Protected session capture: `Parse agent logs for step summary` fails when the engine step never ran
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- github-actions, go, javascript
调研方向
阅读 pkg/workflow/compiler_yaml_ai_execution.go 中的 generateLogParsing 以及附近的编译器测试。检查受保护的捕获解析器 ID 如何处理,然后补充对条件解析步骤以及其他引擎行为保持不变的测试覆盖。确认两个情况都经过断言,并且只有当 steps.agentic_execution.outcome 为 skipped 时才跳过受保护的捕获解析器,即为完成。
由索引模型根据 Issue 内容生成。
描述
This issue was posted by Claude Code using claude-opus-5-5 on behalf of David.
Symptom
With protected-session-capture: true, a step that fails before the engine step (a failed PR checkout, a custom pre-agent gate that exits 1) leaves a second error on the agent job:
ERR_VALIDATION: AWF protected session capture could not be verified or published; no shared-log fallback is permitted
The engine step is skipped, so no capture can exist. The error reads as a capture integrity failure and hides the step that actually failed.
Example on v1.2.1 with the pydantic-ai engine: https://github.com/pydantic/pydantic-ai/actions/runs/43072677386. Checkout PR branch fails, Execute Pydantic AI CLI is skipped, and Parse agent logs for step summary fails with the error above.
Cause
generateLogParsing emits the parse step with an unconditional if: always():
https://github.com/github/gh-aw/blob/e478cc24ba638ef0668efd15d244daa4c1b0c405/pkg/workflow/compiler_yaml_ai_execution.go#L252-L254
With protected capture on, runLogParser calls readProtectedCommandOutput on GH_AW_AGENT_OUTPUT before any parsing:
https://github.com/github/gh-aw/blob/e478cc24ba638ef0668efd15d244daa4c1b0c405/actions/setup/js/log_parser_bootstrap.cjs#L282
Its fs.lstatSync throws on the capture directory AWF never created:
https://github.com/github/gh-aw/blob/e478cc24ba638ef0668efd15d244daa4c1b0c405/actions/setup/js/protected_command_output.cjs#L41
The catch block reports that as an unverifiable capture:
https://github.com/github/gh-aw/blob/e478cc24ba638ef0668efd15d244daa4c1b0c405/actions/setup/js/log_parser_bootstrap.cjs#L666-L676
Proposed fix
In generateLogParsing, when the engine has protected session capture enabled (the case protectedSessionCaptureParserID already handles), emit:
if: always() && steps.agentic_execution.outcome != 'skipped'
Keep if: always() for every other engine. Add a compiler test that asserts the new condition for a protected-capture engine and the unchanged one otherwise.
Why this cannot mask a real missing capture
AWF writes the capture only inside the agentic_execution step. If that step started at all (success, failure or cancelled), its outcome is not skipped, the parse step runs, and readProtectedCommandOutput fails closed exactly as today. The Actions runner sets the outcome, so no step in the job can change it. Only the case where no capture can exist is skipped.
The steps that already require steps.parse_agent_logs.outcome == 'success' (Ingest agent output and the agent output uploads) are skipped today when the parse step fails, and stay skipped.
- 主要语言
- Go
- 星标
- 5.6k
- 派生
- 625
- 平均合并
- 5 小时 39 分钟
- 30 天内合并 PR
- 796
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-aw 的其他 Issue
-
agent-research cookie
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
automation observability optimization traces
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
awf community
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
automation cli-tools testing
难度 1/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Pi on arc-dind: an aliased model reaches pi empty (`Model "aw-gateway/" not found`)可能已有人在做 @pelikhan 于 15 天前认领。 未关闭ai-inspected community
难度 2/5 1-3 小时 新手友好度 83/100
github/gh-aw#72530 · 1 个 reaction · 已指派 2 人 ·
维护者通常 1 天内回复
相似的 Issue
-
type:bug
难度 2/5 1-3 小时 新手友好度 72/100
nightgauge/nightgauge#3266 ·
维护者通常 1 天内回复
-
area: ai-models priority: normal
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
prime-radiant-inc/evener#6325 ·
维护者通常 1 天内回复
-
team:library-maintainers
难度 2/5 1-3 小时 新手友好度 82/100
padok-team/burrito#1208 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
bazel-contrib/rules_go#4784 · 1 条评论 ·
维护者通常 1 天内回复