Skip to content

controller: keep stall_armed armed across trial revert - #132

Merged
davanstrien merged 2 commits into
mainfrom
fix/stall-armed-on-revert
Nov 30, 2026
Merged

davanstrien merged 2 commits into
mainfrom
fix/stall-armed-on-revert

Conversation

@davanstrien

@davanstrien davanstrien commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Closes controller: settle() disarms stall_armed on trial revert #123.
  • Add disarm_stall: bool = True to Auto.settle() and pass disarm_stall=False from judge_trial() on revert (while Auto.cut() keeps disarm_stall=True so cuts remain once per episode).
  • If an engine hangs immediately after a reverted trial (before another completion arrives to re-arm stall_armed), cut:stall now still fires once after Settling drains and patience_s(obs) elapses instead of waiting out read_timeout.

Testing

  • Added two unit tests in tests/test_controller.py (both fail on main, pass on this branch):
    • test_hang_immediately_after_trial_revert_still_cuts_for_stall (reproduces the trial:up -> revert -> immediate hang sequence, verifies cut:stall fires once and then disarms).
    • test_trial_revert_respects_settling_plus_latency_patience_boundary (steps right to revert, verifies 5 Settling ticks + 14 silent ticks + completion holds at 40, and verifies the 20th quiet tick without a completion fires cut:stall).
  • Regression check: bench/controller_sim.py (all 45 existing scenarios) is byte-identical against origin/main (note: the simulator has no post-revert hang scenario, so this checks for regressions rather than exercising the fix itself).
  • Full fast suite (766 passed, 30 skipped), slow controller suite (153 passed), ruff check, ruff format --check, and ty check saturate tests all green.

@davanstrien
davanstrien merged commit e82619a into main Nov 30, 2026
18 checks passed
@davanstrien
davanstrien deleted the fix/stall-armed-on-revert branch November 30, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

controller: settle() disarms stall_armed on trial revert

1 participant