--- title: Code Review Agent emoji: 🔍 colorFrom: blue colorTo: indigo sdk: docker app_port: 7860 pinned: false --- # 🔍 Code Review Environment (OpenEnv) A real-world code review environment where an AI agent reviews Python code diff hunks, classifies issues by type and severity, and writes corrected code. ## Environment Details * **Tasks**: * `easy_classify`: Classify 5 hunks by issue type. Max 15 steps. * `medium_severity`: Classify and rate severity of 8 hunks. Max 25 steps. * `hard_write_fix`: Full review + corrected code generation for 12 hunks. Max 40 steps. ## Action Space | Field | Type | Valid Values | |-------|------|--------------| | `action_type` | str | "classify_issue", "suggest_fix", "write_fix", "skip" | | `hunk_id` | str | "h1", "h2", ... | | `issue_type` | str | "bug", "style", "security", "performance", "none" | | `severity` | str | "critical", "major", "minor", "info" | | `suggestion` | str | Free-text string | ## Observation Space | Field | Type | Description | |-------|------|-------------| | `hunks` | list[dict] | Remaining hunks (diff only) | | `current_hunk` | dict | Hunk currently being evaluated | | `task_id` | str | Active task name | | `progress` | float | 0.0 - 1.0 | ## Setup & Usage 1. `pip install -e .` 2. Run server: `uvicorn server.app:app --host 0.0.0.0 --port 7860` 3. Run inference: `python inference.py`