fix: ignore catalog.updated and integration.updated in parity tests#60
Conversation
opencode 1.17.7 emits new catalog.updated and integration.updated events in serve mode during provider/model catalog initialization. These are internal cache-invalidation signals with empty payloads, analogous to plugin.added and connector.updated already in the ignore set. Add them to _PARITY_IGNORED_TYPES to restore parity.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesParity Event Filter Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 SummaryAdds two new opencode 1.17.7 lifecycle event types (
Confidence Score: 5/5Safe to merge — the change is a two-line addition to a test-only constant set with no production code path affected. The two new entries follow exactly the same pattern as the four volatile startup events already in the ignore list, applied to the same class of serve-only lifecycle signals that never appear in No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[SSE stream from opencode serve] -->|events| B{normalize_event}
C[opencode run --format json] -->|events| B
B -->|type in _PARITY_IGNORED_TYPES| D[Discard event]
B -->|session.error| E[Normalize to error type]
B -->|session.status| F[Flatten status fields]
B -->|other| G[Strip volatile fields]
subgraph _PARITY_IGNORED_TYPES
H[server.connected / heartbeat / session.idle / file.edited ...]
I[plugin.added / plugin.updated / connector.updated / reference.updated]
J[catalog.updated / integration.updated]
end
E --> K[compare_events]
F --> K
G --> K
K -->|match| L[Parity OK]
K -->|diff| M[Parity FAILED]
Reviews (1): Last reviewed commit: "fix: ignore catalog.updated and integrat..." | Re-trigger Greptile |
Coverage Report
Generated by pytest-cov on |
Problem
After upgrading to opencode 1.17.7, all 7 mock LLM parity tests fail because the serve path now emits
catalog.updatedandintegration.updatedevents that weren't present before.Root cause
opencode 1.17.7 introduced these two new event types in the SSE stream:
catalog.updated— fires ~40 times at startup as each provider plugin registers models in the catalog. Empty payload, pure cache-invalidation signal.integration.updated— fires ~3 times at startup as env-based integrations are initialized. Also empty payload.These events appear only on the serve side of the parity diff because
opencode run --format jsondoesn't emit internal lifecycle events to stdout, while the SSE stream fromopencode servebroadcasts them.Fix
Add both event types to
_PARITY_IGNORED_TYPESintools/mock-llm-parity.py, consistent with how other volatile startup events (plugin.added,plugin.updated,connector.updated,reference.updated) are already handled.Verification
All pytest tests pass after this change. The remaining
check-phase-artifactsfailure is a pre-existing issue unrelated to this fix.Summary by CodeRabbit