fix(supervisor): treat a live heartbeat as liveness and keep watchdog stops resumable - #1462
fix(supervisor): treat a live heartbeat as liveness and keep watchdog stops resumable#1462lishuoshuo-amd wants to merge 5 commits into
Conversation
Drive liveness from the coordinator event loop so long actions stay healthy while actual stalls remain detectable, and prevent watchdog-triggered restarts from becoming terminal sessions. Co-authored-by: Cursor <cursoragent@cursor.com>
bbf6ffa to
52daeab
Compare
| pulse_task.cancel() | ||
| try: | ||
| await pulse_task | ||
| except asyncio.CancelledError: |
| finally: | ||
| task.cancel() | ||
| with pytest.raises(asyncio.CancelledError): | ||
| await task |
| pulse_task.cancel() | ||
| try: | ||
| await pulse_task | ||
| except asyncio.CancelledError: |
| finally: | ||
| task.cancel() | ||
| with pytest.raises(asyncio.CancelledError): | ||
| await task |
…e time A resumable stop must leave no terminal reason, but without an end timestamp the next leg drops the interrupted phase segment. CLI terminal-report writes are now one helper with exact-equality tests, and the host-safety docs match heartbeat liveness. Co-authored-by: Cursor <cursoragent@cursor.com>
SGLang reuse now checks out the pinned ref after a fallback fetch, the help probe runs on a live baremetal framework, and AgentX variant grants no longer silently underprice when the grid runner is not importable. Co-authored-by: Cursor <cursoragent@cursor.com>
|
|
||
| def agentx_variant_timeout_sec(cap: int, *, shared_state: Any = None, conc: int | None = None) -> int: | ||
| """Raise a variant's hard cap to what an AgentX round actually needs.""" | ||
| from ._workload_envs import agentx_active, agentx_env_for_conc |
|
|
||
| if not agentx_active(shared_state): | ||
| return cap | ||
| from .baseline import agentx_baseline_timeout_sec |
| StoppedByTheRun, | ||
| ) | ||
| from ._accuracy_gate import materialized_run_eval_disabled | ||
| from ._agentx_variant_timeout import agentx_variant_timeout_sec |
Co-authored-by: Cursor <cursoragent@cursor.com>
Recipe KB and framework tag sorting import packaging.version directly instead of relying on pip's transitive copy. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Finding 3 is real and worth fixing. Finding 2 is fixed in the wrong direction, and 1. One bit, one signal. "Was this SIGTERM the supervisor's?" is one bit, and 2. Derive the terminal markers from the monitor, don't enumerate them by hand. 3. Don't borrow 4. Say where the brake is. With 5. Finding 2: fix the root cause, not the detector. 6. Collapse what's left. One 7. Split the PR. The description says "Findings 2 and 3 only"; the diff carries
Finally: no CHANGELOG entry, and |
Summary
Tests
python3 -m pytest -n 8 -q src/hyperloom/orchestrator/supervisor/tests/test_supervisor.py src/hyperloom/inference_optimizer/tests/test_session_lock.py src/hyperloom/inference_optimizer/tests/test_coordinator_runtime.py src/hyperloom/inference_optimizer/tests/test_run_optimize_exit_code_lock.py— 132 passedpython3 -m ruff checkon all changed files — passedhypothesisdependency prevented a clean full-suite result.Scope