mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-25 11:02:03 +00:00
`cron/jobs.py` resolved `HERMES_DIR`/`JOBS_FILE` from `get_hermes_home()`, which follows the active profile override. So a job created from a profile-scoped agent session (`hermes -p myprofile chat`, where the in-process `cronjob` tool calls `create_job`) was written to `~/.hermes/profiles/myprofile/cron/jobs.json`, while the profile-less gateway (`hermes gateway run`) reads only `~/.hermes/cron/jobs.json`. The job was silently orphaned: `cronjob action=list` from the same profile reported it healthy (same file), but the gateway ticker never saw it and it never fired. `last_run_at` stayed null forever. (#32091) Fix: resolve the cron store from `get_default_hermes_root()` — the purpose-built "profile-level operations" root that returns `<root>` even when `HERMES_HOME` is `<root>/profiles/<name>` (and handles Docker/custom layouts). Now the creator, the gateway scheduler, and the dashboard all agree on a single jobs.json at the root, so a job created under any profile is visible to the gateway. Scope: this is the storage-location half of the fix. Making a job *execute* under its originating profile's config/skills (a per-job `profile` field + runtime context scoping, the #48649 sibling) is a separate, riskier change and will follow as its own PR — keeping this layer minimal and safe. Salvaged from #32117 by @mohamedorigami-jpg (authorship preserved). The comprehensive #33839 (@sweetcornna) takes the same Option-A storage approach and additionally adds the per-job profile execution scoping; this PR lands the safe storage layer first. Tests: `tests/cron/test_cron_profile_storage.py` — asserts the store anchors at `<root>/cron` under a profile HERMES_HOME (not `<profile>/cron`), and is unchanged when no profile is active. Full `tests/cron/` suite: 511 passed. Fixes #32091 Co-authored-by: mohamedorigami-jpg <mohamed.origami@gmail.com> |
||
|---|---|---|
| .. | ||
| __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_storage.py | ||
| test_cron_prompt_injection_skill.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_suggestions.py | ||