Skip to content

Tolerate unsupported persisted provider kinds#1507

Open
juliusmarminge wants to merge 1 commit intomainfrom
feature/tolerate-unsupported-providers
Open

Tolerate unsupported persisted provider kinds#1507
juliusmarminge wants to merge 1 commit intomainfrom
feature/tolerate-unsupported-providers

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 29, 2026

  • Coerce legacy or future provider values during orchestration event reads
  • Accept non-empty persisted provider names in session directories
  • Add a shared provider support guard in contracts

What Changed

Why

UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes event/session decoding to no longer fail on unknown provider strings, which could mask bad data and affect downstream provider dispatch if callers don’t re-validate.

Overview
Makes persisted reads tolerant of legacy/future provider values instead of failing strict schema decoding.

On orchestration event replay (OrchestrationEventStore.readFromSequence), the payload’s modelSelection/defaultModelSelection provider is coerced to DEFAULT_PROVIDER_KIND when isSupportedProvider rejects it, ensuring OrchestrationEvent decoding succeeds.

For provider session directory bindings, persisted provider names now accept any non-empty string (cast to ProviderKind) rather than rejecting unknown providers, and contracts add a shared isSupportedProvider guard for callers to explicitly check support.

Written by Cursor Bugbot for commit 415a840. This will update automatically on new commits. Configure here.

Note

Tolerate unsupported persisted provider kinds when reading orchestration events

  • Adds coerceUnsupportedProviders in OrchestrationEventStore to patch modelSelection/defaultModelSelection payloads that contain unknown provider names, replacing them with DEFAULT_PROVIDER_KIND before schema decoding.
  • Adds isSupportedProvider type guard in orchestration.ts to test whether a provider string is 'codex' or 'claudeAgent'.
  • Relaxes decodeProviderKind in ProviderSessionDirectory to accept any non-empty provider string instead of only known kinds.
  • Behavioral Change: rows with unrecognized provider names that previously caused decode failures now succeed, yielding events with the default provider.

Macroscope summarized 415a840.

- Coerce legacy or future provider values during orchestration event reads
- Accept non-empty persisted provider names in session directories
- Add a shared provider support guard in contracts
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 927d701b-7670-4bb2-9027-413ec2bcc3d5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tolerate-unsupported-providers

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

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant