Skip to content

fix(relay): log event kind on the HTTP bridge /events line - #5291

Merged
wesbillman merged 1 commit into
block:mainfrom
Chessing234:fix/relay-bridge-log-event-kind-4676
Aug 11, 2026
Merged

fix(relay): log event kind on the HTTP bridge /events line#5291
wesbillman merged 1 commit into
block:mainfrom
Chessing234:fix/relay-bridge-log-event-kind-4676

Conversation

@Chessing234

@Chessing234 Chessing234 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

@Chessing234
Chessing234 requested a review from a team as a code owner August 8, 2026 06:07
@Chessing234
Chessing234 force-pushed the fix/relay-bridge-log-event-kind-4676 branch from 3a932f1 to 6e93b28 Compare August 8, 2026 13:48

@ravarora2 ravarora2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ravarora2

Copy link
Copy Markdown
Contributor

🤖 LGTM. Verified locally: checked out the branch and cargo check -p buzz-relay builds clean. The change is minimal and correct — kind_u32 is already computed before ingest (line 832) and reused, so there's no new failure path, and this just brings the accepted (Ok) path to parity with Rejected, which already logged kind the same way. The only other Ok site (into_response, { response, .. }) ignores the new field, so nothing else breaks.

One optional follow-up: consider logging kind on the SubmitOutcome::Err arm too. kind_u32 is in scope there as well, so auth/internal-error lines could be equally self-describing. With Ok and Rejected now carrying kind, Err is the last gap (ParseFail correctly can't, since the body never parsed). Not blocking — happy to see this merge as-is.

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>
@ravarora2
ravarora2 force-pushed the fix/relay-bridge-log-event-kind-4676 branch from 6e93b28 to 693821f Compare August 11, 2026 15:54

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@wesbillman
wesbillman merged commit e8153f8 into block:main Aug 11, 2026
33 checks passed
bradseiler pushed a commit that referenced this pull request Aug 12, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relay logs omit event.kind, making publish failures indistinguishable from success

3 participants