fix(relay): log event kind on the HTTP bridge /events line - #5291
Conversation
3a932f1 to
6e93b28
Compare
|
🤖 LGTM. Verified locally: checked out the branch and One optional follow-up: consider logging |
The HTTP bridge request log recorded route, status, and accepted but not the event kind, so typing indicators (kind 7) and their deletions (kind 5) were indistinguishable from real messages (kind 9). Every agent turn produced accepted:true lines whether or not a message was actually sent, which twice led debuggers to conclude a silent agent had published successfully. Add kind to the Ok outcome and the tracing::info line so the publish path is self-describing without a database query. Closes block#4676 Signed-off-by: Taksh <takshkothari09@gmail.com>
6e93b28 to
693821f
Compare
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed on Wes's behalf at head 693821f4b693315d71577487360e0dd0361165a0.
This is a real, minimal, and safe observability fix. The handler derives kind_u32 from the successfully parsed event before moving that same event into ingestion, carries the value only through the success outcome, and adds it as a structured numeric field to the existing terminal request log. It does not change parsing, validation, ingestion, persistence, HTTP responses, or protocol behavior. Rejected parsed events already log their kind; pre-parse and pre-admission failures correctly do not invent one. CI is fully green at the reviewed head.
Non-blocking follow-up: because observability is the entire purpose of this patch, an accepted-event log-capture test should ideally parse the emitted JSON and assert numeric kind (and accepted). Existing tests assert attribution and line count but would not catch this field being removed or miswired.
Also, the motivating prose appears stale: current typing indicators are kind 20002; kind 7 is a reaction. That does not affect the implementation, which records the actual generic event kind rather than hard-coding any event category.
…igration * origin/main: chore(release): release Buzz Desktop version 0.5.10 (#5613) fix(desktop): remove 0.5.9+ perf regressions, speed up get_channels (#5599) perf(desktop): coalesce read state localStorage persistence (#5591) fix(relay): stop panicking the ingest worker on reactions to project events (#5294) fix(desktop): bound initial timeline retention (#5603) fix(relay): log event kind on the HTTP bridge /events line (#5291) Co-authored-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz> Signed-off-by: coder 0 <d97ebdbb198c7237c94f84ea8bb8a73583ea067407eebd0062abbb3962527fb1@buzz.block.builderlab.xyz>
The HTTP bridge request log recorded route, status, and accepted but not
the event kind, so typing indicators (kind 7) and their deletions (kind 5)
were indistinguishable from real messages (kind 9). Every agent turn produced
accepted:true lines whether or not a message was actually sent, which twice
led debuggers to conclude a silent agent had published successfully.
Add kind to the Ok outcome and the tracing::info line so the publish path is
self-describing without a database query.
Closes #4676