feat(autoreview): support cursor-agent engine#71
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The docs repo's hardened autoreview helper did not support Cursor's headless
cursor-agentengine, so the docs workflow could not use the same Cursor-based review path added to the main repo.Why This Change Was Made
This adds
cursor-agentas an explicit opt-in autoreview engine using the docs helper's hardened engine environment. The integration keeps the reviewed repo out of Cursor's trusted workspace, passes the prompt over stdin, rejects unsupported Cursor flags, preserves streaming display, maps hyphenated engine names to environment defaults such asAUTOREVIEW_CURSOR_AGENT_MODEL, and adds JSON extraction for Cursor responses that include explanatory text before the structured report.User Impact
Docs contributors can run autoreview with
--engine cursor-agentorAUTOREVIEW_ENGINE=cursor-agent. Existing engines and the default review behavior are unchanged.Evidence
python -m py_compile .agents/skills/autoreview/scripts/autoreview .agents/skills/autoreview/scripts/test-review-harness.pypython .agents/skills/autoreview/tests/test_autoreview_hardening.py.agents/skills/autoreview/scripts/autoreview --self-test-engine-isolation.agents/skills/autoreview/scripts/autoreview --self-test-config-defaults.agents/skills/autoreview/scripts/test-review-harness --fixture benign --engine cursor-agent.agents/skills/autoreview/scripts/test-review-harness --fixture malicious --engine cursor-agentAUTOREVIEW_ENGINE=cursor-agent .agents/skills/autoreview/scripts/autoreview --mode commit --commit HEADgit diff --check