Skip to content

feat(provider): merge live config updates safely#283

Open
unive3sal wants to merge 1 commit into
SaladDay:mainfrom
unive3sal:config
Open

feat(provider): merge live config updates safely#283
unive3sal wants to merge 1 commit into
SaladDay:mainfrom
unive3sal:config

Conversation

@unive3sal

Copy link
Copy Markdown
Collaborator

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.

Fixes #208 #187 #178

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.
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