Add ACP backend mode to PR review action#210
Conversation
…iption-device-code
all-hands-bot
left a comment
There was a problem hiding this comment.
🟢 Good taste - Clean implementation that solves real problems (ChatGPT subscription auth, ACP backend) while maintaining excellent backward compatibility.
[RISK ASSESSMENT]
This PR introduces new execution paths (ACP mode, subscription auth) with moderate blast radius, but risk is well-mitigated by:
- Strong backward compatibility (defaults preserve existing api-key + openhands behavior)
- Comprehensive input validation for new modes
- Experimental features clearly marked in documentation
- Successful downstream validation mentioned in PR description
- Clean separation of concerns between modes
VERDICT: ✅ Worth merging - Well-structured feature addition with solid engineering practices and no critical issues.
KEY INSIGHT: The mode-based architecture cleanly extends the PR review action without breaking existing workflows, demonstrating good taste in API evolution.
|
Design update after simplifying the configuration surface: This action now supports two agent modes only:
I removed the previous |
|
Follow-up cleanup:
I also expanded the ACP/sub-agent explanation: sub-agent delegation is disabled in ACP mode because it depends on OpenHands-specific runtime behavior ( |
|
Follow-up cleanup: removed the The action now leaves |
|
Follow-up simplification: removed the bundled Codex-specific ACP setup. The action no longer has That makes the boundary provider-neutral:
This avoids growing provider-specific install/auth branches inside the action. |
|
Follow-up: removed the public There is no existing action-level timeout input to reuse here; the workflow/job |
|
ACP validation update with Codex ACP after the latest SDK changes:
Redacted log excerpt: |
|
Validation update after the SDK release:
Redacted log excerpt: |
Add a paragraph explaining that ACP servers support API key auth (via standard provider environment variables) as the simplest method, alongside the existing device-code login documentation. Co-authored-by: openhands <openhands@all-hands.dev>
Align naming with software-agent-sdk's agent_kind convention. Renames across action.yml, agent_script.py, README.md, and tests. Co-authored-by: openhands <openhands@all-hands.dev>
Simplify the env var / input / config key naming: - Env var: REVIEW_AGENT_KIND -> AGENT_KIND - Action input: review-agent-kind -> agent-kind - Python var / config key: review_agent_kind -> agent_kind Co-authored-by: openhands <openhands@all-hands.dev>
|
Re-validated the latest PR head after the A private self-hosted-runner workflow completed successfully with the updated action input and the published SDK package. Redacted log excerpt: The resulting review followed the repository-specific language instruction. |
Summary
llm-api-keyand uses the SDK/LiteLLM path.acp-commandand expects the caller to preinstall and authenticate that ACP server in the runner environment.load_project_skills().Validation
python3 scripts/sync_extensions.py --checkpython3 -m py_compile plugins/pr-review/scripts/agent_script.pyplugins/pr-review/action.ymlandplugins/pr-review/workflows/pr-review-by-openhands.ymlwith PyYAMLuv run --with pytest --with openhands-sdk --with openhands-tools --with lmnr pytest -q tests/test_pr_review_prompt.py tests/test_pr_review_review_context.py(13 passed)Notes
This PR intentionally does not install Codex, Claude, or any other ACP CLI. ACP setup belongs to the caller workflow or runner image; the action only starts the configured
acp-commandand connects it to the SDK review flow.