Update environment.py
Browse files31 unmodified lines3233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798031 unmodified lines# ======================================================================@dataclassclass EnhancedObservation:"""Complete Markov state - agent has ALL information needed for optimal decisions.Reward function depends ONLY on (state, action), not hidden variables."""# Code statecode_snippet: strlast_tool_output: strauthor_response: str = "" # ← ADDED# Current metricscurrent_test_score: floatcurrent_lint_score: floatnegotiation_score: float# CRITICAL: Previous metrics (for understanding deltas)previous_test_score: floatprevious_lint_score: float# CRITICAL: Author internal state (affects reward gating)author_confidence: floatauthor_threshold: float # When author accepts# Progress trackingstep: intmax_steps: intprogress_ratio: float# Tool usage flagstests_run: boollinter_run: booldocs_queried: bool# Action history (with outcomes)last_action_type: straction_history: List[str] # Last 5 actions# Terminal flagdone: bool# Additional contextbug_description: strcomments_count: int# ======================================================================# HELPER FUNCTIONS31 unmodified lines323334353637383940414243444546474849505152535455565758596061626364656667686931 unmodified lines# ======================================================================@dataclassclass EnhancedObservation:code_snippet: strlast_tool_output: strcurrent_test_score: floatcurrent_lint_score: floatnegotiation_score: floatprevious_test_score: floatprevious_lint_score: floatauthor_confidence: floatauthor_threshold: floatstep: intmax_steps: intprogress_ratio: floattests_run: boollinter_run: booldocs_queried: boollast_action_type: straction_history: List[str]done: boolbug_description: strcomments_count: int# default fields must be at the very endauthor_response: str = ""# ======================================================================# HELPER FUNCTIONS
environment.py+5-16