mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
cron_continuable_surface=in_channel is meant to deliver a cron brief FLAT into a channel (thread_id=None) so a plain channel reply continues the job via the shared-channel session. The scheduler already seeds that flat session (_seed_cron_channel_session) but never cleared the ORIGINAL target/origin thread_id before routing the actual delivery, so a job scheduled from inside a Slack thread still delivered into that origin thread — the seeded continuable session then never matched where the brief actually landed. Clear thread_id once in_channel_surface is finalized, before it is re-read for route_thread_id / the standalone fallback. Scope the clear to EXACTLY the target that gets flat-seeded — the origin-continuable target (mirror_this_target) on a live, in_channel-capable adapter (runtime_adapter is not None): - fan-out / broadcast / explicit-thread targets keep their thread_id — they are not continuable and are never seeded, so flattening them would reroute an explicit thread and could collapse two targets into duplicate flat sends; - the standalone no-live-adapter path keeps the origin thread — it can never seed the flat session, and without an adapter the D6 capability fail-safe can't run, so flattening there would both drop the brief out of any continuable lane and bypass D6. This keeps the clear in lockstep with the seed condition (in_channel_surface and mirror_this_target) and the D6 fail-safe. mirror_this_target / origin_user_id are computed earlier using the original thread_id to match the origin conversation. Regression tests in TestCronContinuableSurfaceInChannel: - a job whose origin carries a thread_id must not forward that thread_id to the live adapter (DeliveryRouter folds target.thread_id into send metadata), and the seeded continuable session stays flat (thread_id=None); - with no live adapter, the standalone send falls back to the origin thread rather than flattening. |
||
|---|---|---|
| .. | ||
| __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_direct_api_call_62151.py | ||
| test_cron_inactivity_timeout.py | ||
| test_cron_no_agent.py | ||
| test_cron_profile_isolation.py | ||
| test_cron_prompt_injection_skill.py | ||
| test_cron_provider_pin.py | ||
| test_cron_script.py | ||
| test_cron_workdir.py | ||
| test_cronjob_schema.py | ||
| test_execution_ledger.py | ||
| test_file_permissions.py | ||
| test_jobs.py | ||
| test_jobs_changed_notify.py | ||
| test_jobs_crossprocess_lock.py | ||
| test_parallel_pool.py | ||
| test_reasoning_config_per_model.py | ||
| test_rewrite_skill_refs.py | ||
| test_run_one_job.py | ||
| test_scheduler.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 | ||
| test_terminal_cwd_lock.py | ||
| test_ticker_stall_60703.py | ||