fix(consult): race a bounded VedAstro gateway on the chat path
Independent Staging Quality Gate / validate (push) Successful in 10m15s
Independent Staging Quality Gate / publish (push) Successful in 10m2s

Foreground still skips the heavy overview stack, but overlaps a timed
gateway so official evidence can merge when it finishes in budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-19 17:51:27 +08:00
parent 0eedf92992
commit bffc74efc5
9 changed files with 321 additions and 11 deletions
+16
View File
@@ -4506,3 +4506,19 @@
- 相关记录:BUG-279、BUG-287、BUG-298
- 复发自:BUG-279(算了却不交给模型)
- 修复版本:待提交
## BUG-301 | 网页咨询前台把 VedAstro 整段跳过,审计只能诚实 blocked
- 状态:resolved
- 首次发现:2026-08-19
- 最近更新:2026-08-19
- 影响面:普通咨询 `POST /api/consult``execute_consultation_workflow` foreground、`vedastro_gateway`、模型包 `vedastro_cross_check`
- 用户现象:技法表里 VedAstro 云状态一直是阻塞,即使官方网关和网络可用。
- 触发条件:聊天前台 `foreground: true``defer_optional_external_evidence: true`
- 根因:BUG-161 为避免 overview/full snapshot/range scan/gateway 串行超时,前台直接跳过 gateway 并写死 `foreground_optional_evidence_deferred`。本地层恢复后(BUG-300)仍把可选官方交叉验证当成“本轮不算”。
- 修复:前台仍跳过 VedAstro 主入口 overview 与 range scan。gateway 与本地计算并行,子进程预算约 8 秒,本地完成后最多再等 1.5 秒。赶上且有 official raw 则合并为 `official_verified` 并投影日月升一星座;超时或失败保持 `official_blocked`,本地回答不失败。MEVG / PyJHora / jyotishganit 仍 blocked。不提高 `AGENT_TIMEOUT_MS`
- 验证:`tests/test_api_server_security.py` 前台赶上合并与超时降级;`tests/test_consultation_consumer_context.py` 压缩包去掉经纬度;`frontend/tests/consultation-context.test.ts``consultation-spectrum-parity.test.ts`
- 防复发:前台不得再同步串联 overview+snapshot+range scan;赶不上不得把未交付官方层标成 executed;压缩交叉验证不得带出生钟点或坐标。
- 相关记录:BUG-161、BUG-159、BUG-300
- 复发自:BUG-161(超时防护把可选官方层整段关掉)
- 修复版本:待提交