Skip to content

fix(review-pr): 增加 AI review 超时与诊断日志 - #289

Merged
Terry-Mao merged 3 commits into
mainfrom
fix/ai-pr-review-timeout-288
Oct 3, 2026
Merged

Terry-Mao merged 3 commits into
mainfrom
fix/ai-pr-review-timeout-288

Conversation

@Terry-Mao

Copy link
Copy Markdown
Owner

摘要

  • 为 AI PR Review 的 Codex 执行步骤增加 20 分钟超时,避免模型或工具调用异常导致 workflow 长时间卡住。
  • 增加 review 输入、执行结果、耗时和输出文件诊断日志,并将 Codex 最终消息纳入 review artifact。
  • 补充 workflow 测试,覆盖超时、输出文件和诊断步骤配置。

验证

  • PYTHONDONTWRITEBYTECODE=1 .venv/bin/python -m unittest discover -s .github/aicodingflow-tests -p 'test_review_workflow_dispatch.py'
  • git diff --check
  • actionlint 1.7.12(此前已通过;本次重复下载因 GitHub release 网络错误未完成)

Closes #288

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本 PR 为 AI PR Review 的 Codex 执行步骤新增 20 分钟超时,并补充输入/结果诊断日志、最终消息 artifact 与相应测试。改动聚焦、与 PR 描述一致,未发现阻塞性问题。

补充说明(无精确改动行或影响较低,故不逐条内联):

  • 新增的测试只断言了 AI_REVIEW_OUTCOME,未覆盖 STARTED_AT 输出;建议后续补一条断言,避免该诊断字段被意外移除。
  • 新增日志只记录输入文件字节数、结果状态与输出文件大小,未打印快照内容或任何密钥,未发现安全问题。
  • 除下述 duration_seconds 的边界情况外,超时与诊断步骤顺序、id/输出引用(ai_review_start、ai_review)均正确。

Comment thread .github/workflows/review-pr.yml Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本次改动仅涉及 AI PR Review 的 workflow 与对应单元测试:为 Codex 执行步骤补充 id: ai_review、timeout-minutes: 20(第 212、214 行)与 output-file: pr-worktree/codex-final-message.txt(第 220 行),新增 Log AI review inputs/Log AI review result 诊断步骤记录输入、耗时结果与输出文件大小,并把 Codex 最终消息纳入 artifact(第 289 行)。已核对 pr_diff.txt 中各行号与 workflow 配置一致,新增测试断言覆盖到位,本地运行 .github/aicodingflow-tests/test_review_workflow_dispatch.py 全部通过。未发现阻塞级正确性、安全性、测试或契约问题。review_discussion_context.json 中已解决且过期的 STARTED_AT 兜底评论,在当前 diff 第 252 行已通过 started_at="${STARTED_AT:-$finished_at}" 修复,故不再重复提出。

@Terry-Mao
Terry-Mao merged commit 70c8202 into main Oct 3, 2026
3 checks passed
@Terry-Mao
Terry-Mao deleted the fix/ai-pr-review-timeout-288 branch October 3, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

增加 AI PR Review 超时控制

1 participant