docs: design settings invariant guards on every construction path
Guards for the three cross-field invariants (source timeout vs lease TTL, stall window vs max TTFT, probe TTL vs slowest timeout) only ran inside from_env, so the from_settings path could build a GatewaySettings that violates the class's own documented invariants. Design moves all of them plus a non-empty sources check into __post_init__ as _validate_* methods, matching the existing frozen dataclasses in types.py. Covers two defects left by PR#1: probe_ttl_s was never moved, and an empty sources tuple leaked a bare 'max() arg is an empty sequence'.
This commit is contained in:
@@ -46,3 +46,5 @@
|
||||
- [2026-07-22 09:33 UTC] 重建索引: 32 篇页面
|
||||
- [2026-07-22 14:36 UTC] 新增 finding: M4 迁移验收(GovDoc+CHS) (finding:m4-acceptance)
|
||||
- [2026-07-22 14:36 UTC] 重建索引: 34 篇页面
|
||||
- [2026-07-30 03:44 UTC] 新增 design: GatewaySettings 跨字段不变量守卫的生效范围 (design:settings-invariant-guards)
|
||||
- [2026-07-30 03:44 UTC] 重建索引: 36 篇页面
|
||||
|
||||
Reference in New Issue
Block a user