Skip to content

chore(desktop): diagnose silently dropped observer frames - #18

Merged
cursor[bot] merged 2 commits into
mainfrom
devin/1785571898-observer-drop-logging
Aug 1, 2026
Merged

chore(desktop): diagnose silently dropped observer frames#18
cursor[bot] merged 2 commits into
mainfrom
devin/1785571898-observer-drop-logging

Conversation

@devin-ai-integration

Copy link
Copy Markdown

Summary

When the agent activity indicator misbehaves, observerRelayStore gives you nothing to go on: five separate branches discard a frame and return without a trace. Chasing #13 meant reasoning about which of them could have fired rather than reading it off a log.

Each drop now emits a stable reason with enough context to trace the frame, and no behaviour changes — same branches, same returns:

missing_telemetry_tag | unknown_agent | sender_agent_mismatch
stale_generation      | decrypt_failed
→ console.debug({ reason, count, eventId, agentTag, senderPubkey,
                  currentGeneration, eventGeneration })

Decrypted payloads are never logged. A chatty agent could otherwise flood the console, so logging is throttled per reason: first occurrence, then at most every 10s or every 100th drop, with the running count carried in the record so nothing is lost.

Two branches are deliberately quiet where noise would be normal rather than diagnostic: unknown_agent during startup, while frames are still being buffered before the managed-agent list is ready; and valid frame: "control" events, which are owner→agent by design (buzz-core/src/observer.rs defines exactly telemetry and control, and buzz-sdk rejects anything else) — missing_telemetry_tag now only fires for a genuinely missing agent or frame tag.

Related issue

None found. Diagnostics for the ingest path investigated in #13.

Testing

ingestArchivedObserverEvents.test.mjs asserts the aggregated counters for each reason via the existing _test* accessor convention, plus that a valid non-telemetry frame produces no diagnostic.

just desktop-check, just desktop-test (3886 pass, 1 skipped), pnpm build — clean. No UI surface.

Link to Devin session: https://app.devin.ai/sessions/0826f5720c94404fa8e327398aac6176
Requested by: @oscarlehuu

devin-ai-integration Bot and others added 2 commits August 1, 2026 08:15
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Oscar Le <oscar.lehuu@gmail.com>
@oscarlehuu oscarlehuu self-assigned this Aug 1, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@cursor
cursor Bot merged commit 99ac40c into main Aug 1, 2026
5 checks passed
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.

1 participant