hermes-agent/tests/cron
beenherebefore e0c0167428 fix(cron): use last_run_at as croniter base for cron jobs
compute_next_run() ignored the last_run_at parameter for cron-type
schedules, always computing from _hermes_now() instead. This was
inconsistent with interval jobs which DO use last_run_at as the anchor.

After a crash or restart, cron jobs would compute next_run_at from
the arbitrary restart time rather than the actual last execution time.
While the stale detection in get_due_jobs() catches most cases, using
last_run_at as the croniter base eliminates edge cases and makes the
behavior consistent across schedule types.

Salvaged from #9014 (authored by @beenherebefore) onto current main.
The original PR branch was 2+ weeks stale and would have reverted
substantial unrelated work (jobs_file_lock, workdir/context_from/
enabled_toolsets, issue #16265 state=error recovery). Kept just the
7-line substantive fix and the regression test.
2026-04-29 08:24:48 -07:00
..
__init__.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_codex_execution_paths.py refactor: remove smart_model_routing feature (#12732) 2026-04-19 18:12:55 -07:00
test_compute_next_run_last_run_at.py fix(cron): use last_run_at as croniter base for cron jobs 2026-04-29 08:24:48 -07:00
test_cron_context_from.py fix(cron): wire context_from through the update action 2026-04-25 04:49:28 -07:00
test_cron_inactivity_timeout.py fix(cron): fall back gracefully when HERMES_CRON_TIMEOUT is invalid 2026-04-29 08:21:04 -07:00
test_cron_script.py fix(cron): harden scheduler against path traversal and env leaks 2026-04-06 12:42:16 -07:00
test_cron_workdir.py fix(cron): keep SOUL.md identity when workdir is unset 2026-04-29 08:10:25 -07:00
test_file_permissions.py refactor(tests): re-architect tests + fix CI failures (#5946) 2026-04-07 17:19:07 -07:00
test_jobs.py fix(cron): don't silently disable recurring cron jobs when croniter is missing (#16368) 2026-04-26 21:47:32 -07:00
test_scheduler.py fix(cron): accept list-form deliver values so deliver=['telegram'] works (#17456) 2026-04-29 06:35:34 -07:00