Files
hermes-agent/tests
JulianCruzet 05e13a1fcc fix(cron): address Xipong's review nits on #110563
Two inline test-hardening suggestions + two follow-up coverage cases
(Xipong called them non-blocking but they're cheap and prove the
boundaries).

- tests/gateway/test_api_server_jobs.py::TestCronFireEstop::
  - test_fire_webhook_returns_503_when_estop_engaged: also patch
    `cron.scheduler_provider.resolve_cron_scheduler` and assert that
    `claim_fire`, `fire_claimed`, and `fire_due` are never reached.
    A 503 by itself does not prove admission never happened.
  - test_fire_webhook_401_when_verifier_crashes (new): crashing
    verifier → 401, ESTOP is never consulted. Proves auth runs before
    the ESTOP check so the sentinel state cannot leak to unauth callers.

- tests/cron/test_misfire_catchup.py::TestFireOverdueJobs::
  - test_estop_engaged_skips_backstop: spy on `provider.claim_fire`
    and `cron.scheduler_provider.threading.Thread`. Deterministic
    proof that no claim was attempted and no worker thread was
    constructed (the prior `wait_fired(timeout=0.5)` was timing-based).
  - test_estop_release_restores_backstop: spy on `provider.claim_fire`
    on the recovery path with an explicit `assert_called_once` so a
    regression that fires without claiming still fails the test.

All 58 tests across the affected files pass.
2026-09-15 03:33:13 -07:00
..
…