100XZX001 commited on
Commit
031d78c
·
verified ·
1 Parent(s): 380d64d

Update environment.py

Browse files
Files changed (1) hide show
  1. environment.py +7 -7
environment.py CHANGED
@@ -242,14 +242,14 @@ class CodeReviewEnv:
242
 
243
  # ===================================================================
244
  def _get_observation(self) -> EnhancedObservation:
245
- """Return COMPLETE Markov state."""
246
- # Compute author response: only after comment/question/fix does the author actually speak
247
- if self._last_action_type in ("write_comment", "ask_question", "propose_fix"):
248
- author_response = self._test_results or ""
249
- else:
250
  author_response = ""
251
 
252
- return EnhancedObservation(
253
  code_snippet=self._current_code,
254
  last_tool_output=self._test_results or "",
255
  author_response=author_response, # ← fixed
@@ -279,7 +279,7 @@ class CodeReviewEnv:
279
 
280
  bug_description=self._bug_description,
281
  comments_count=len(self._comments),
282
- )
283
  # ===================================================================
284
  def _compute_dense_reward(
285
  self,
 
242
 
243
  # ===================================================================
244
  def _get_observation(self) -> EnhancedObservation:
245
+ """Return COMPLETE Markov state."""
246
+ # Compute author response: only after comment/question/fix does the author actually speak
247
+ if self._last_action_type in ("write_comment", "ask_question", "propose_fix"):
248
+ author_response = self._test_results or ""
249
+ else:
250
  author_response = ""
251
 
252
+ return EnhancedObservation(
253
  code_snippet=self._current_code,
254
  last_tool_output=self._test_results or "",
255
  author_response=author_response, # ← fixed
 
279
 
280
  bug_description=self._bug_description,
281
  comments_count=len(self._comments),
282
+ )
283
  # ===================================================================
284
  def _compute_dense_reward(
285
  self,