Repository navigation
feat: 独立维护容器参考实现:正余额优先、签到后补查与节点自动巡检 - #521
Draft
qiantingwl wants to merge 1 commit into
Draft
qiantingwl wants to merge 1 commit into
qiantingwl wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Tip 🎯 Customize your risk assessments
✅ Automatic approvals, with your rules
|
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.
问题与实现
账户规模增大后,定时签到、余额和凭证维护容易占用同一批出网资源;已经确认零余额的账户重复查询,也会挤占仍在消耗积分的账户。本 PR 提交我们已实现、独立运行过的维护容器参考源码与实现总结,便于官方评估复用。
这是一个独立原型/设计评审 PR,目标分支 beta,不启用默认功能、不修改主程序转发代码、不发版本。 与此前主程序内置维护代理方案 #453 分开,不依赖合并那条 PR。
已实现什么
/api/accounts/usage:可选usage.query桥接只负责维护出网,结果返回官方保存余额并更新调度缓存,不只改数据库数字。模型请求和其他 RPC 帧交给原插件。本次提交范围
contrib/maintenance-sidecar/:脱敏运行源码、独立 Dockerfile、可选 Go usage 桥接、合成数据测试。docs/maintenance-sidecar.md:完整实现、状态流转、接口和数据库依赖、实际边界及待官方确定的正式接入契约。验证
node --check通过,全部 Python 源码语法检查通过,vendored 文件哈希匹配。--network none容器内真实模块启动、登录、6 个静态资源、compact state 和账户分页验证通过,零真实账户/模型请求。明确尚未解决的部分
原主程序二进制未改,但余额路径仍需显式安装/配置 usage 桥接适配器;签到和凭证回写目前仍依赖兼容数据库和密钥,不是完全纯 API 的即插即用部署。当前契约以 3.4.2 和 Linux amd64 为基础;官方升级/插件替换后的兼容及桥接生命周期尚需正式设计。
管理登录失效的本次请求不自动重放;桥接容量错误、较长冷却、过时正余额及上游超时仍是实际限制,不能宣称全量成功或所有显示积分可用。平台保底配额、订阅自动更新和无人值守重启恢复均未实现,原型重启后默认暂停。源码保留这些边界,方便维护者评估而不掩盖问题。
希望官方评估:是否将签到后余额事件、可选外置 worker、维护队列状态、以及更新官方调度缓存的稳定接口纳入正式扩展契约。我们可以按维护者选定的边界继续拆分成较小的正式实现 PR。
🤖 本条回复由 AI Agent 生成
Generated by an AI agent.