[codex] Align shop billing and CLIProxy sync#34
Merged
Conversation
Owner
Author
|
客观 review 结论:无阻塞问题,可以合并。 检查项:
残余风险:CLIProxyAPI config 是文件系统写入,无法和 SQLite 做真正分布式事务;当前实现优先避免「Shop 已兑换但代理入口未同步」的半成功状态。 |
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.
背景
主要改动
lib/cliproxy-api-key-sync.js和单元测试。server.js的账务查询、usage summary 日期边界和兑换同步。lib/shop-pricing.js的历史价格回放和当前 GPT 价格。验证
npm run build:css通过。npm test通过,171 个测试全部 pass。git diff --check和git diff --cached --check均无输出。风险与注意
CLIPROXY_CONFIG_PATH未配置时同步会禁用,生产需要显式配置真实config.yaml路径。price_version回放历史,不按最新价格重算历史扣费。