feat(account-events): 账号详情页与账号事件历史全链路支持

1. 新增账号事件数据表 AccountEvent 与迁移版本 20261002_0040_account_events,支持审计 Cookie 变更、自动重登、健康检查及任务执行事件;
2. 后端新增 account_events_service 并扩展 /api/accounts 路由,支持事件查询、过滤与上报;
3. 前端新增 AccountDetailPage 账号详情页组件,支持账号元信息展示、事件历史瀑布流与快捷重登操作;
4. 修复 CK 重登与自动化定时任务中事件关联逻辑,补充 test_account_events 单元测试;
5. 新增生产服务器高负载排查分析报告及相关设计文档。
This commit is contained in:
yml2213
2026-10-03 12:58:58 +08:00
parent 294c6cd058
commit 834bfdd1d0
29 changed files with 2321 additions and 1934 deletions
+6 -2
View File
@@ -235,7 +235,11 @@ class TestSettlement(_Base):
now = datetime.now(UTC)
fresh = {t.id: t for t in tasks}
counters = ck_relogin.settle_results(
fresh, [t.id for t in tasks], now=now, max_attempts=max_attempts
self.session,
fresh,
[t.id for t in tasks],
now=now,
max_attempts=max_attempts,
)
self.session.commit()
return counters, now
@@ -463,7 +467,7 @@ class TestSettlementVisibility(_Base):
task = self.make_task("acc", attempt_status="success", relogin_attempts=1)
now = datetime.now(UTC)
counters = ck_relogin.settle_results(
{task.id: task}, [task.id], now=now, max_attempts=2
self.session, {task.id: task}, [task.id], now=now, max_attempts=2
)
assert counters["valid"] == 1 and counters["invalid"] == 0
assert task.relogin_failure_kind == ""