把星盘接口的计算和 HTTP 拆成两个类,离线入口不再伪造请求对象。

方法体未改。定向测试 383 通过;1 条校正回归在基线上同样失败,断言未改。快速门和全量 pytest 未跑。

Co-Authored-By: Grok (agent loop)
This commit is contained in:
jesse-ux
2026-10-16 10:24:42 +08:00
co-authored by Grok (agent loop)
parent fbf04f0b5f
commit c7350bcafb
25 changed files with 3104 additions and 658 deletions
+6 -6
View File
@@ -14,11 +14,11 @@ if str(SCRIPTS) not in sys.path:
sys.path.insert(0, str(SCRIPTS))
import jyotish_api_server as api_server # noqa: E402
from jyotish_api_server import BadRequest, JyotishAPIHandler # noqa: E402
from jyotish_api_server import BadRequest, JyotishComputeService # noqa: E402
def _handler() -> JyotishAPIHandler:
return JyotishAPIHandler.__new__(JyotishAPIHandler)
def _handler() -> JyotishComputeService:
return JyotishComputeService()
def test_active_rectification_questions_api_builds_choice_workflow() -> None:
@@ -515,7 +515,7 @@ def test_high_rigor_event_rectification_requires_real_vedastro_candidate_discrim
},
)
monkeypatch.setattr(
JyotishAPIHandler,
JyotishComputeService,
"_compute_vedastro_gateway_run",
lambda *_args, **_kwargs: {
"status": "ok",
@@ -633,7 +633,7 @@ def test_long_real_conversation_reaches_vedastro_after_local_range_is_narrow(mon
},
)
monkeypatch.setattr(
JyotishAPIHandler,
JyotishComputeService,
"_compute_vedastro_gateway_run",
lambda *_args, **_kwargs: {
"status": "ok",
@@ -825,7 +825,7 @@ def test_search_events_difference_cannot_override_identical_minute_snapshots(mon
},
)
monkeypatch.setattr(
JyotishAPIHandler,
JyotishComputeService,
"_compute_vedastro_gateway_run",
lambda *_args, **_kwargs: {
"status": "ok",