fix(research): reuse existing handler instead of new __new__ forgeries
Independent Staging Quality Gate / validate (push) Successful in 11m55s
Independent Staging Quality Gate / publish (push) Successful in 3m28s

Gate run 2958 failed tests/test_api_server_growth_contract.py: the
evidence-card research script added two JyotishAPIHandler forgery sites.
Reuse capture_report_blocked_repairs_golden._handler(); output unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
Jesse_Chen
2026-09-27 01:40:47 +08:00
co-authored by Claude Opus 5.5
parent 45ed054f09
commit 560d4fc2dd
2 changed files with 10 additions and 5 deletions
@@ -83,10 +83,11 @@ def _workflow_body(chart: dict[str, Any], question: dict[str, str]) -> dict[str,
def _run_workflow(body: dict[str, Any]) -> dict[str, Any]:
from jyotish_api_server import JyotishAPIHandler
# Reuse the existing golden-capture handler instead of adding another
# handler-forgery site (tests/test_api_server_growth_contract.py).
from capture_report_blocked_repairs_golden import _handler
handler = JyotishAPIHandler.__new__(JyotishAPIHandler)
return handler._compute_consultation_workflow(body)
return _handler()._compute_consultation_workflow(body)
def _project(jobs: list[dict[str, str]], summary_path: Path) -> list[dict[str, Any]]:
@@ -111,15 +112,15 @@ def _project(jobs: list[dict[str, str]], summary_path: Path) -> list[dict[str, A
def _time_layers(chart_body: dict[str, Any]) -> dict[str, float]:
"""Time local layers on one birth payload. VedAstro stays blocked."""
from capture_report_blocked_repairs_golden import _handler
from jyotish_api_server import (
JyotishAPIHandler,
_attach_local_consultation_layers,
_build_consultation_varga_spectrum,
_custom_research_dn_chart,
_planet_longitudes,
)
handler = JyotishAPIHandler.__new__(JyotishAPIHandler)
handler = _handler()
timings: dict[str, float] = {}
def elapsed(name: str, fn, *args, **kwargs):