mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
fix(adaptive): 修复 429 计数归零写入及 reset 语义
- sql.rs: UPDATE 时对 concurrent_429_count / rpm_429_count 加 COALESCE(, 0),避免 None 覆写为 NULL - effects.rs: rpm_429_count 始终写入 Some(projection.rpm_429_count),不再过滤零值;新增 unknown-429 场景下零值持久化的单元测试 - adaptive.rs: reset 接口将两个计数字段置为 Some(0) 而非 None,与数据库默认语义对齐;同步修正集成测试断言 - docker-compose.build.yml: 补充 AETHER_GATEWAY_AUTO_PREPARE_DATABASE 默认开启 - README.md: 同步说明 build compose 也已默认开启自动迁移
This commit is contained in:
@@ -440,8 +440,8 @@ async fn gateway_resets_admin_adaptive_learning_locally_with_trusted_admin_princ
|
||||
.await
|
||||
.expect("repository query should succeed");
|
||||
assert_eq!(updated[0].learned_rpm_limit, None);
|
||||
assert_eq!(updated[0].concurrent_429_count, None);
|
||||
assert_eq!(updated[0].rpm_429_count, None);
|
||||
assert_eq!(updated[0].concurrent_429_count, Some(0));
|
||||
assert_eq!(updated[0].rpm_429_count, Some(0));
|
||||
assert_eq!(updated[0].adjustment_history, None);
|
||||
|
||||
gateway_handle.abort();
|
||||
|
||||
Reference in New Issue
Block a user