Skip to content

feat(code-review): auto-verify GitHub Actions runner version from CI logs#186

Draft
aivong-openhands wants to merge 1 commit intomainfrom
add-github-actions-runner-verification
Draft

feat(code-review): auto-verify GitHub Actions runner version from CI logs#186
aivong-openhands wants to merge 1 commit intomainfrom
add-github-actions-runner-verification

Conversation

@aivong-openhands
Copy link
Copy Markdown
Contributor

@aivong-openhands aivong-openhands commented Apr 17, 2026

  • A human has tested these changes.

Why

When the code review skill reviews a PR that upgrades a GitHub Action (e.g., docker/login-action v3→v4), it currently flags the runner version requirement from the release notes but asks the PR author to manually verify compatibility. The agent is already looking at the CI workflow job that ran the upgraded action to confirm it passed — it should extract the runner version from that same job's logs and report it directly, removing unnecessary manual work.

Summary

  • Added section 9 "GitHub Actions Version Upgrades" to the code review skill (skills/code-review/SKILL.md) that instructs the agent to extract the runner version from the CI job it is already inspecting, compare it against the requirement, and report the verified result.
  • Updated the existing "Risk and Safety Evaluation" section number from 9 to 10.
  • Added 6 tests for the new section and updated 1 existing test for the renumbered section.

Issue Number

Related to review comment r3094412910 on OpenHands/OpenHands#13960.

How to Test

Run the test suite:

python -m pytest tests/test_code_review_risk_evaluation.py -v

All 17 tests pass (6 new + 11 existing).

Notes

  • The plugins/pr-review/skills/code-review/ directory is a symlink to skills/code-review/, so the pr-review plugin automatically picks up this change.
  • This PR was created by an AI agent (OpenHands) on behalf of the user.

…logs

Add section 9 'GitHub Actions Version Upgrades' to the code review skill
that instructs the agent to proactively verify runner version compatibility
from the PR's own CI job logs, instead of asking the PR author to check
manually.

When a GitHub Action upgrade requires a minimum runner version (e.g.,
docker/login-action v4 requires Actions Runner v2.327.1+ for Node 24),
the reviewer now:
1. Fetches workflow runs for the PR via the GitHub API
2. Extracts the runner version from job logs ('Current runner version:')
3. Compares against the requirement and reports the verified result
4. Falls back to flagging for manual confirmation if CI hasn't run

Also adds 6 tests for the new section and updates existing test for
the renumbered Risk and Safety Evaluation section (9→10).

Co-authored-by: openhands <openhands@all-hands.dev>
Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

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

🟢 Good taste - Pragmatic solution that eliminates manual busywork.

[IMPROVEMENT OPPORTUNITIES]

  • [skills/code-review/SKILL.md, Line 105] Clarity: Consider briefly mentioning how to find job_id (e.g., via gh api repos/{owner}/{repo}/actions/runs/{run_id}/jobs), though the current wording is acceptable since it implies the agent has already navigated to the job.

[RISK ASSESSMENT]

  • [Overall PR] ⚠️ Risk Assessment: 🟢 LOW
    Documentation-only change with solid test coverage. Adds actionable instructions for automated runner version verification. No breaking changes, no code execution changes. The grep pattern "Current runner version:" depends on GitHub's log format, but this is a pragmatic trade-off that can be updated if the format changes.

VERDICT:
Worth merging: Solves a real problem (referenced in review comment r3094412910) with clear, testable instructions.

KEY INSIGHT:
This automates verification that was previously manual busywork - exactly the kind of incremental improvement that compounds into better code review quality.

@aivong-openhands
Copy link
Copy Markdown
Contributor Author

Followup to #167

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.

3 participants