feat(provider): merge live config updates safely#283
Open
unive3sal wants to merge 1 commit into
Open
Conversation
Feature description: - Merge live provider configuration updates into stored CC-Switch state without overwriting unrelated local changes. - Add conflict handling for live config import/sync flows and preserve app-specific provider semantics across Claude, Codex, Gemini, OpenCode, Hermes, and OpenClaw. - Persist proxy/provider state consistently while keeping temporary launch and TUI flows aligned with live config recovery. - Refresh current-app TUI data through a full app-data reload path so live provider changes do not reuse stale cached snapshots or usage/pricing state. - Combine the rebased schema v11 changes so usage rollups retain request/pricing model dimensions while failover live config snapshots are still created. - Make SQLite backup, snapshot, and SQL import restore copies run to completion with retry delays while preserving unique backup destinations. - Preserve secure config/database behavior from upstream, including owner-only database/config artifacts and startup/database-access bypasses for commands that must not open user state. - Write environment conflict backups with explicit owner-only file and directory permissions so parallel tests and runtime backups do not depend on mutable environment lookups. Updated modules: - Provider services and live merge logic in src-tauri/src/services/provider/. - CLI provider/config command handling in src-tauri/src/cli/commands/. - TUI provider, settings, overlay, cache invalidation, and runtime action flows in src-tauri/src/cli/tui/. - App-specific config adapters for Codex, Gemini, Hermes, OpenCode, and OpenClaw. - Proxy service, routing, forwarding, response handling, and proxy database persistence. - Database schema/DAO support plus backup/import snapshot reliability in src-tauri/src/database/. - Config permission checks, environment backup handling, and startup command gating in src-tauri/src/config.rs, src-tauri/src/services/env_manager.rs, and src-tauri/src/main.rs. Tests involved: - Provider service and provider command integration tests. - App-specific config tests for OpenClaw, OpenCode, settings sync, and visible apps. - Proxy database, proxy service, takeover, response, and forwarder alignment tests. - Database migration/backup tests and TUI/provider state regression tests. - Permission and startup bypass tests covering config/database security behavior. - Repeated focused and full-suite cargo test confirmation for backup permissions, database backup reliability, and TUI cache invalidation regressions.
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.
Feature description:
Updated modules:
Tests involved:
Fixes #208 #187 #178