Skip to content

test(cron): cover cron_list/status/tick/create CLI helpers - #59510

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-5abd8d73
Jul 6, 2026
Merged

teknium1 merged 1 commit into
mainfrom
hermes/hermes-5abd8d73

Conversation

@teknium1

@teknium1 teknium1 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds direct unit coverage for the cron_list / cron_status / cron_tick / cron_create CLI helpers in hermes_cli/cron.py — none of these had tests on main. Test-only change. Closes #40627, supersedes stale #35814 (credit: @xuezhaolan).

Changes

  • tests/hermes_cli/test_cron.py: +5 tests
    • cron_list renders jobs and warns when the gateway is absent (builtin provider)
    • cron_status reports running gateway PIDs, active-job count, earliest next run
    • cron_tick invokes cron.scheduler.tick(verbose=True)
    • cron_create success path prints job id, skills, script, no-agent mode, workdir, next run
    • cron_create failure path prints the error and returns exit code 1
  • Existing create/edit fixtures updated with the script/workdir/no_agent args the current CLI passes

Validation

Before After
tests/hermes_cli/test_cron.py 11 passed 16 passed

Run: scripts/run_tests.sh tests/hermes_cli/test_cron.py -q

Infographic

cron-cli-tests

Salvaged from #40430; re-verified on main, tightened, tested.

Co-authored-by: xuezhaolan <xuezhaolan@users.noreply.github.com>
@alt-glitch alt-glitch added type/test Test coverage or test infrastructure comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 6, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #40627 — same author, same file (tests/hermes_cli/test_cron.py), and identical title/scope (cron_list/status/tick/create CLI helper coverage). #40627 is the earlier open PR; both supersede the stale #35814/#40430.

@teknium1
teknium1 merged commit 3ba5ba8 into main Jul 6, 2026
31 checks passed
@teknium1
teknium1 deleted the hermes/hermes-5abd8d73 branch July 6, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants