优化(履约租约): 绑定失败保留账号直到人工释放

- clean 任务 binding_failed 租约改为无限期保留
- Reaper 不再自动释放 clean 绑定失败账号,只保留历史任务旧策略
- 迁移 0133 清理存量 clean 绑定失败租约到期时间
- 工作台显示账号保留中并提供人工释放
- 补充租约/回收测试
This commit is contained in:
yml
2026-11-25 13:47:34 +08:00
parent adf2e9a066
commit 18df3443d8
7 changed files with 105 additions and 13 deletions
@@ -28,6 +28,7 @@ from .binding_status import (
)
from .common import (
BINDING_COOLDOWN_ISSUES,
FLOW_VERSION_CLEAN,
_jsonable,
_now,
binding_failed_lease_ttl_minutes,
@@ -92,6 +93,9 @@ def _lease_policy_for_task(
return "cancelled", 0
if status == "manual_required":
if task.issue_code == "binding_failed":
# Clean 任务绑定失败时保留账号,直到绑定成功或人工释放。
if task.flow_version == FLOW_VERSION_CLEAN:
return "binding_failed_hold", None
return (
"binding_failed_cleanup",
binding_failed_lease_ttl_minutes(),