fix: request official VedAstro evidence in gateway
This commit is contained in:
+3
-3
@@ -2705,9 +2705,9 @@
|
||||
- 影响面:个人报告 consultation workflow、Technique Audit、VedAstro official evidence、`modules.ashtakavarga` 与 `modules.kp_cusps`
|
||||
- 用户现象:Technique Audit 将 Ashtakavarga、KP cusp 和官方 VedAstro 标成 blocked;即使已配置 API key,当前报告仍提示官方外部引擎未验证或不可用。
|
||||
- 触发条件:报告通过 consultation workflow 生成 machine evidence packet;本地排盘已有 planets/ascendant,或 VedAstro gateway 本次返回 official raw response。
|
||||
- 根因:consultation 本地补充层只挂入 Varga、Arudha 与 Narayana,未调用仓库已有的 Ashtakavarga/KP 计算;同时 VedAstro gateway 在 machine evidence packet 冻结后才执行,导致本次 raw response 无法进入报告审计。API key 只满足凭据配置,不证明本次调用、响应与证据传播成功。
|
||||
- 修复:复用现有 `_compute_ashtakavarga`、`_normalized_planets_from_body` 和 `_compute_kp`,把结果挂入既有 modules;将 gateway 调用提前到 evidence packet 生成前,仅在 `official_verified` 且存在本次 raw response 时合并 official evidence,缺 raw 时继续失败闭合。
|
||||
- 验证:consultation consumer/API 聚焦回归锁定 Ashtakavarga SAV、12 个 KP houses、两项 audit 为 used,以及 VedAstro raw response 传播至 `official_verified`;相关聚焦测试 34 passed,开工预检通过。
|
||||
- 根因:consultation 本地补充层只挂入 Varga、Arudha 与 Narayana,未调用仓库已有的 Ashtakavarga/KP 计算;同时 VedAstro gateway 默认未请求 official full snapshot,且在 machine evidence packet 冻结后才执行,导致即使 key/endpoint/network ready 也没有本次 raw response 可进入报告审计。API key 只满足凭据配置,不证明本次调用、响应与证据传播成功。
|
||||
- 修复:复用现有 `_compute_ashtakavarga`、`_normalized_planets_from_body` 和 `_compute_kp`,把结果挂入既有 modules;让 gateway 入口显式请求 official raw snapshot,并将 gateway 调用提前到 evidence packet 生成前;仅在 `official_verified` 且存在本次 raw response 时合并 official evidence,缺 raw 时继续失败闭合。
|
||||
- 验证:consultation consumer/API 聚焦回归锁定 Ashtakavarga SAV、12 个 KP houses、两项 audit 为 used,以及 gateway 无需额外环境开关也会请求并传播 raw response 至 `official_verified`;相关聚焦测试与开工预检通过。
|
||||
- 防复发:本地计算器存在不等于已进入报告 modules;machine evidence packet 不得在 official gateway 完成本次调用前冻结;`official_verified` 必须同时具备 closure state 与 raw response。
|
||||
- 相关记录:ERR-020、ERR-021、ERR-022、ERR-024、ERR-025、ERR-026、ERR-104
|
||||
- 复发自:无
|
||||
|
||||
@@ -266,6 +266,6 @@ Prevention: 将该门禁运行在已验证 Docker Compose v2 的 `manman-linux`
|
||||
|
||||
## ERR-104 | Consultation evidence packet can freeze before gateway evidence and omit existing local modules | mitigated 2026-08-10
|
||||
|
||||
The consultation workflow built its machine evidence packet before invoking the VedAstro gateway, so a configured credential and even a successful official raw response could not affect the current report. The same workflow also failed to attach the repository's existing Ashtakavarga and KP calculators to `chart.modules`, leaving both Technique Audit rows blocked despite valid local chart inputs.
|
||||
The gateway did not request an official full snapshot by default, and the consultation workflow built its machine evidence packet before invoking that gateway, so configured credentials and readiness still produced no current raw response for the report. The same workflow also failed to attach the repository's existing Ashtakavarga and KP calculators to `chart.modules`, leaving both Technique Audit rows blocked despite valid local chart inputs.
|
||||
|
||||
Prevention: invoke the official gateway before freezing the evidence packet; require `official_verified` plus a non-empty raw response before promoting official evidence; attach existing local calculator outputs through the shared consultation layer and keep KP values `observation_only` until an external worked-example parity gate closes. Regression tests must lock both raw-response propagation and module presence.
|
||||
Prevention: make the gateway request official raw evidence without relying on an optional environment switch; invoke it before freezing the evidence packet; require `official_verified` plus a non-empty raw response before promoting official evidence; attach existing local calculator outputs through the shared consultation layer and keep KP values `observation_only` until an external worked-example parity gate closes. Regression tests must lock both raw-response propagation and module presence.
|
||||
|
||||
@@ -279,6 +279,7 @@ def _entrypoint_args(
|
||||
reference_date=reference_date,
|
||||
ayanamsa=str(case.get("ayanamsa_policy") or case.get("ayanamsa") or "lahiri"),
|
||||
node_mode=str(case.get("node_policy") or case.get("node_mode") or "mean"),
|
||||
require_official_raw_response=True,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@ def test_gateway_requires_and_propagates_entrypoint_official_raw_response(monkey
|
||||
monkeypatch.setenv("JYOTISH_SKIP_LOCAL_ENV", "1")
|
||||
monkeypatch.setenv("VEDASTRO_API_ENDPOINT", "https://api.vedastro.org/api")
|
||||
monkeypatch.setenv("VEDASTRO_ENABLE_NETWORK", "1")
|
||||
monkeypatch.setenv("VEDASTRO_GATEWAY_REQUIRE_OFFICIAL_RAW_RESPONSE", "1")
|
||||
monkeypatch.delenv("VEDASTRO_GATEWAY_REQUIRE_OFFICIAL_RAW_RESPONSE", raising=False)
|
||||
monkeypatch.delenv("VEDASTRO_REQUIRE_OFFICIAL_RAW_RESPONSE", raising=False)
|
||||
monkeypatch.setattr(
|
||||
vedastro_user_entrypoint,
|
||||
"build_runtime_mode_report",
|
||||
|
||||
Reference in New Issue
Block a user