feat(engine): expose native technique layers in the consultation output
TASK-consult-evidence-card-v2-20260927 T1. New module scripts/consultation_native_layers.py, thinly registered after the merged engine fields in _attach_local_consultation_layers (no handler method, no new forgery site). It writes one new top-level chart key, chart.consultation_native_layers, kept out of chart.modules so the thematic report's full_reading_module_count does not move: - d9_summary: D9 lagna, each planet's D9 sign and dignity (jyotish_engine._get_dignity_level), Vargottama (_calc_vargottama), D1<->D9 reversals - punarphoo (punarphoo.detect_punarphoo, observation_only) - vivah_saham (jyotish_engine._calc_vivah_saham), day_night (gulika) - slow_transits: Jupiter / Saturn / Rahu / Ketu now with natal house and the Jupiter / Saturn SAV / BAV, and the next twelve months' ingress / station dates (ephemeris_events; nodes by the same daily-noon sampling) - double_transit: cmd_double_transit_pac for houses 1-12, conclusions only, plus DK / UL targets by the same PAC rule - karakamsha, argala, dispositor_chains, inter_chart_linkage, moon_transit (lookup-only layers) - annual_tajika on the annual route: build_annual_tajika_pack (annual lagna, Varshesha, Muntha, Mudda Dasha with dates, Sun / Moon / year-lord Tajika aspects), parameter_sensitive; blocked when the pack is not reliable, never natal data A/B on 3 public AA charts x 4 routes: every existing output is identical, only the new key is added; about 40 ms per workflow. Golden regenerated with annual and timing routes (family workflow byte-identical apart from the new key). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5b061e4361
commit
d5616c347e
@@ -1,9 +1,12 @@
|
||||
"""Capture real engine consultation responses for the evidence-card tests.
|
||||
|
||||
Three public AA charts (Steve Jobs, Barack Obama, Elizabeth Taylor), the
|
||||
research reference date, raman ayanamsa, mean nodes, family route. External
|
||||
VedAstro is not called (same stand-in as the research runner). The response is
|
||||
trimmed by key only: every kept value is the engine's own value, unchanged.
|
||||
research reference date, raman ayanamsa, mean nodes. Each chart carries the
|
||||
family route (`workflow`) and, for evidence card v2, the annual
|
||||
(`annual_workflow`) and timing (`timing_workflow`) routes with the frontend's
|
||||
default twelve-month horizon. External VedAstro is not called (same stand-in
|
||||
as the research runner). Each response is trimmed by key only: every kept
|
||||
value is the engine's own value, unchanged.
|
||||
|
||||
PYTHONHASHSEED=0 python scripts/research/capture_consult_evidence_card_golden.py
|
||||
"""
|
||||
@@ -36,7 +39,15 @@ TOP_KEEP = (
|
||||
"range_boundary_contexts",
|
||||
)
|
||||
RECTIFICATION_KEEP = ("effective_accuracy", "lagna_boundary", "summary", "enabled_vargas")
|
||||
CHART_KEEP = ("success", "birth", "ascendant", "planets", "houses", "shadbala", "dasha", "yogas")
|
||||
CHART_KEEP = (
|
||||
"success", "birth", "ascendant", "planets", "houses", "shadbala", "dasha", "yogas",
|
||||
# Evidence card v2: native technique layers (scripts/consultation_native_layers.py).
|
||||
"consultation_native_layers",
|
||||
)
|
||||
EXTRA_ROUTES = (
|
||||
("annual_workflow", {"id": "annual", "domain": "annual", "question": "未来一年重点是什么?"}),
|
||||
("timing_workflow", {"id": "timing", "domain": "timing", "question": "接下来一年哪些时间点重要?"}),
|
||||
)
|
||||
MODULE_KEEP = (
|
||||
"varga_spectrum", "shadbala", "arudha_padas", "jaimini", "narayana_dasha",
|
||||
"ashtakavarga", "dasha_sub_periods", "kp_cusps", "gulika",
|
||||
@@ -70,14 +81,17 @@ def main() -> int:
|
||||
charts = []
|
||||
for chart in load_public_charts(ROOT):
|
||||
workflow = runner._run_workflow(runner._workflow_body(chart, question))
|
||||
charts.append({
|
||||
entry = {
|
||||
"id": chart["id"],
|
||||
"label": chart["label"],
|
||||
"source": chart["source"],
|
||||
"case_id": chart["case_id"],
|
||||
"rodden_rating": chart["rodden_rating"],
|
||||
"workflow": trim(workflow),
|
||||
})
|
||||
}
|
||||
for key, extra in EXTRA_ROUTES:
|
||||
entry[key] = trim(runner._run_workflow(runner._workflow_body(chart, extra)))
|
||||
charts.append(entry)
|
||||
payload = {
|
||||
"source": "scripts/research/capture_consult_evidence_card_golden.py",
|
||||
"note": "Real engine consultation_workflow responses for three public AA charts, trimmed by key only.",
|
||||
@@ -86,6 +100,7 @@ def main() -> int:
|
||||
"node_mode": NODE_MODE,
|
||||
"route": question["domain"],
|
||||
"question": question["question"],
|
||||
"extra_routes": {key: extra for key, extra in EXTRA_ROUTES},
|
||||
"external_vedastro": "not_called",
|
||||
"charts": charts,
|
||||
}
|
||||
|
||||
@@ -74,7 +74,9 @@ def _workflow_body(chart: dict[str, Any], question: dict[str, str]) -> dict[str,
|
||||
"claim_boundary": contract.claim_boundary,
|
||||
"plan_depth": "standard",
|
||||
"requested_domains": list(contract.requested_domains),
|
||||
"timing_horizon": None,
|
||||
# The frontend plan defaults timing / annual to the next twelve months;
|
||||
# the engine refuses those two routes without a horizon.
|
||||
"timing_horizon": "next_12_months" if domain in ("timing", "annual") else None,
|
||||
"precision_boundary": "server_evidence_required",
|
||||
"required_evidence_categories": list(contract.required_evidence_categories),
|
||||
"surface": "api_web",
|
||||
|
||||
Reference in New Issue
Block a user