Skip to content

refactor: align live configuration writes with upstream key-field projections - #506

Merged
SaladDay merged 7 commits into
mainfrom
refactor/upstream-key-field-write
Oct 11, 2026
Merged

SaladDay merged 7 commits into
mainfrom
refactor/upstream-key-field-write

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Provider changes can overwrite live user settings or replay stale values from saved provider snapshots. This ports the Claude and Gemini key-field projections from cc-switch df40d53c36b604e044b4d5b9091aeb961aa56990, connects them to the shared durable write engine, and includes Codex's top-level base_url compatibility fix.

Switching preserves user-owned settings and Gemini dotenv comments and replaces provider-owned fields. Direct switches commit current-provider pointers after publication. Proxy switching, active-provider edits, and restoration use the same projections; interrupted writes recover through the engine without restoring old file snapshots. CLI/TUI temporary Claude launches project onto current live settings. Explicit CLI common-config edits remain available without replacing an active proxy route. Source provenance and retained upstream behavior are documented in docs/maintenance/key-field-upstream-alignment.md.

Validation: 396 targeted library tests passed, including concurrent-edit and interrupted-proxy-write recovery tests; 81 provider/proxy integration tests passed. Formatting passed. Three unrelated Usage Query integration failures were reproduced unchanged on the base commit. The full CI suite covers unit tests, integration tests, and Linux/Windows library builds.

@SaladDay
SaladDay marked this pull request as ready for review October 11, 2026 09:01
@SaladDay
SaladDay merged commit 528ad3c into main Oct 11, 2026
6 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