hermes-agent/cron
Ioodu 1c7f47a58c fix(cron): add concurrency regression test for parallel job state writes
get_due_jobs() called load_jobs() and save_jobs() without holding
_jobs_file_lock, creating a race with the locked mark_job_run() and
advance_next_run(). Wrap get_due_jobs() with the lock (delegating to a
new _get_due_jobs_locked() inner function) so all load→modify→save
cycles are serialised. Add two regression tests: one verifying 3
concurrent mark_job_run() calls each land their correct last_status and
last_run_at without overwrites, and a stress test confirming 10 parallel
calls each increment their job's completed count to exactly 1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 12:36:29 -07:00
..
__init__.py docs: clarify gateway service scopes (#1378) 2026-03-14 21:17:41 -07:00
jobs.py fix(cron): add concurrency regression test for parallel job state writes 2026-05-04 12:36:29 -07:00
scheduler.py fix(cron): expand \${VAR} refs in config.yaml during job execution (#15890) 2026-05-04 12:35:46 -07:00