feat(tajika): annual strength layer uses the Tajika five-fold Panchavargiya (BUG-1222)
Product decision 2026-10-03: the annual Harsha / Panchavargiya strength layer's Panchavargiya column is the same `_calc_native_panchavargiya_bala` score the year-lord selection compares (BUG-1217): five components, score out of 20, labelled 「Tajika 五分力量」 / "Tajika five-fold strength". The unreachable dignity-proxy block is removed; Harsha Bala unchanged; the combined figure stays blocked (not ruled). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
11225171ee
commit
a6cf8f8f7a
+47
-67
@@ -533,12 +533,24 @@ def calc_tri_pataka(planet_lons: Dict[str, float],
|
||||
}
|
||||
|
||||
|
||||
TAJIKA_FIVE_FOLD_LABEL = 'Tajika 五分力量'
|
||||
TAJIKA_FIVE_FOLD_LABEL_EN = 'Tajika five-fold strength'
|
||||
|
||||
|
||||
def calc_tajika_strength_layers(
|
||||
planet_lons: Dict[str, float],
|
||||
asc_lon: float = 0.0,
|
||||
year_lord: Optional[str] = None,
|
||||
) -> Dict:
|
||||
"""Block the legacy private-Varga strength proxy pending parity evidence."""
|
||||
"""Annual Tajika strength: Harsha Bala and the Tajika five-fold Panchavargiya.
|
||||
|
||||
BUG-1222 (product 2026-10-03): the Panchavargiya column is the same
|
||||
Tajika five-fold strength the year-lord selection compares
|
||||
(``_calc_native_panchavargiya_bala``, BUG-1217): five components and a
|
||||
score out of 20 (raw out of 80 / 4). The D1/D2/D3/D9/D12 dignity proxy is
|
||||
no longer on this layer. Harsha Bala is unchanged. The combined
|
||||
Harsha + Panchavargiya figure has no ruling yet and stays blocked.
|
||||
"""
|
||||
normalized = {
|
||||
planet: float(planet_lons[planet]) % 360
|
||||
for planet in CLASSICAL_PLANETS
|
||||
@@ -548,19 +560,42 @@ def calc_tajika_strength_layers(
|
||||
planet: _calc_harsha_bala_for_planet(planet, lon, asc_lon, year_lord)
|
||||
for planet, lon in normalized.items()
|
||||
}
|
||||
panchavargiya_bala = {
|
||||
planet: {
|
||||
'status': 'blocked',
|
||||
'reason': 'unified_varga_core_and_golden_oracle_parity_required',
|
||||
native = _calc_native_panchavargiya_bala(normalized) if normalized else {}
|
||||
panchavargiya_bala = {}
|
||||
for planet in normalized:
|
||||
row = native.get(planet) or {}
|
||||
if row.get('status') != 'native_rule_backed':
|
||||
panchavargiya_bala[planet] = {
|
||||
'status': 'blocked',
|
||||
'reason': row.get('reason') or 'tajika_five_fold_panchavargiya_unavailable',
|
||||
'label': TAJIKA_FIVE_FOLD_LABEL,
|
||||
'label_en': TAJIKA_FIVE_FOLD_LABEL_EN,
|
||||
}
|
||||
continue
|
||||
panchavargiya_bala[planet] = {
|
||||
'status': 'usable',
|
||||
'engine': 'tajika_native_five_fold',
|
||||
'label': TAJIKA_FIVE_FOLD_LABEL,
|
||||
'label_en': TAJIKA_FIVE_FOLD_LABEL_EN,
|
||||
'score': row['score'],
|
||||
'max_score': 20.0,
|
||||
'raw_total': row['raw_total'],
|
||||
'raw_max_score': 80.0,
|
||||
'components': dict(row['components']),
|
||||
'component_trace': row['component_trace'],
|
||||
'rule_source': row['rule_source'],
|
||||
}
|
||||
for planet in normalized
|
||||
}
|
||||
panchavargiya_ready = bool(panchavargiya_bala) and all(
|
||||
row['status'] == 'usable' for row in panchavargiya_bala.values()
|
||||
)
|
||||
return {
|
||||
'status': 'partial',
|
||||
'method': 'Tajika Harsha/Panchavargiya Bala',
|
||||
'reason': 'panchavargiya_requires_unified_varga_core_and_golden_oracle_parity',
|
||||
'usable_layers': ['Harsha Bala'],
|
||||
'blocked_layers': ['Panchavargiya Bala', 'combined Tajika strength'],
|
||||
'panchavargiya_method': TAJIKA_FIVE_FOLD_LABEL,
|
||||
'panchavargiya_method_en': TAJIKA_FIVE_FOLD_LABEL_EN,
|
||||
'reason': 'combined_tajika_strength_not_ruled',
|
||||
'usable_layers': ['Harsha Bala'] + (['Panchavargiya Bala'] if panchavargiya_ready else []),
|
||||
'blocked_layers': ([] if panchavargiya_ready else ['Panchavargiya Bala']) + ['combined Tajika strength'],
|
||||
'available_planets': len(normalized),
|
||||
'harsha_bala': {
|
||||
planet: {**data, 'status': 'usable'}
|
||||
@@ -570,7 +605,7 @@ def calc_tajika_strength_layers(
|
||||
'combined_strength': {
|
||||
planet: {
|
||||
'status': 'blocked',
|
||||
'reason': 'panchavargiya_component_unverified',
|
||||
'reason': 'combined_tajika_strength_not_ruled',
|
||||
'score': harsha_bala[planet]['score'],
|
||||
'max_score': harsha_bala[planet]['max_score'],
|
||||
'grade': 'blocked',
|
||||
@@ -579,62 +614,7 @@ def calc_tajika_strength_layers(
|
||||
for planet in normalized
|
||||
},
|
||||
'summary': {
|
||||
'next_action': 'Import unified varga-full output and external golden-oracle evidence before rendering Tajika strength.',
|
||||
},
|
||||
}
|
||||
|
||||
# Legacy local Varga proxy retained below only for source history.
|
||||
normalized = {
|
||||
planet: float(planet_lons[planet]) % 360
|
||||
for planet in CLASSICAL_PLANETS
|
||||
if planet in planet_lons and _is_number(planet_lons[planet])
|
||||
}
|
||||
harsha_bala = {}
|
||||
panchavargiya_bala = {}
|
||||
combined_strength = {}
|
||||
|
||||
for planet, lon in normalized.items():
|
||||
harsha = _calc_harsha_bala_for_planet(planet, lon, asc_lon, year_lord)
|
||||
panchavargiya = _calc_panchavargiya_bala_for_planet(planet, lon)
|
||||
total = round(harsha['score'] + panchavargiya['score'], 2)
|
||||
max_score = harsha['max_score'] + panchavargiya['max_score']
|
||||
grade = _strength_grade(total, max_score)
|
||||
harsha_bala[planet] = harsha
|
||||
panchavargiya_bala[planet] = panchavargiya
|
||||
combined_strength[planet] = {
|
||||
'score': total,
|
||||
'max_score': max_score,
|
||||
'grade': grade,
|
||||
'components': {
|
||||
'harsha_bala': harsha['score'],
|
||||
'panchavargiya_bala': panchavargiya['score'],
|
||||
},
|
||||
'interpretation': _strength_interpretation(planet, grade),
|
||||
}
|
||||
|
||||
ranked = sorted(
|
||||
(
|
||||
{'planet': planet, **data}
|
||||
for planet, data in combined_strength.items()
|
||||
),
|
||||
key=lambda item: item['score'],
|
||||
reverse=True,
|
||||
)
|
||||
|
||||
return {
|
||||
'method': 'Tajika Harsha/Panchavargiya Bala',
|
||||
'source': '本地 Tajika 强度模型:Harsha Bala + Panchavargiya 五分盘尊贵度代理,用于年度盘证据链与用户端排序。',
|
||||
'available_planets': len(normalized),
|
||||
'year_lord': year_lord or '',
|
||||
'ascendant_longitude': round(float(asc_lon or 0) % 360, 4),
|
||||
'harsha_bala': harsha_bala,
|
||||
'panchavargiya_bala': panchavargiya_bala,
|
||||
'combined_strength': combined_strength,
|
||||
'summary': {
|
||||
'strongest_planets': ranked[:3],
|
||||
'weakest_planets': list(reversed(ranked[-3:])) if ranked else [],
|
||||
'headline': _strength_headline(ranked),
|
||||
'next_action': '用最强星解释年度可主动推进的主题,用最弱星标注需要 Dasha/Transit 二次确认的风险点。',
|
||||
'next_action': 'Read Harsha Bala and the Tajika five-fold Panchavargiya side by side; no combined Tajika strength until it is ruled.',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user