hermes-agent/tests/cron
Ben Barclay 76d832d385
fix(cron): deliver to relay-fronted platforms via canonical home_channel (#84300)
Cron jobs targeting a relay-fronted logical platform (e.g. Discord behind
the relay connector) failed twice over:

1. Target resolution read only the legacy <PLATFORM>_HOME_CHANNEL env
   mirror. The canonical home_channel block that /sethome persists to
   config.yaml — the only store that exists in a relay-fronted deployment,
   where no native env var is exported — was never consulted, so
   deliver='discord' silently resolved to nothing and the job fell back
   to local-only.

2. Even with a resolved target, the delivery loop's native
   configured/enabled gate rejected the platform ('not configured/enabled')
   although resolve_delivery_transport had already produced a live relay
   transport fronting it. A relay-fronted platform is deliberately NOT
   natively enabled (its credential lives in the connector), so the native
   gate must not apply to a relay transport.

Resolution now falls back from the env mirror to
config.get_home_channel(platform) for both chat_id and thread_id (thread
affinity only when the chat id came from the same config block), which
also makes the 'all' routing token pick up relay-fronted platforms. The
delivery gate honours a resolved relay transport, mirroring the
enablement rule resolve_delivery_transport already applied; the standalone
(no-relay) path keeps the historical gate byte-identical.
2026-08-12 14:48:54 +10:00
..
__init__.py
conftest.py refactor(cron): polish registration partial-failure surfaces 2026-08-07 17:45:06 +05:30
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_direct_api_call_62151.py
test_cron_direct_api_call_watchdog.py fix(cron): move watchdog state under the request lock; fail closed on resolver errors 2026-08-07 15:32:37 +05:30
test_cron_inactivity_timeout.py
test_cron_kanban_env_isolation.py fix(cron): thread per-run prompt through cronjob(action='run') (#57331) 2026-08-06 23:14:55 -07:00
test_cron_no_agent.py fix(cron): load .env on no_agent path so standalone ticks resolve delivery home channels 2026-08-10 10:58:05 +05:30
test_cron_profile_isolation.py
test_cron_prompt_injection_skill.py
test_cron_provider_pin.py
test_cron_script.py test: run os-specific tests on their real host, not a faked one 2026-08-09 22:09:49 -04:00
test_cron_workdir.py fix(cron): thread per-run prompt through cronjob(action='run') (#57331) 2026-08-06 23:14:55 -07:00
test_cronjob_schema.py
test_execution_ledger.py fix(cron): thread per-run prompt through cronjob(action='run') (#57331) 2026-08-06 23:14:55 -07:00
test_file_permissions.py
test_idle_tick_config_skip.py
test_jobs.py test(cron): regression coverage for Windows encoding cluster 2026-08-08 12:29:35 -07:00
test_jobs_changed_notify.py refactor(cron): polish registration partial-failure surfaces 2026-08-07 17:45:06 +05:30
test_jobs_crossprocess_lock.py
test_jobs_file_ownership.py
test_jobs_shrink_merge_80624.py perf(cron): stat-stamp fast path for the shrink-merge; no caller-list mutation 2026-08-07 17:29:49 +05:30
test_monitor_kind.py fix: post-merge audit follow-ups for #81138/#81139/#81141/#81148 2026-08-08 05:21:09 -07:00
test_notepad.py fix: post-merge audit follow-ups for #81138/#81139/#81141/#81148 2026-08-08 05:21:09 -07:00
test_parallel_pool.py fix(cron): thread per-run prompt through cronjob(action='run') (#57331) 2026-08-06 23:14:55 -07:00
test_preflight_config.py feat(cron): pre-dispatch configuration validation (blocked_config + alert-once) 2026-08-07 08:57:53 -07:00
test_reasoning_config_per_model.py
test_relay_fronted_delivery.py fix(cron): deliver to relay-fronted platforms via canonical home_channel (#84300) 2026-08-12 14:48:54 +10:00
test_rewrite_skill_refs.py
test_run_one_job.py feat(cron): pre-dispatch configuration validation (blocked_config + alert-once) 2026-08-07 08:57:53 -07:00
test_scheduler.py fix(cron): thread per-run prompt through cronjob(action='run') (#57331) 2026-08-06 23:14:55 -07:00
test_scheduler_cron_session_isolation.py
test_scheduler_mcp_init.py
test_scheduler_provider.py
test_scheduler_shutdown_guard.py
test_script_claim_heartbeat.py
test_sessiondb_init_hang.py
test_shutdown_interrupt.py
test_suggestions.py fix(cron): surface initial scheduler registration failures 2026-08-07 17:45:06 +05:30
test_terminal_cwd_lock.py test(cron): pin fail-closed TERMINAL_CWD lock timeout behavior 2026-08-07 18:11:41 +05:30
test_ticker_stall_60703.py
test_usage_audit_logger.py fix: follow-up for salvaged PR #18255 2026-08-08 00:07:14 +05:30