Conversation
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
cc-switch-cli 5.10.2 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre># CC Switch CLI v5.10.2 v5.10.2 is a patch release for skill updates, provider configuration persistence, and upstream-compatible database, pricing, backup, and cloud-sync behavior. ## Highlights - Manually check and apply updates for repository-backed skills from the CLI or TUI. Use `cc-switch skills check-updates`, `cc-switch skills update <name>`, or `cc-switch skills update --all`. - Provider quick settings and common-config membership now persist correctly after TUI edits, including inherited Claude and Codex values. - The database now matches upstream schema v17 and keeps a persistent session-usage deduplication ledger. - SQL backup/restore and WebDAV/S3 synchronization follow the upstream recovery and locking behavior more closely. - The built-in price catalog and model aliases are refreshed from upstream CC-Switch v3.20. - OpenModel is available as a named preset for Claude, Codex, Gemini, OpenCode, Hermes, and OpenClaw. ## Upgrade The database migrates from schema v16 to v17 after creating the normal pre-migration backup. The migration adds the usage-deduplication ledger without rebuilding or deleting existing usage logs. If multiple installations share snapshots through WebDAV or S3, upgrade all of them before syncing a v17 snapshot. Older versions intentionally reject newer schemas. Built-in updater: ```bash cc-switch update ``` Homebrew: ```bash brew upgrade cc-switch-cli ``` macOS/Linux installer: ```bash curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash ``` ## Thank you Thank you to everyone who submitted an issue, shared diagnostics, followed up in a discussion, proposed a change, or opened a pull request during this cycle: - Issues and follow-up: [@DoubleLT](https://github.com/DoubleLT) ([#415](SaladDay/cc-switch-cli#415)), [@ShatterDusk](https://github.com/ShatterDusk) ([#413](SaladDay/cc-switch-cli#413)), [@PawnMa](https://github.com/PawnMa) ([#410](SaladDay/cc-switch-cli#410)), [@evelyn-jialin-zhang](https://github.com/evelyn-jialin-zhang) ([#408](SaladDay/cc-switch-cli#408)), [@MartinaBarton6](https://github.com/MartinaBarton6) ([#407](SaladDay/cc-switch-cli#407)), [@Wizard-one](https://github.com/Wizard-one) ([#406](SaladDay/cc-switch-cli#406)), [@Kurayuri](https://github.com/Kurayuri) ([#405](SaladDay/cc-switch-cli#405)), [@coderyangyangyang](https://github.com/coderyangyangyang) ([#404](SaladDay/cc-switch-cli#404)), [@CodeCatMeow](https://github.com/CodeCatMeow) ([#403](SaladDay/cc-switch-cli#403)), [@TaichiLi](https://github.com/TaichiLi) ([#402](SaladDay/cc-switch-cli#402)), [@maxwell-feng](https://github.com/maxwell-feng) ([#370](SaladDay/cc-switch-cli#370)), [@Jerrrry666](https://github.com/Jerrrry666) ([#278](SaladDay/cc-switch-cli#278)), and [@AkaChou](https://github.com/AkaChou) ([#89](SaladDay/cc-switch-cli#89)). - Pull requests and proposals: [@ShatterDusk](https://github.com/ShatterDusk) ([#414](SaladDay/cc-switch-cli#414)), [@XiaoHuo888-hue](https://github.com/XiaoHuo888-hue) ([#412](SaladDay/cc-switch-cli#412)), [@brushax](https://github.com/brushax) ([#411](SaladDay/cc-switch-cli#411)), [@ChanthMiao](https://github.com/ChanthMiao) ([#409](SaladDay/cc-switch-cli#409)), [@wplct](https://github.com/wplct) ([#399](SaladDay/cc-switch-cli#399), [#400](SaladDay/cc-switch-cli#400), [#401](SaladDay/cc-switch-cli#401)), [@louisneal](https://github.com/louisneal) ([#297](SaladDay/cc-switch-cli#297)), [@zhangyang-crazy-one](https://github.com/zhangyang-crazy-one) ([#277](SaladDay/cc-switch-cli#277)), [@tangaac](https://github.com/tangaac) ([#105](SaladDay/cc-switch-cli#105)), and [@hitsmaxft](https://github.com/hitsmaxft) ([#94](SaladDay/cc-switch-cli#94)). - Discussion participation: [@ToDayL](https://github.com/ToDayL) ([#297](SaladDay/cc-switch-cli#297)). We also thank [@farion1231](https://github.com/farion1231) and every upstream CC-Switch contributor, especially [@Komikawayi](https://github.com/Komikawayi), [@mhy1227](https://github.com/mhy1227), [@zayokami](https://github.com/zayokami), and [@YUZHEthefool](https://github.com/YUZHEthefool), whose database, pricing, backup, and sync work was adapted here. Some acknowledged reports and proposals remain open or were not merged; inclusion here is a thank-you, not a change in their status. See the [full changelog](https://github.com/SaladDay/cc-switch-cli/blob/v5.10.2/CHANGELOG.md) and [all changes since v5.10.1](SaladDay/cc-switch-cli@v5.10.1...v5.10.2). </pre> <p>View the full release notes at <a href="https://github.com/SaladDay/cc-switch-cli/releases/tag/v5.10.2">https://github.com/SaladDay/cc-switch-cli/releases/tag/v5.10.2</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!17022
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.
问题
自动故障转移的高优先级供应商熔断后,会在冷却期结束时进入 HalfOpen 并尝试恢复探测。旧实现通过计数器占用唯一的 HalfOpen 探测许可;如果请求在记录成功或失败之前被取消、提前返回或 panic,许可不会归还。
之后所有请求都无法再次探测已恢复的高优先级供应商,只能持续使用 fallback,看起来就是“故障转移后永远不会切回”。
修复
ProviderRequestPermit生命周期守卫持有 HalfOpen 探测许可。Drop时自动释放许可,覆盖正常返回、错误、任务取消和 panic 展开。测试
行为说明
当前恢复是请求驱动的:冷却期结束后的下一次业务请求触发 HalfOpen 探测,不新增后台健康检查任务。
Problem
After a higher-priority provider trips its circuit breaker, it enters HalfOpen after the cooldown period and should be probed again. The previous implementation reserved the single HalfOpen probe slot with a counter. If the request was cancelled, returned early, or panicked before recording success or failure, the slot was never released.
All later requests were then unable to probe the recovered provider and kept using the fallback indefinitely.
Fix
ProviderRequestPermitguard for HalfOpen probes.Drop, covering successful returns, errors, task cancellation, and panic unwinding.Tests
Behavioral note
Recovery remains request-driven: the first business request after cooldown triggers the HalfOpen probe. This PR does not introduce a background health-check task.