mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-16 14:32:34 +00:00
get_due_jobs()'s one-shot stale-entry recovery (#38758) treated an expired run_claim (#59229) as proof the claiming tick died, but a run stalled on network I/O — or a laptop asleep mid-run — legitimately outlives the TTL while very much alive. The recovery then deleted the job record mid-flight: list showed the job gone, and when the run finished mark_job_run() found nothing to update, so last_run_at / last_status / last_delivery_error were never recorded. Two guards, per the liveness signals available: - Same process (the common single-gateway case): before removing a dispatch-limit-reached one-shot, consult the scheduler's running set via a lazy import; if the job is still running here it is slow, not stale — keep the entry. - Cross process: run_job's monitor loop now refreshes run_claim.at every 60s while the run is alive (including under HERMES_CRON_TIMEOUT=0, which previously blocked without polling), so an expired claim really does mean the owner died and the TTL stays a dead-owner detector. Fixes #62002 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_blueprint_catalog.py | ||
| test_claim_job_for_fire.py | ||
| test_codex_execution_paths.py | ||
| test_compute_next_run_last_run_at.py | ||
| test_cron_context_from.py | ||
| test_cron_inactivity_timeout.py | ||
| test_cron_no_agent.py | ||
| test_cron_profile_isolation.py | ||
| test_cron_prompt_injection_skill.py | ||
| test_cron_provider_pin.py | ||
| test_cron_script.py | ||
| test_cron_workdir.py | ||
| test_cronjob_schema.py | ||
| test_file_permissions.py | ||
| test_jobs.py | ||
| test_jobs_changed_notify.py | ||
| test_jobs_crossprocess_lock.py | ||
| test_parallel_pool.py | ||
| test_rewrite_skill_refs.py | ||
| test_run_one_job.py | ||
| test_scheduler.py | ||
| test_scheduler_mcp_init.py | ||
| test_scheduler_provider.py | ||
| test_scheduler_shutdown_guard.py | ||
| test_shutdown_interrupt.py | ||
| test_suggestions.py | ||
| test_terminal_cwd_lock.py | ||
| test_ticker_stall_60703.py | ||