File size: 902 Bytes
13507d6 7d08a88 13507d6 7d08a88 13507d6 7d08a88 13507d6 7d08a88 13507d6 7d08a88 13507d6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | from pydantic import BaseModel
from typing import Optional, List
from enum import Enum
class ReviewDecision(str, Enum):
APPROVE = "approve"
REQUEST_CHANGES = "request_changes"
ESCALATE = "escalate"
class PRAction(BaseModel):
decision: ReviewDecision
comment: str # Full reviewer comment — must identify root cause, not just symptom
issue_category: str # One of: "logic", "security", "correctness", "performance", "none"
class PRObservation(BaseModel):
turn: int
diff: str
pr_title: str
pr_description: str
review_history: List[dict] # {"role": "reviewer"|"author", "content": str}
author_response: Optional[str]
done: bool
message: str
class PRState(BaseModel):
episode_id: str
task_name: str
turn: int
max_turns: int
review_history: List[dict]
done: bool
success: bool
cumulative_reward: float
|