Repository navigation
fix: bound durable billing recovery sweeps past busy prefixes - #1008
Merged
Merged
Conversation
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.
解决的问题与行为变化
关联记录与来源
7282730753ae3aa9a732a251ef1cfc8770819c78、merge056e2ed80f6c491bb84758adbaa7b2510d8cc258。production的本地快照c76d8d3de146408e35b79814955088b355c66135;head 分支fix/pr1001-recovery-fairness-20261122;冻结 head0f18cb3d93ccf901684e58f2eb501f9dfb6eff14。无未合并前置 PR。父级已复核实时 base 与冻结提交;首次发布 Draft,独立验收和远端 CI 尚待完成。管理员新功能提示
完整规则见贡献指南。本次为后台恢复内部修复,无管理员新增界面。
提示 ID 与
frontend/src/constants/newFeatureNotices.ts登记项(稳定且唯一):不适用,无新功能入口。所有
NewFeatureBadge展示位置:不适用,无 UI 变化。关闭行为(同一功能多入口共用 ID,点击任一标签后同步隐藏;不同新功能使用不同 ID):不适用,无标签。
ID 沿用 / 重新公告说明(普通修复、文案调整、重复发版不换旧 ID;同功能重新通知须明确为新公告登记新 ID):不适用,不更改现有 ID。
同一 PR 的必要回归证据(操作或命令、实际结果、未覆盖情况):不适用,无管理员功能提示改动。
A 已关闭后升级到 B,B 的新 ID 仍可见;不适用,无新 ID。
点击 B 任一入口的标签,相关入口同步隐藏;不适用,无标签。
同一浏览器同一管理员刷新/重新登录后 B 仍隐藏(本地存储可用且未清除);不适用,无持久化 UI 改动。
后续 C 新 ID 正常显示,普通升级不复活 A/B;不适用,无 ID 生命周期改动。
复现与验收
c76d8d3de146408e35b79814955088b355c66135。缓存语义用计数 probe,非实际 Redis 适配器验收。BILLING_RECOVERY_LOCKED_PREFIX行为失败,当前尚未执行。backend/internal/repository/usage_billing_recovery_fairness_integration_test.go覆盖锁定前缀、时间截止点与回绕、新事件后续入选、排队取消及 overflow 的持久恢复。overflow 通过注入 4096 个占位 queue slots 达到真实 cap,不代表真实 4096 并发压测;未测生产吞吐、真实通知投递或跨进程压力。协议、调度或传输改动补充(相关时填写)
实际验证
git diff --check、git diff --cached --checkgit diff c76d8d3de146408e35b79814955088b355c66135 HEAD --checkgit status --short、git rev-parse HEAD0f18cb3d93ccf901684e58f2eb501f9dfb6eff14。go test -race -p=1 -json -tags=integration ./internal/repository -run '^TestUsageBillingRecoveryPassesLockedPrefixAndRevisitsReceipts$' -count=1 -timeout=5mgo test -race -p=1 -json -tags=integration ./internal/repository -run '^TestUsageBilling(Recovery(PassesLockedPrefixAndRevisitsReceipts|RetainsCanceledAndOverflowedEvents|ScanBoundsSweepAndWraps)|AdmissionCancellation(RotatesRecoveryAndSettlesOnce|CannotOverwriteConcurrentReceipt))$' -count=1 -timeout=8mmake test-integration TEST_FLAGS='-json -count=1'没有本地 tests/install/build/lint/typecheck/formatter,也未访问生产或运行付费请求。没有 UI 改动,截图不适用。首次未满足门禁为冻结 head 的远端动态结果,不能继承旧 #1001 的绿色状态。
兼容性与运行影响
文档与用户可见变化
内部恢复修复,无 UI、配置、API 或用户文档变化。预期减少热用户锁定批次对后方用户结算恢复的阻塞;尚无生产实测。PR 合并、Release 和生产部署均未由本轮执行。
Agent 使用声明
gpt-6.1-sol,推理档位工具未提供),需求/静态差异审查、发布与验收;主 writer Codex,分析、源码、回归、workflow 和正文;只读子 Agentfairness_readonly_review,静态并发/SQL 屏障/测试/CI 审查,无源码写入。gpt-6.1-sol。只读子 Agent 继承父配置,未指定覆盖,其实际完整模型 ID 未知。ultra;只读子 Agent 实际档位未知。请求 fast 是否交付未知,不声明已交付。fast 仅 requested,服务端交付未知。提交前自查
独立源码审查完成,当前门禁仍为精确 head 的原始 RED/GREEN、生产包编译与全部适用 CI。保持 Draft,尚未合并。