chore: remove legacy keychain and brand migration code - #39
Merged
Conversation
The one-time migrations from the previous brand and from pre-consolidated keychain items have served their purpose. Removing them simplifies the Keychain layer, the app startup path, and the test suite. The ClaudeCode provider's own brand migration is deliberately untouched to preserve provider orthogonality.
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
Retires the one-time Keychain consolidation migration (core 04) and the Core preferences branding migration now that every user who was going to run them has done so.
Why
The migration code inflates
Keychain.swift,KeychainStorage.swift, andAppMain.swiftwith dead paths that are never exercised after the first launch post-migration. Removing it simplifies the core layer and eliminates the[String: String]fallback and legacy-service reads from the Keychain read path.What changed
migrateStore,mergeMigrationItems,legacyConsolidatedStore,migrationItems,previousService,legacyAccountPrefix, theisLegacyflag inConsolidatedStore, andKeychainError.migrationFailed.decodeStorenow only handles[String: [String: String]].readLegacyItemsandStoredKeychainItemfrom the protocol and itsSecurityKeychainStorage/InMemoryKeychainStorageimplementations.Sources/Core/LegacyBrandMigration.swiftand thedo/catchblock inAppMain.init()that called it.LegacyBrandKeychainMigrationTests.swiftandLegacyBrandMigrationTests.swift. Moved the non-migration assertions (field-map round trip, failed-update preservation) intoKeychainTests.swift. Updated the error-case enumeration test.Notes for review
Sources/Providers/ClaudeCode/LegacyBrandMigration.swift) is deliberately left in place — it's provider-scoped and still reachable through setup paths.