fix: 修复 Code Review 发现的 4 个 High + 1 个 Medium 问题
High-1/2: baseline mode 违反 DB CHECK 约束
- ck_mode_enum 扩展为 ('single','multi','baseline')
- baseline 的 run_type 从 'baseline' 改为 'live'(符合现有约束)
- 新增迁移 0017_mode_baseline
High-3: 限流日志 NameError: ip 未定义
- deps.py:190 的 logger.warning 中 ip → client_ip
High-4: 生产 Cookie 缺少 Secure 标志
- auth.py 登录时根据 APP_ENV 设置 secure=True(生产)
Medium-5: 降级日志参数类型错误
- orchestrator.py:266 ok_reports(list) → len(ok_reports)(int)
附加: PredictRequest mode 字段加 pattern 校验,与 DB 约束同源
Co-Authored-By: new-provider/LongCat-2.0 <<EMAIL>>
This commit is contained in:
co-authored by
new-provider/LongCat-2.0 <
parent
0a6af0657a
commit
675e176603
@@ -263,7 +263,7 @@ async def predict_match_multi(
|
||||
# 所有专家无数据/均失败:跳过终裁,标记 degraded
|
||||
logger.warning(
|
||||
"预测降级 match=%s mode=%s status=degraded experts=%d/%d 均无有效数据",
|
||||
match_id, "multi", ok_reports, len(reports),
|
||||
match_id, "multi", len(ok_reports), len(reports),
|
||||
)
|
||||
# 无有效专家时不调用 aggregator provider,避免多余开销
|
||||
# model 使用 settings 默认值占位(无实际 LLM 调用)
|
||||
|
||||
Reference in New Issue
Block a user