Skip to content

fix: ignore catalog.updated and integration.updated in parity tests#60

Merged
pruiz merged 1 commit into
masterfrom
fix/parity-ignore-catalog-integration-events
Jun 15, 2026
Merged

fix: ignore catalog.updated and integration.updated in parity tests#60
pruiz merged 1 commit into
masterfrom
fix/parity-ignore-catalog-integration-events

Conversation

@pruiz

@pruiz pruiz commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Problem

After upgrading to opencode 1.17.7, all 7 mock LLM parity tests fail because the serve path now emits catalog.updated and integration.updated events 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 json doesn't emit internal lifecycle events to stdout, while the SSE stream from opencode serve broadcasts them.

Fix

Add both event types to _PARITY_IGNORED_TYPES in tools/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-artifacts failure is a pre-existing issue unrelated to this fix.

Summary by CodeRabbit

  • Chores
    • Updated internal testing tool to refine event type filtering, improving comparison accuracy for development and QA workflows.

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.
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15f4f13b-befe-450a-a437-99b5f91431f7

📥 Commits

Reviewing files that changed from the base of the PR and between 406089f and 8b228bb.

📒 Files selected for processing (1)
  • tools/mock-llm-parity.py

📝 Walkthrough

Walkthrough

tools/mock-llm-parity.py adds "catalog.updated" and "integration.updated" to the _PARITY_IGNORED_TYPES set, causing these two event types to be filtered out during event stream normalization and excluded from run-vs-serve parity diffs.

Changes

Parity Event Filter Update

Layer / File(s) Summary
Add catalog.updated and integration.updated to ignored set
tools/mock-llm-parity.py
Two entries added to _PARITY_IGNORED_TYPES so these volatile events are stripped during normalization and do not affect parity diff output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Two more noisy events, now quietly gone,
The parity diff stays calm, diffs carry on.
catalog.updated — shh, not today!
integration.updated — please stay away.
The rabbit hops past, the diff stays clean,
Smoothest parity check you've ever seen! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: ignoring two additional event types (catalog.updated and integration.updated) in parity tests, which directly matches the changeset's purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/parity-ignore-catalog-integration-events

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds two new opencode 1.17.7 lifecycle event types (catalog.updated, integration.updated) to the _PARITY_IGNORED_TYPES set in the mock-LLM parity test harness, restoring all 7 parity tests that were failing after the upgrade.

  • Both new event types are serve-only startup signals — catalog.updated fires ~40 times as provider plugins register models, integration.updated fires ~3 times as env-based integrations initialize — and are correctly classified alongside the four previously-ignored volatile startup events (plugin.added, plugin.updated, connector.updated, reference.updated).

Confidence Score: 5/5

Safe 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 opencode run output. The logic of normalize_event and compare_events is untouched, and no test assertions were weakened — parity is still enforced for all application-level events.

No files require special attention.

Important Files Changed

Filename Overview
tools/mock-llm-parity.py Adds catalog.updated and integration.updated to the parity-ignored event set, consistent with the existing pattern for serve-only lifecycle events.

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]
Loading

Reviews (1): Last reviewed commit: "fix: ignore catalog.updated and integrat..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown

Coverage Report

Metric Value
Line Coverage 76.1%
Lines Covered 0 / 0

Download detailed HTML coverage reports per OS/Python from the workflow artifacts.

Generated by pytest-cov on 2026-06-15T17:22:58.887Z

@pruiz pruiz merged commit edb3fd8 into master Jun 15, 2026
8 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