fix: add migration for claudeCode to claudeAgent provider rename#1405
Open
urielkdev wants to merge 5 commits intopingdotgg:mainfrom
Open
fix: add migration for claudeCode to claudeAgent provider rename#1405urielkdev wants to merge 5 commits intopingdotgg:mainfrom
urielkdev wants to merge 5 commits intopingdotgg:mainfrom
Conversation
Commit 33791cd renamed the provider from "claudeCode" to "claudeAgent" in source code but didn't include a database migration. Users who used the Claude provider before that commit have "claudeCode" persisted in SQLite, causing a crash loop on startup. Adds migration 017 to rename "claudeCode" → "claudeAgent" across all affected tables and a backward-compatible fallback in decodeProviderKind. Closes pingdotgg#534 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
Can confirm this fixed the issue for me. |
Follows the existing migration test pattern (016): runs migrations up to N-1, inserts legacy data with "claudeCode", runs migration N, and asserts all tables were correctly updated to "claudeAgent". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tory Inserts a row with legacy "claudeCode" provider directly in SQLite and verifies getBinding decodes it as "claudeAgent". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
017_RenameClaudeCodeProviderto rename"claudeCode"→"claudeAgent"across all affected tables (provider_session_runtime,projection_thread_sessions,projection_threads,projection_projects,orchestration_events)decodeProviderKindmapping"claudeCode"→"claudeAgent"Migrations.tsContext
Commit
33791cdf("align branding guide lines") renamed the provider fromclaudeCodetoclaudeAgentin source code but didn't include a database migration. Any user who used the Claude provider before that commit has"claudeCode"persisted in their SQLite database, causing a crash loop on startup:Closes #534
Test plan
claudeCodedata exists, migration is a no-opNote
Medium Risk
Runs data-rewriting SQL updates across multiple tables (including JSON fields) during migration; mistakes could leave persisted provider references inconsistent, though the change is narrow and covered by tests.
Overview
Fixes legacy persisted provider identifiers by adding migration
017_RenameClaudeCodeProvider, rewritingclaudeCode�claudeAgentinprovider_session_runtime,projection_thread_sessions,projection_threads,projection_projects, andorchestration_events(including JSON columns andadapter_key).Registers the new migration in
Migrations.tsand adds a backward-compatible decode path inProviderSessionDirectoryso any remainingclaudeCoderows are read asclaudeAgent, with tests covering both the migration and runtime decoding.Written by Cursor Bugbot for commit e166709. This will update automatically on new commits. Configure here.
Note
Add migration to rename
claudeCodeprovider references toclaudeAgentclaudeCodeprovider references toclaudeAgentacrossprovider_session_runtime,projection_thread_sessions,projection_threads,projection_projects, andorchestration_events(including JSON columns andadapter_key).decodeProviderKindin ProviderSessionDirectory.ts to treat legacyclaudeCodevalues asclaudeAgentat read time, covering any rows not yet migrated.claudeCodewill permanently read back asclaudeAgent.Macroscope summarized e166709.