fix: silence bootstrap lifecycle events (plugin.added, connector.updated, reference.updated)#58
Conversation
…ted, reference.updated) New opencode versions emit plugin.added, connector.updated and reference.updated SSE events during server bootstrap. These are informational lifecycle signals with no user-facing value and were hitting the UnknownEventRenderer fallback, producing dozens of 'unknown event type' lines per run. Drop them silently in StateTracker.ingest() alongside the existing session.updated filter. Events are still recorded in the JSONL transcript for debugging.
|
Warning Review limit reached
More reviews will be available in 38 minutes and 25 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummarySilences three bootstrap-phase SSE events (
Confidence Score: 5/5Safe to merge — the change is a narrow, well-tested addition to an existing silent-drop guard with no effect on other event paths. The diff touches only two places: a single conditional in ingest() and a matching parametrized test. The three new event types are dropped the same way session.updated has always been dropped, and the test suite (844 passing) validates this directly. No existing behaviour is altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SSE Event received] --> B{event_type?}
B -- session.error --> C[Return mapped error event]
B -- session.diff --> D[Return mapped diff event]
B -- session.updated\nplugin.added\nconnector.updated\nreference.updated --> E[Silent drop — return empty list]
B -- session.status / session.idle\npermission.asked / server.connected\nserver.heartbeat --> F[Pass-through — return event as-is]
B -- anything else --> G[Unknown pass-through — return event as-is]
Reviews (2): Last reviewed commit: "Update tools/events/state_tracker.py" | Re-trigger Greptile |
Coverage Report
Generated by pytest-cov on |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Pablo Ruiz García <pruiz@users.noreply.github.com>
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Problem
New opencode versions emit
plugin.added,connector.updated, andreference.updatedSSE events during server bootstrap. These hit theUnknownEventRendererfallback, producing dozens ofunknown event typelines per run.Solution
Drop them silently in
StateTracker.ingest()alongside the existingsession.updatedfilter. Events are still recorded in the JSONL transcript for debugging.Changes
tools/events/state_tracker.py— Added the three event types to the silent-drop block.tests/test_new_serve_stack.py— Parametrized test verifying all three return[]fromingest().Testing
make tests— 844 passed.