A turn is real only if the agent ran without a fatal startup error.
(result)
| 474 | |
| 475 | |
| 476 | def turn_is_valid(result): |
| 477 | """A turn is real only if the agent ran without a fatal startup error.""" |
| 478 | if result.returncode != 0: |
| 479 | return False |
| 480 | return not any(pattern.search(result.stdout) for pattern in FATAL_TURN_PATTERNS) |
| 481 | |
| 482 | |
| 483 | def extract_token_hints(output): |
no test coverage detected