remove retired prashna fallback branch
This commit is contained in:
@@ -80,7 +80,7 @@ For large architecture or release work, also read:
|
||||
| ERR-047 | Initial `slow` marker partition for `test_api_server_security.py` still exceeded the 120-second desktop budget; heavy paths extend beyond VedAstro/high-rigor prefix groups. | active profiling blocker | Profile test node IDs in bounded subprocess batches, mark only measured heavy tests, and keep fast-security acceptance separate from long CI integration coverage. |
|
||||
| ERR-048 | Candidate-time scanner assumed all documented D4/D24/D30 divisions were exposed by `jyotish_engine.py varga`; actual `--d4` failed at runtime. | mitigated 2026-07-12 | Candidate scans must record unsupported Varga flags as `unavailable_vargas`; only successfully computed D1/D9/D10 fields may drive local sensitivity output until a unified Varga contract exists. |
|
||||
| ERR-049 | PyJHora benchmark runner executed on `--help`, used a wrong repository-root path in `run_skill_baseline.py`, and failed when reused without pre-created output directories. | mitigated 2026-07-12 | Keep `tests/test_pyjhora_compare_cli.py`; require explicit `--build-local`, safe argparse help, correct repo root, and directory creation inside `run_sample()`. |
|
||||
| ERR-050 | Prashna CLI/API/UI could synthesize or accept a non-question chart; legacy Tajika/Saham/Sphuta/Kunda paths also exposed approximate values as usable evidence. | mitigated 2026-07-12 | Require backend Swiss `PrashnaContext` with question text/time/location/timezone; reject client planets/ascendant. Block legacy Sphuta/Kunda/Gulika/Panchavargiya and no-location Saham paths; keep seven-planet Tajika interactions partial until named-yoga golden cases and formula parity exist. |
|
||||
| ERR-050 | Prashna CLI/API/UI could synthesize or accept a non-question chart; legacy Tajika/Saham/Sphuta/Kunda paths also exposed approximate values as usable evidence. | mitigated 2026-07-14 | Require backend Swiss `PrashnaContext` with question text/time/location/timezone; reject client planets/ascendant. The engine's deterministic fallback branch has been removed. Block legacy Sphuta/Kunda/Gulika/Panchavargiya and no-location Saham paths; keep seven-planet Tajika interactions partial until named-yoga golden cases and formula parity exist. |
|
||||
| ERR-051 | Privacy redaction can replace executable numeric test fixtures with bare placeholder identifiers such as `REDACTED_YEAR`, causing `NameError` before a regression reaches its target. | observed 2026-07-12 | Public tests must use generic fixtures (for example 1990) or quoted placeholders only; run `rg -n "REDACTED_YEAR" tests` before release and repair executable occurrences. |
|
||||
| ERR-052 | Text-only privacy scanning cannot distinguish a harmless quoted placeholder from a bare Python identifier that will fail at runtime. | mitigated 2026-07-13 | `public_release_privacy_scan.py` parses shipped Python files and rejects executable `REDACTED_*` names; keep the AST regression test. |
|
||||
| ERR-053 | A parity manifest could label an external engine `official_verified` without a raw artifact, hash, or calculation settings, making claimed oracle closure unverifiable. | mitigated 2026-07-13 | `three_engine_parity_replay_validator.py` requires raw artifact existence, SHA-256 and settings for verified/imported external engines; otherwise parity is `invalid`. |
|
||||
|
||||
@@ -5904,51 +5904,6 @@ def cmd_prashna(args):
|
||||
}
|
||||
return context
|
||||
|
||||
# Legacy fallback below is intentionally unreachable until removed after migration.
|
||||
try:
|
||||
from prashna import cast_prashna, calc_arudha, calc_sphutas, calc_life_sphutas, calc_sahams, analyze_lost_item, kunda_verify, calc_gulika_simple
|
||||
except ImportError:
|
||||
# 尝试从同目录导入
|
||||
import importlib.util, os
|
||||
spec = importlib.util.spec_from_file_location("prashna", os.path.join(os.path.dirname(__file__), "prashna.py"))
|
||||
prashna_mod = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(prashna_mod)
|
||||
cast_prashna = prashna_mod.cast_prashna
|
||||
calc_arudha = prashna_mod.calc_arudha
|
||||
calc_sphutas = prashna_mod.calc_sphutas
|
||||
calc_life_sphutas = prashna_mod.calc_life_sphutas
|
||||
calc_sahams = prashna_mod.calc_sahams
|
||||
analyze_lost_item = prashna_mod.analyze_lost_item
|
||||
kunda_verify = prashna_mod.kunda_verify
|
||||
calc_gulika_simple = prashna_mod.calc_gulika_simple
|
||||
|
||||
if args.mode == 'chart':
|
||||
return cast_prashna(args.datetime, args.lat, args.lon)
|
||||
|
||||
# 其他模式需要先铸盘获取行星位置
|
||||
chart = cast_prashna(args.datetime, args.lat, args.lon)
|
||||
if 'error' in chart:
|
||||
return chart
|
||||
|
||||
asc_lon = chart['ascendant']['lon']
|
||||
p_lons = {n: d['lon'] for n, d in chart['planets'].items()}
|
||||
|
||||
if args.mode == 'arudha':
|
||||
return {'arudha_lagna': calc_arudha(asc_lon, p_lons),
|
||||
'ascendant': chart['ascendant']}
|
||||
elif args.mode == 'sphutas':
|
||||
return calc_sphutas(p_lons, 0)
|
||||
elif args.mode == 'sahams':
|
||||
return calc_sahams(p_lons, asc_lon)
|
||||
elif args.mode == 'lost-item':
|
||||
return analyze_lost_item(p_lons, asc_lon)
|
||||
elif args.mode == 'life':
|
||||
return calc_life_sphutas(asc_lon, p_lons.get('Moon',0), p_lons.get('Sun',0), 0)
|
||||
elif args.mode == 'kunda':
|
||||
return kunda_verify(asc_lon)
|
||||
else:
|
||||
return cast_prashna(args.datetime, args.lat, args.lon)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Sudarshana Chakra (v6.9.14新增)
|
||||
|
||||
Reference in New Issue
Block a user