Files
Jyotisha/scripts/narayana_legacy_label.py
T
Jesse_ChenandClaude Opus 5.5 9eb22f6363 feat(narayana): label the product Narayana as the legacy algorithm (T4, BUG-1215)
Round-4 ruling Q4 / product decision A: scoring and the consultation and
report time axes keep the old Narayana (from the Lagna, always zodiacal) until
the Rath trial is decided; every user-visible Narayana now says so.
narayana_legacy_label adds profile=legacy_reference_only and the note (zh/en)
at the consumers (consultation modules, full reading Step 4.13, CLI), not in
the frozen narayana_dasha.py (ERR-110/115). The card's timing.narayana carries
'algorithm'; the projection allowlist passes algorithm_note; the reference
report's Narayana section and the dasha-family table show '算法:…' (English
twin in the phrase table). The unused narayana-dasha --variant-profile flag,
the one place offering a Chara Dasha author's profile for Narayana, is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
2026-10-03 16:42:15 +08:00

29 lines
1.2 KiB
Python

#!/usr/bin/env python3
"""Honest label for the product Narayana Dasha (BUG-1215, round-4 ruling Q4).
`narayana_dasha.narayana_dasha_full_report` (consultation, report, CLI) runs
`calc_narayana_mahadasha`: always from the Lagna, always zodiacal. The
astrologer's ruling is Sanjay Rath's Narayana Dasha (stronger of Lagna / 7th,
order by the start sign); until the product switches (product decision after
the trial), every user-visible Narayana carries this label and the data carry
`profile: legacy_reference_only`. Kept outside `narayana_dasha.py`, which is in
the frozen rectification scoring identity (ERR-110 / ERR-115).
"""
from __future__ import annotations
from typing import Any, Dict
LEGACY_PROFILE = "legacy_reference_only"
LEGACY_NOTE_ZH = "旧算法(从上升起、一律顺行),待替换为 Sanjay Rath 版"
LEGACY_NOTE_EN = "Legacy algorithm (starts from the Lagna, always zodiacal); to be replaced by Sanjay Rath's version"
def label_legacy_narayana(result: Any) -> Any:
"""Add the legacy profile and note to a `narayana_dasha_full_report` result."""
if isinstance(result, dict):
result["profile"] = LEGACY_PROFILE
result["algorithm_note"] = LEGACY_NOTE_ZH
result["algorithm_note_en"] = LEGACY_NOTE_EN
return result