From d46b3533d4482b7aa94f6c010e4c05e942d4e2e8 Mon Sep 17 00:00:00 2001 From: Victor Kyriazakos Date: Wed, 19 Aug 2026 18:20:32 +0000 Subject: [PATCH] chore(cron): loud diagnostics on the in_channel seed path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seed failure was logger.debug — invisible in production while being the exact 'agent has no idea about its own brief' symptom. WARNING on: seed exception (with reason), seed returning False, and in_channel delivery to a non-origin target. --- cron/scheduler.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/cron/scheduler.py b/cron/scheduler.py index bb19ed46da..2e2ca9e885 100644 --- a/cron/scheduler.py +++ b/cron/scheduler.py @@ -1898,7 +1898,10 @@ def _seed_cron_channel_session( ) return bool(ok) except Exception as e: - logger.debug( + # WARNING, not debug: a silent seed failure IS the "agent has no idea + # about its own brief" bug (Alice 2026-08-19) — it must be visible in + # production logs. + logger.warning( "Job '%s': seeding in_channel session failed for %s:%s: %s", job.get("id", "?"), platform_name, chat_id, e, ) @@ -3118,6 +3121,21 @@ def _deliver_result(job: dict, content: str, adapters=None, loop=None) -> Option user_id=origin_user_id, chat_name=origin.get("chat_name"), ) + if not inchannel_seeded: + logger.warning( + "Job '%s': in_channel seed did NOT land on %s:%s " + "— a plain reply will not see this brief", + job["id"], platform_name, chat_id, + ) + elif in_channel_surface and not origin_target: + logger.warning( + "Job '%s': in_channel delivery to %s:%s is not the " + "origin conversation (origin=%s:%s thread=%s) — seed " + "skipped, brief not continuable here", + job["id"], platform_name, chat_id, + origin.get("platform"), origin.get("chat_id"), + origin.get("thread_id"), + ) _maybe_mirror_cron_delivery( job, platform_name, chat_id, mirror_text, thread_id=thread_id, user_id=origin_user_id,