Skip to content

feat: merge all CC Switch recovery sources including the MCP registry - #8

Merged
StarsailsClover merged 2 commits into
mainfrom
v26.0-Alpha.7
Oct 5, 2026
Merged

StarsailsClover merged 2 commits into
mainfrom
v26.0-Alpha.7

Conversation

@StarsailsClover

Copy link
Copy Markdown
Owner

Summary

ccswitch recover previously selected a single stored provider config. Once adopt stores user MCP servers in CC Switch's mcp_servers table, that table is the only place some entries exist, so single-source recovery could silently miss them.

This change layers every valid source into one recovery document:

  • all Codex provider configs, richest first so the richest wins conflicts;
  • a synthetic CC Switch MCP registry document built from mcp_servers rows with enabled_codex = 1;
  • --provider NAME restricts provider configs to the named one and still adds the MCP registry.

The report lists the merged sources.

Verified

  • Regression test now seeds an mcp_servers row and proves recovery restores both provider-text entries (prima-mock-api, plugin, desktop) and the registry-only cu_bridge.
  • 37 tests passing; clippy -D warnings and fmt --check clean.

The guidance change landed inside 143f8c9 ("feat: recover from CC Switch configs and
track asset snapshots") without a changelog entry. Record it: `status` now names
`capture` for drift that carries no clobber fingerprint and offers `repair` only as the
deliberate revert, and `doctor` reports the same distinction instead of a bare
"no clobber fingerprint".

Verified: cargo fmt --all -- --check, cargo clippy --workspace --all-targets -D warnings,
cargo test --workspace (37 tests).
Provider configs alone cannot rebuild user MCP servers once adopt stores them in CC Switch's mcp_servers table. recover now layers every valid source (richest provider config wins conflicts) plus a synthetic MCP registry document built from enabled_codex rows, and reports the merged sources.
@StarsailsClover
StarsailsClover merged commit 9371447 into main Oct 5, 2026
4 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