docs: add M2 distributed design and record Q3 embedding decision

This commit is contained in:
2026-07-20 23:01:29 -04:00
parent e101d82400
commit 8aaf8f200b
7 changed files with 272 additions and 5 deletions
+2 -2
View File
@@ -46,7 +46,7 @@
## 3. M2 分布式(目标: CHSAnalyzer 治理能力对标)
**内部顺序**: ① Redis 限流六道闸(移植 CHS Lua + **契约测试与内存版共用一套**,原则 3)→ ② Redis 熔断(epoch fencing)→ ③ 多源 × Redis 后端联合验证(多 worker 下全局限额/熔断共享;多源本体已随 M1 交付)→ ④ 背压 stall 判定 → ⑤ `telemetry/postgres.py` + `pricing.py` 成本入遥测 → ⑥ (若 Q3 拍板纳入)Embedding 客户端复用治理栈。
**内部顺序**: ① Redis 限流六道闸(移植 CHS Lua + **契约测试与内存版共用一套**,原则 3)→ ② Redis 熔断(epoch fencing)→ ③ 多源 × Redis 后端联合验证(多 worker 下全局限额/熔断共享;多源本体已随 M1 交付)→ ④ 背压 stall 判定 → ⑤ `telemetry/postgres.py` + `pricing.py` 成本入遥测 → ⑥ Embedding 客户端复用治理栈(Q3 已拍板纳入,2026-07-20)
**验收出口**: 双后端在同一契约测试套件下全绿;多 worker 压测下全局限额真实生效(RPM 不超配);CHSAnalyzer 的 `limiter/provider_gate/governance` 能力对标清单逐项打钩(ARCHITECTURE §11.3);Redis 掉线时降级方向符合铁律(限流/熔断报错、缓存静默)。
@@ -73,4 +73,4 @@
| 决策 | 阻塞点 | 需拍板时间 |
|---|---|---|
| Q1 打包分发(git+ssh vs 内网 index) | 不阻塞开发,阻塞 M4 发布 | M4 前 |
| Q3 Embedding 是否纳入 | 影响 M2 范围 | M2 设计文档前 |
| Q3 Embedding 是否纳入 | ~~影响 M2 范围~~ **已拍板纳入 M2**(2026-07-20) | ✅ 已决 |