From 130d281215fd6c45d0a1a6591d3b2d5d4d55df11 Mon Sep 17 00:00:00 2001 From: Subash <117739368+subashmokshya@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:26:32 +0545 Subject: [PATCH] fix(relay): log event kind on accepted /events bridge requests Typing indicators (kind 7) and their deletions (kind 5) travel the same /events route as real messages (kind 9), but the HTTP bridge's terminal attribution line logged only `accepted`, not `kind`. Every agent turn therefore produced `accepted:true` lines whether or not a message was actually sent, making a silent no-op indistinguishable from a real send without querying Postgres directly. Thread the already-computed `kind_u32` through `SubmitOutcome::Ok` and add it to the info! attribution line. The Rejected arm already logs `kind`; this closes the gap on the accepted arm. Fixes #4676 Signed-off-by: Subash <117739368+subashmokshya@users.noreply.github.com> --- crates/buzz-relay/src/api/bridge.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/buzz-relay/src/api/bridge.rs b/crates/buzz-relay/src/api/bridge.rs index a118ff453f..414f0dd8f4 100644 --- a/crates/buzz-relay/src/api/bridge.rs +++ b/crates/buzz-relay/src/api/bridge.rs @@ -654,12 +654,13 @@ pub async fn submit_event( submit_event_authed(&state, &tenant, &headers, &body, pubkey, event_id_bytes).await; match &outcome { - SubmitOutcome::Ok { accepted, .. } => { + SubmitOutcome::Ok { accepted, kind, .. } => { tracing::info!( pubkey = %pubkey_hex, route = "/events", status = 200u16, accepted, + kind, "HTTP bridge request" ); } @@ -713,6 +714,10 @@ enum SubmitOutcome { /// Ingest pipeline ran and returned a result (accepted or not). Ok { accepted: bool, + /// Event kind, so an accepted message (kind 9) is distinguishable in + /// the log from an accepted typing indicator (kind 7) or deletion + /// (kind 5) — all of which travel the same `/events` route. + kind: u32, response: Json, }, /// JSON parse failure before ingest — log category/line/column, not msg. @@ -843,6 +848,7 @@ async fn submit_event_authed( })); SubmitOutcome::Ok { accepted: result.accepted, + kind: kind_u32, response, } }