From ae4f2640ad8a27c912ee4111261c2f0f0ab8813d Mon Sep 17 00:00:00 2001 From: op-thread-uuid Date: Sun, 4 Oct 2026 17:44:33 +0000 Subject: [PATCH] dm: emit thread_uuid on the SENT and VERIFIED line dm_send already knows the thread UUID at send time (alias resolution, nav URL capture, autoprovision capture) but dropped it: the only stdout channel the board parses carried no thread info, so every auto-logged DM row had thread_uuid null. Now prints '... SENT and VERIFIED thread=' when known, unchanged line otherwise (main-chat sends, UUID-capture failures stay honestly null -- never fabricated). Backward compatible: board _BOX_DM_SENT_RE has no end anchor; bl consumers (job-dispatch.py, siphon-bl.py) use substring matching. Worktree note: unrelated uncommitted changes remain (job_id followup-correlation hunks in this file, followup-sweeper.py, response-harvester.py, untracked helpers) -- not mine, not staged. Session: sidechat/box-dms-ui --- bin/dm.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/dm.py b/bin/dm.py index f8a91ab..a8e2b0c 100755 --- a/bin/dm.py +++ b/bin/dm.py @@ -466,7 +466,13 @@ def dm_send(agent, target, message, verify=True, raw=False, if nudge_meta: _sent["nudge_meta"] = nudge_meta log_event(_sent) - print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED") + # Thread UUID on the verification line: the board server's + # _box_dm_send_run parses it into the auto-logged DM row. + # Stays None for main-chat sends and UUID-capture failures. + if thread_uuid: + print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED thread={thread_uuid}") + else: + print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED") # Follow-up record creation: if tags request tracking, POST to the # VM's /api/box/followups endpoint. Fail gracefully -- the DM already # sent, so a record-creation failure is logged, not fatal.