From 5cb3abcaefee907f538ba22648e6126bae2e28bb Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 10:51:05 +0800 Subject: [PATCH] feat(yoga): her 35 source evaluators and 131 upstream-only rule changes, with her card fields and blocked rows; the chart page reads card_status (BUG-2301) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DbBXp2U3BH1SxwAGyhhbe1 --- docs/BUG_HISTORY.md | 15 + frontend/src/lib/chart-view-insight.ts | 9 +- .../tests/chart-yoga-card-status-2301.test.ts | 39 + .../yoga_rules_retired_2026_09_24.json | 216 ++ references/yoga_rule_topics.v1.json | 639 ++-- references/yoga_rules.json | 2594 +++++++++++------ scripts/add_high_confidence_yogas_batch1.py | 10 +- scripts/report_render/yoga_status_words.py | 5 +- scripts/yoga_engine.py | 1688 ++++++++++- tests/test_handoff_2e5485f5_sync.py | 24 +- tests/test_neecha_bhanga_tautology_2027.py | 5 +- tests/test_report_english_dictionary.py | 6 +- tests/test_yoga_aputra_source.py | 37 + tests/test_yoga_card_promotion_gate.py | 34 + ...test_yoga_combustion_status_consistency.py | 31 + ...composite_missing_conditions_upstream58.py | 63 + tests/test_yoga_divisional_screen_coverage.py | 40 + tests/test_yoga_durmarana_source.py | 30 + tests/test_yoga_effect_gate_2300.py | 21 +- tests/test_yoga_evaluation_status_r3.py | 6 +- tests/test_yoga_family_source_geometry.py | 65 + tests/test_yoga_family_strength_qualifiers.py | 89 + tests/test_yoga_gaja_source_upstream58.py | 37 + tests/test_yoga_galakarna_partial.py | 67 + tests/test_yoga_input_status_preservation.py | 27 + tests/test_yoga_instances_gana_2075.py | 5 +- tests/test_yoga_kalpadruma_source.py | 42 + .../test_yoga_learning_expression_sources.py | 55 + tests/test_yoga_legacy_varga_proxy.py | 65 + tests/test_yoga_missing_geometry.py | 39 + ...st_yoga_moolatrikona_degrees_upstream58.py | 98 + tests/test_yoga_netranasa_source.py | 58 + tests/test_yoga_p0_2128.py | 5 +- .../test_yoga_parijatha_source_upstream58.py | 41 + tests/test_yoga_pisacha_source.py | 33 + tests/test_yoga_pvr_p144_wiring.py | 48 + tests/test_yoga_pvr_p145_wiring.py | 31 + tests/test_yoga_pvr_popular_wiring.py | 59 + tests/test_yoga_raja_bhanga_source.py | 46 + tests/test_yoga_raman_strength_qualified.py | 97 + .../test_yoga_remaining_strength_geometry.py | 74 + tests/test_yoga_retirement_and_witnesses.py | 76 + tests/test_yoga_reused_family_sources.py | 100 + tests/test_yoga_rule_batch_20261107.py | 14 +- tests/test_yoga_rule_semantics_regressions.py | 186 ++ tests/test_yoga_saarada_source.py | 30 + .../test_yoga_saraswathi_source_upstream58.py | 43 + tests/test_yoga_satkatha_source.py | 39 + tests/test_yoga_sirachcheda_source.py | 76 + tests/test_yoga_vidyut_source.py | 90 + tests/test_yoga_yuddha_source.py | 68 + 51 files changed, 6144 insertions(+), 1171 deletions(-) create mode 100644 frontend/tests/chart-yoga-card-status-2301.test.ts create mode 100644 references/archive/yoga_rules_retired_2026_09_24.json create mode 100644 tests/test_yoga_aputra_source.py create mode 100644 tests/test_yoga_card_promotion_gate.py create mode 100644 tests/test_yoga_combustion_status_consistency.py create mode 100644 tests/test_yoga_composite_missing_conditions_upstream58.py create mode 100644 tests/test_yoga_divisional_screen_coverage.py create mode 100644 tests/test_yoga_durmarana_source.py create mode 100644 tests/test_yoga_family_source_geometry.py create mode 100644 tests/test_yoga_family_strength_qualifiers.py create mode 100644 tests/test_yoga_gaja_source_upstream58.py create mode 100644 tests/test_yoga_galakarna_partial.py create mode 100644 tests/test_yoga_input_status_preservation.py create mode 100644 tests/test_yoga_kalpadruma_source.py create mode 100644 tests/test_yoga_learning_expression_sources.py create mode 100644 tests/test_yoga_legacy_varga_proxy.py create mode 100644 tests/test_yoga_missing_geometry.py create mode 100644 tests/test_yoga_moolatrikona_degrees_upstream58.py create mode 100644 tests/test_yoga_netranasa_source.py create mode 100644 tests/test_yoga_parijatha_source_upstream58.py create mode 100644 tests/test_yoga_pisacha_source.py create mode 100644 tests/test_yoga_pvr_p144_wiring.py create mode 100644 tests/test_yoga_pvr_p145_wiring.py create mode 100644 tests/test_yoga_pvr_popular_wiring.py create mode 100644 tests/test_yoga_raja_bhanga_source.py create mode 100644 tests/test_yoga_raman_strength_qualified.py create mode 100644 tests/test_yoga_remaining_strength_geometry.py create mode 100644 tests/test_yoga_retirement_and_witnesses.py create mode 100644 tests/test_yoga_reused_family_sources.py create mode 100644 tests/test_yoga_rule_semantics_regressions.py create mode 100644 tests/test_yoga_saarada_source.py create mode 100644 tests/test_yoga_saraswathi_source_upstream58.py create mode 100644 tests/test_yoga_satkatha_source.py create mode 100644 tests/test_yoga_sirachcheda_source.py create mode 100644 tests/test_yoga_vidyut_source.py create mode 100644 tests/test_yoga_yuddha_source.py diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index ae1ac726f..6ea97fa9e 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -31105,3 +31105,18 @@ - 同一变更里补齐 BUG-2298 / BUG-2299 带来的测试改动(原值 / 新值 / 原因写在测试里):失败规则在 `detect` 里留 blocked 行(`test_handoff_99076dad_sync`、`test_handoff_2e5485f5_sync`、`test_nabhasa_sign_modality`、`test_yoga_moolatrikona_degrees`、`test_yoga_gaja_source`、`test_yoga_evaluation_status_r3`);Raman 198 / 199 取法待核后作用移到 `traditional_effects`、报告作用格写闸门句子(`test_astrologer_rulings_166_batch2`、`test_astrologer_rulings_166c`、`test_report_reader_wording_2104`);缺来源定义的表达式抛 MissingYogaInput(`test_yoga_expr_compile_cache`)。 - 验证:新增 `tests/test_yoga_effect_gate_2300.py`(医疗参考行、取法待核行走过格局页中英两版、归档别名、写作事实、orchestrator,断言没有「麻风」「皮肤疾病」「Infidelity」等传统判词);格局相关 100 个测试文件(1,162 条)对照 f534131ad 基线(15 条原有失败):新失败 31 条全部来自 BUG-2298 / BUG-2299,已按上条更新,没有新失败留下。 - 修复版本:`claude/density-b3`。 + +## BUG-2301 | 占星师 58f37ee5b 的 35 个来源评估器和她改过的 131 条规则没有接进本站,65 条规则一直「未实现」 + +- 状态:fixed-pending-verify。 +- 现象:本站格局引擎没有她的 Raman / PVR 来源评估器(`reviewed_raman_geometry`、`raman_strength_qualified_geometry`、`learning_expression_raman`、`family_geometry_raman` 等 35 个),引用这些条件类型的 65 条规则在每张盘上都是「未实现」;她在 8c775cd0 之后只改过、本站没动过的 131 条规则(中文作用重写 116 条、定义 69 条、出处 34 条等)和新规则 `mridanga_raman_navamsa_chain` 没有同步;她的 `add_high_confidence_yogas_batch1.py` 已不写在用规则表,本站的仍会追加写入(BUG-2297 只改了另一个生成器)。 +- 修复(负责人批准改 yoga_engine.py;闸门 BUG-2299 和读法 BUG-2300 已先上): + - 她从 `_required_pattern_houses` 到 `_eval_neecha_bhanga` 的 34 个方法原样复制进 `YogaEngine`;`_eval_reviewed_raman_geometry` 用到的 `calc_arudha_sign` 在本站封存的 jaimini.py 里没有,把她的函数原样放进 yoga_engine(`_upstream_calc_arudha_sign`)。`_eval_semantic_condition` 取她的参与星记录和 PVR pp139–140 四星链(缺输入抛 MissingYogaInput),中文组合文字和「未知条件类型 = 未实现」保留本站的。自定义条件的 `participants_expr` 结果也写进她的 `bindings.planets`。 + - 被挡下作用的行照她的写法去掉 `effects_en` 键(原来是留空列表);每条本地匹配都写她的 `card_eligible: false`、`card_status: reference_only`;加载时就判为未实现的规则在 `detect` 里照她的写法留 blocked 行(调用方换了规则列表时不留)。 + - 公告的产品层:主检测器(BUG-1205/1206/1207,代替 reference_only 的 JSON 规则)只在用载入的完整规则表时附在 `detect` 结果后面;调用方换了规则列表时不附(她的测试按单条规则求值)。星盘页(`frontend/src/lib/chart-view-insight.ts`):原来 `card_eligible === false` 一律「暂无法判断」,现在只有 `card_status` 不是 `reference_only` 的才算;另把 `method_requires_review`、`combustion_requires_review`、`incomplete_conditions` 读作「暂无法判断」(燃烧的 Budha-Aditya 因此不再显示「成立」)。 + - 规则表:131 条只有她改过的规则取她的字段(英文作用 `effects_en` 等本站英文孪生字段不动,等负责人看样张,计划第 7 步);她的定义改了而中文模板未改的节点保留本站的 `combo_template_en`;加入 `mridanga_raman_navamsa_chain`(冻结主题表里没有,按冻结表规则记为 unmapped,冻结表不改)。英文孪生字段只做成对所需的最少改动:她新定义节点的 `description_zh` 配她规则级的 `combination_en`(53 条,写作 `description_en`);她清空中文作用的 5 条贫困格局英文作用也清空;中文作用条数变了的 2 条(bvr_sumukha_precise、bvr_bhratruvriddhi_precise)用她的 `effects_en`;新规则补一句英文作用;她两条新 accuracy_note 补英文。`references/yoga_rule_topics.v1.json` 用 build_yoga_rule_topics.py 重新生成(冻结表不变,新规则 unmapped)。`add_high_confidence_yogas_batch1.py` 换成她的版本(必须给 `--output`,拒绝写在用规则表);加入她的 `references/archive/yoga_rules_retired_2026_09_24.json`。 +- 影响(公开盘,本地 `cmd_yoga`):未实现规则 65 → 1(两张盘都只剩 reference_only 的 `bvr_maalavya_yoga`);Jobs 新成立 bvr_netranasa_yoga(医疗历史参考)、bvr_yuddha_marana_yoga(伤害历史参考)等,Obama 新成立 bvr_104_aputhra_yoga、bvr_khalwata_yoga(医疗)、bvr_asatyavadi_yoga(操守)等,传统作用都被闸门挡下;两张盘中英报告里没有这些规则的传统判词。本地排盘入口没有 D3 和 Maandi,用到它们的评估器给出「条件资料不全」。 +- 报告表:只在共识层出现、引擎行里没有的规则,`condition: not_available_yet` 是缺项状态键,不再当组合文字印出(`yoga_status_words.report_yoga_table`;Matrudeerghayur 在两张公开盘上走到这条路)。 +- 验证:加入她的 35 个测试文件(与本站同名的 4 个加 `_upstream58` 后缀),362 条里 317 条照原样通过,其余逐条跳过并写明原因(她的报告解释包、封存的 jyotish_engine、reference_only 主检测器、本站英文孪生字段、参与星固定顺序、Gajakesari 待核位置;`test_yoga_card_promotion_gate` 因完整规则表附带的主检测器行没有她的卡片字段而跳过,卡片字段改由 `test_yoga_effect_gate_2300` 检查);`test_yoga_p0_2128`(「非……保证」算否定)、`test_yoga_rule_batch_20261107`(结构观察 23 → 28)、`test_report_english_dictionary`(她的 summary_zh / description_zh 配对,legacy_* 记录不要求英文)、`test_yoga_evaluation_status_r3`(载入时未实现的规则在 detect 里留 blocked 行)、`test_neecha_bhanga_tautology_2027`(按 rule_id 认 Neecha 行,Netranasa 的出处说明提到 Neechamsa)按原值 / 新值 / 原因更新;`test_handoff_2e5485f5_sync`(65 → 2,见原值 / 新值 / 原因)、`test_yoga_instances_gana_2075`(34 → 32)更新;前端新增 `chart-yoga-card-status-2301.test.ts`。 +- 回归:格局相关 135 个测试文件(1,496 条)对照 f534131ad 基线,没有新失败(基线原有的 15 条失败仍在,与本批无关)。 +- 修复版本:`claude/density-b3`。 diff --git a/frontend/src/lib/chart-view-insight.ts b/frontend/src/lib/chart-view-insight.ts index f20f1594a..7143fe15e 100644 --- a/frontend/src/lib/chart-view-insight.ts +++ b/frontend/src/lib/chart-view-insight.ts @@ -214,12 +214,19 @@ const UNJUDGED_STATUS: Readonly> = { pending_review: "pending_review", method_pending: "pending_review", source_pending: "pending_review", + // BUG-2301: the engine's own gates (her detect status layer, upstream 58f37ee5b). + method_requires_review: "pending_review", + combustion_requires_review: "pending_review", + incomplete_conditions: "pending_review", }; function unjudgedReason(row: Record): YogaUnknownReason | null { const statuses = [text(row.formation_status), text(row.condition_status), text(record(row.formation_assessment)?.status)]; for (const status of statuses) if (status && UNJUDGED_STATUS[status]) return UNJUDGED_STATUS[status]; - if (row.card_eligible === false) return "pending_review"; + // BUG-2301 原值:card_eligible === false 一律「暂无法判断」/ 新值:只有 card_status 不是 reference_only 的 + // (blocked)才算;她的引擎给每条本地匹配都写 card_eligible=false、card_status=reference_only(不是结论卡), + // 这类行仍按自己的成立状态判断 / 原因:照上游 58f37ee5b 写全状态字段后,经典格局不因此全变成暂无法判断。 + if (row.card_eligible === false && row.card_status !== "reference_only") return "pending_review"; return null; } diff --git a/frontend/tests/chart-yoga-card-status-2301.test.ts b/frontend/tests/chart-yoga-card-status-2301.test.ts new file mode 100644 index 000000000..8375654e7 --- /dev/null +++ b/frontend/tests/chart-yoga-card-status-2301.test.ts @@ -0,0 +1,39 @@ +import assert from "node:assert/strict"; +import { test } from "node:test"; + +import { mapYogas } from "../src/lib/chart-view-insight.ts"; + +// BUG-2301: the yoga engine now writes her status fields on every local match (upstream 58f37ee5b): +// card_eligible=false, card_status=reference_only. A reference-only local match is still judged by its own +// formation status; a blocked row and the engine's own gates (method / combustion review, missing inputs) +// read 「暂无法判断」. +test("yoga: a reference-only local match keeps its verdict; gated and blocked rows are 暂无法判断", () => { + const yogas = mapYogas({ + result: { + rule_engine_yogas: [ + { rule_id: "gajakesari", planets: ["Moon", "Jupiter"], formation_status: "conditions_met", + card_eligible: false, card_status: "reference_only" }, + { rule_id: "budhaditya_yoga", planets: ["Sun", "Mercury"], formation_status: "combustion_requires_review", + condition_status: "combustion_requires_review", card_eligible: false, card_status: "reference_only" }, + ], + rule_engine_evaluation: { evaluation_status: "complete", evaluation_failures: [], unimplemented_rules: [] }, + }, + })!; + assert.deepEqual(yogas.formed.map((yoga) => yoga.id), ["gajakesari"]); + assert.deepEqual(yogas.unknown?.map((yoga) => [yoga.id, yoga.reason]), [["budhaaditya", "pending_review"]]); + const blocked = mapYogas({ + result: { + rule_engine_yogas: [{ rule_id: "gajakesari", planets: ["Moon", "Jupiter"], card_eligible: false, card_status: "blocked" }], + rule_engine_evaluation: { evaluation_status: "complete", evaluation_failures: [], unimplemented_rules: [] }, + }, + })!; + assert.deepEqual(blocked.unknown?.map((yoga) => [yoga.id, yoga.reason]), [["gajakesari", "pending_review"]]); + const pending = mapYogas({ + result: { + rule_engine_yogas: [{ rule_id: "gajakesari", planets: ["Moon", "Jupiter"], formation_status: "method_requires_review", + card_eligible: false, card_status: "reference_only" }], + rule_engine_evaluation: { evaluation_status: "complete", evaluation_failures: [], unimplemented_rules: [] }, + }, + })!; + assert.deepEqual(pending.unknown?.map((yoga) => [yoga.id, yoga.reason]), [["gajakesari", "pending_review"]]); +}); diff --git a/references/archive/yoga_rules_retired_2026_09_24.json b/references/archive/yoga_rules_retired_2026_09_24.json new file mode 100644 index 000000000..424ff36f5 --- /dev/null +++ b/references/archive/yoga_rules_retired_2026_09_24.json @@ -0,0 +1,216 @@ +{ + "schema": "jyotish.retired_yoga_rules.v1", + "runtime_enabled": false, + "retired_on": "2026-09-24", + "reason": "Superseded flanking/Nabhasa/Kalanidhi definitions and invalid generic Dala approximation. For historical inspection only.", + "rules": [ + { + "id": "voshi_yoga", + "name": "Voshi Yoga", + "name_cn": "太阳前瑜伽", + "source": "BPHS", + "bvr_id": "BVR-16", + "category": "surya", + "logic": { + "type": "custom", + "expr": "\nif 'Sun' not in ctx.planets:\n False\nelse:\n sun_h = house_of('Sun')\n h12 = ((sun_h - 1 + 11) % 12) + 1\n planets_in_h12 = [p for p, info in ctx.planets.items() if info.get('house') == h12]\n h2 = ((sun_h - 1 + 1) % 12) + 1\n planets_in_h2 = [p for p, info in ctx.planets.items() if info.get('house') == h2]\n planets_in_h12 and not planets_in_h2\n", + "combo_template": "行星在太阳第12宫" + }, + "effects": [ + "口才出众", + "善于表达", + "受人尊敬" + ], + "strength": "中", + "enabled": true + }, + { + "id": "veshi_yoga", + "name": "Veshi Yoga", + "name_cn": "太阳后瑜伽", + "source": "BPHS", + "bvr_id": "BVR-17", + "category": "surya", + "logic": { + "type": "custom", + "expr": "\nif 'Sun' not in ctx.planets:\n False\nelse:\n sun_h = house_of('Sun')\n h12 = ((sun_h - 1 + 11) % 12) + 1\n planets_in_h12 = [p for p, info in ctx.planets.items() if info.get('house') == h12]\n h2 = ((sun_h - 1 + 1) % 12) + 1\n planets_in_h2 = [p for p, info in ctx.planets.items() if info.get('house') == h2]\n planets_in_h2 and not planets_in_h12\n", + "combo_template": "行星在太阳第2宫" + }, + "effects": [ + "财富充裕", + "生活舒适", + "性情愉快" + ], + "strength": "中", + "enabled": true, + "source_reference": "BVR-16: Planet(s) other than Moon in 2nd from Sun", + "bvr_chapter": "Chapter 2" + }, + { + "id": "ubhayachari_yoga", + "name": "Ubhayachari Yoga", + "name_cn": "太阳双夹瑜伽", + "source": "BPHS", + "bvr_id": "BVR-18", + "category": "surya", + "logic": { + "type": "custom", + "expr": "\nif 'Sun' not in ctx.planets:\n False\nelse:\n sun_h = house_of('Sun')\n h12 = ((sun_h - 1 + 11) % 12) + 1\n planets_in_h12 = [p for p, info in ctx.planets.items() if info.get('house') == h12]\n h2 = ((sun_h - 1 + 1) % 12) + 1\n planets_in_h2 = [p for p, info in ctx.planets.items() if info.get('house') == h2]\n bool(planets_in_h2 and planets_in_h12)\n", + "combo_template": "太阳两侧均有行星" + }, + "effects": [ + "性格坚毅", + "口才与财富兼备", + "受人爱戴" + ], + "strength": "强", + "enabled": true, + "source_reference": "BVR-18: Planets in 2nd and 12th from Moon", + "bvr_chapter": "Chapter 2" + }, + { + "id": "anapha_yoga", + "name": "Anapha Yoga", + "name_cn": "月后瑜伽", + "source": "BPHS", + "bvr_id": "BVR-3", + "category": "chandra", + "logic": { + "type": "custom", + "expr": "\nif 'Moon' not in ctx.planets:\n False\nelse:\n moon_h = house_of('Moon')\n h12 = ((moon_h - 1 + 11) % 12) + 1\n p_in_h12 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h12]\n h2 = ((moon_h - 1 + 1) % 12) + 1\n p_in_h2 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h2]\n p_in_h12 and not p_in_h2\n", + "combo_template": "行星在月亮第12宫" + }, + "effects": [ + "体格健壮", + "名声良好", + "品德高尚" + ], + "strength": "中", + "enabled": false, + "accuracy_note": "Disabled: superseded by bvr_003_anapha_precise. The 'not p_in_h2' restriction causes false negatives in Duradhara cases per BPHS." + }, + { + "id": "sunapha_yoga", + "name": "Sunapha Yoga", + "name_cn": "月前瑜伽", + "source": "BPHS", + "bvr_id": "BVR-2", + "category": "chandra", + "logic": { + "type": "custom", + "expr": "\nif 'Moon' not in ctx.planets:\n False\nelse:\n moon_h = house_of('Moon')\n h12 = ((moon_h - 1 + 11) % 12) + 1\n p_in_h12 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h12]\n h2 = ((moon_h - 1 + 1) % 12) + 1\n p_in_h2 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h2]\n p_in_h2 and not p_in_h12\n", + "combo_template": "行星在月亮第2宫" + }, + "effects": [ + "自力更生", + "财富充裕", + "受人尊敬" + ], + "strength": "中", + "enabled": true, + "source_reference": "BVR-2: Planet(s) other than Sun in 2nd from Moon", + "bvr_chapter": "Chapter 1" + }, + { + "id": "durudhura_yoga", + "name": "Durudhura Yoga", + "name_cn": "月双夹瑜伽", + "source": "BPHS", + "bvr_id": "BVR-4", + "category": "chandra", + "logic": { + "type": "custom", + "expr": "\nif 'Moon' not in ctx.planets:\n False\nelse:\n moon_h = house_of('Moon')\n h12 = ((moon_h - 1 + 11) % 12) + 1\n p_in_h12 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h12]\n h2 = ((moon_h - 1 + 1) % 12) + 1\n p_in_h2 = [p for p, info in ctx.planets.items() if p != 'Moon' and info.get('house') == h2]\n bool(p_in_h2 and p_in_h12)\n", + "combo_template": "月亮两侧均有行星" + }, + "effects": [ + "享受丰富", + "善于辞令", + "性格坚定" + ], + "strength": "强", + "enabled": true, + "source_reference": "BVR-4: Planets in both 2nd and 12th from Moon", + "bvr_chapter": "Chapter 1" + }, + { + "id": "dala_yoga", + "name": "Dala Yoga", + "name_cn": "分叶格局", + "source": "BPHS", + "bvr_id": null, + "category": "nabhasa", + "logic": { + "type": "custom", + "expr": "\ndala_count = sum(1 for dh in [6, 8, 12] if lord(dh) in ctx.planets and kendra(house_of(lord(dh))))\ndala_count >= 2\n", + "combo_template": "凶宫主在角宫" + }, + "effects": [ + "逆境中崛起", + "转化能力" + ], + "strength": "强", + "enabled": false, + "accuracy_note": "Invalid dusthana-lord approximation of Dala removed; retain explicit Maalaa/Sarpa Nabhasa rules." + }, + { + "id": "kalanidhi_yoga", + "name": "Kalanidhi Yoga", + "name_cn": "艺藏格局", + "source": "BPHS", + "bvr_id": null, + "category": "special", + "logic": { + "type": "custom", + "expr": "\nif 'Jupiter' not in ctx.planets or house_of('Jupiter') not in [2, 5]:\n False\nelse:\n jh = house_of('Jupiter')\n assoc = [p for p in ['Venus', 'Mercury'] if p in ctx.planets and (house_of(p) == jh or abs(house_of(p) - jh) in [3, 6, 9])]\n bool(assoc)\n", + "combo_template": "木星在2/5宫+被金星/水星关联" + }, + "effects": [ + "艺术才华", + "学识渊博", + "受人尊敬" + ], + "strength": "强", + "enabled": true + }, + { + "id": "chakra_nabhasa", + "name": "Chakra Nabhasa Yoga", + "name_cn": "轮盘天象瑜伽", + "source": "BPHS", + "bvr_id": "NB-21", + "category": "nabhasa", + "enabled": true, + "strength": "强", + "effects": [ + "全方位成功", + "四通八达" + ], + "logic": { + "type": "custom", + "expr": "len(set(ctx.house_of(p) for p in ctx.planets if ctx.house_of(p) and ctx.house_of(p) in [1,4,7,10]))>=3", + "combo_template": "行星集中在角宫(Chakra 轮盘)" + } + }, + { + "id": "vajra_nabhasa", + "name": "Vajra Nabhasa Yoga", + "name_cn": "金刚天象瑜伽", + "source": "BPHS", + "bvr_id": "NB-24", + "category": "nabhasa", + "enabled": true, + "strength": "强", + "effects": [ + "坚不可摧的成功", + "强大意志力" + ], + "logic": { + "type": "custom", + "expr": "len(set(ctx.house_of(p) for p in ctx.planets if ctx.house_of(p) and ctx.house_of(p) in [4,8,12]))>=3", + "combo_template": "行星集中在特定宫位(Vajra 金刚)" + } + } + ], + "retired_fallback_source": " def _detect_solar_lunar_yogas(self, ctx: YogaContext) -> List[Dict]:\n \"\"\"\n 检测 Solar Yogas (Veshi/Voshi/Ubhayachari) 和 Lunar Yogas (Sunapha/Anapha/Durudhura/Kemadruma)。\n \n 来源:从 dangling commit f19369c 恢复的失散代码(原在 jyotish_engine.py cmd_yoga 中)。\n 算法:基于行星相对于太阳/月亮的位置,非规则 JSON 可表达的。\n \"\"\"\n results = []\n p = ctx.planets\n planets_in_house = {} # house_num -> [planet_names]\n # 如果度数是浮点,尝试排序\n sun_house = None\n moon_house = None\n for pname, pinfo in p.items():\n h = pinfo.get(\"house\")\n # 计算行星实际度数\n if h is not None:\n planets_in_house.setdefault(h, []).append(pname)\n if pname == \"Sun\":\n sun_house = h\n elif pname == \"Moon\":\n moon_house = h\n\n # Solar Yogas\n if sun_house is not None:\n h2 = ((sun_house - 1 + 1) % 12) + 1 # 太阳第2宫\n h12 = ((sun_house - 1 + 11) % 12) + 1 # 太阳第12宫\n p_in_h2 = [n for n in planets_in_house.get(h2, []) if n != \"Sun\"]\n p_in_h12 = [n for n in planets_in_house.get(h12, []) if n != \"Sun\"]\n if p_in_h12 and not p_in_h2:\n results.append({\"name\": \"Voshi Yoga\", \"name_cn\": \"太阳前瑜伽\",\n \"combination\": f\"{'+'.join(p_in_h12)}在太阳第12宫\",\n \"effects\": [\"口才出众\", \"善于表达\", \"受人尊敬\", \"知识渊博\"],\n \"strength\": \"中\", \"category\": \"solar_yoga\", \"source\": \"Parashara\"})\n if p_in_h2 and not p_in_h12:\n results.append({\"name\": \"Veshi Yoga\", \"name_cn\": \"太阳后瑜伽\",\n \"combination\": f\"{'+'.join(p_in_h2)}在太阳第2宫\",\n \"effects\": [\"财富充裕\", \"生活舒适\", \"性情愉快\", \"人缘好\"],\n \"strength\": \"中\", \"category\": \"solar_yoga\", \"source\": \"Parashara\"})\n if p_in_h2 and p_in_h12:\n results.append({\"name\": \"Ubhayachari Yoga\", \"name_cn\": \"太阳双夹瑜伽\",\n \"combination\": \"太阳两侧均有行星\",\n \"effects\": [\"性格坚毅\", \"口才与财富兼备\", \"受人爱戴\", \"社会影响力\"],\n \"strength\": \"强\", \"category\": \"solar_yoga\", \"source\": \"Parashara\"})\n\n # Lunar Yogas\n if moon_house is not None:\n h2 = ((moon_house - 1 + 1) % 12) + 1 # 月亮第2宫\n h12 = ((moon_house - 1 + 11) % 12) + 1 # 月亮第12宫\n p_in_h2 = [n for n in planets_in_house.get(h2, []) if n != \"Moon\"]\n p_in_h12 = [n for n in planets_in_house.get(h12, []) if n != \"Moon\"]\n if p_in_h12 and not p_in_h2:\n results.append({\"name\": \"Anapha Yoga\", \"name_cn\": \"月后瑜伽\",\n \"combination\": f\"{'+'.join(p_in_h12)}在月亮第12宫\",\n \"effects\": [\"体格健壮\", \"名声良好\", \"品德高尚\", \"行业领袖\"],\n \"strength\": \"中\", \"category\": \"lunar_yoga\", \"source\": \"Parashara\"})\n if p_in_h2 and not p_in_h12:\n results.append({\"name\": \"Sunapha Yoga\", \"name_cn\": \"月前瑜伽\",\n \"combination\": f\"{'+'.join(p_in_h2)}在月亮第2宫\",\n \"effects\": [\"自力更生\", \"财富充裕\", \"受人尊敬\", \"生活富足\"],\n \"strength\": \"中\", \"category\": \"lunar_yoga\", \"source\": \"Parashara\"})\n if p_in_h2 and p_in_h12:\n results.append({\"name\": \"Durudhura Yoga\", \"name_cn\": \"月双夹瑜伽\",\n \"combination\": \"月亮两侧均有行星\",\n \"effects\": [\"享受丰富\", \"善于辞令\", \"性格坚定\", \"多元才华\"],\n \"strength\": \"强\", \"category\": \"lunar_yoga\", \"source\": \"Parashara\"})\n\n return results\n\n # ------------------------------------------------------------------------\n # 规则级评估\n # ------------------------------------------------------------------------\n" +} diff --git a/references/yoga_rule_topics.v1.json b/references/yoga_rule_topics.v1.json index f187f5852..8405d6717 100644 --- a/references/yoga_rule_topics.v1.json +++ b/references/yoga_rule_topics.v1.json @@ -2,7 +2,7 @@ "schema": "yoga-rule-topics-v1", "status": "pending_astrologer_review", "built_from": "references/yoga_rules.json", - "built_from_sha256": "c8932f08d8ab", + "built_from_sha256": "8d626a13ad58", "builder": "scripts/research/build_yoga_rule_topics.py", "rule": "Topics come from references/yoga_rule_topics.frozen.json (BUG-2218); a keyword match on the rule's own effect text is only a keyword_proposal. unmapped = no snapshot topic (待映射, never dropped). longevity, fame_authority and spirituality are recorded for review; no chat domain selects by them.", "rules": { @@ -856,11 +856,11 @@ "category": "raja", "topics": [], "matched_words": {}, - "basis_text": "Courage, wisdom, leadership, military success | Courage, wisdom, leadership, military success", + "basis_text": "Courage, wisdom, leadership, military success | 既有规则的传统描述(非个人事实或结果保证):勇气、智慧、领导与军事成就", "mapping": "unmapped" }, "bvr_104_aputhra_yoga": { - "name": "Aputhra Yoga", + "name": "Aputra Yoga", "category": "putra", "topics": [ "children" @@ -868,10 +868,12 @@ "matched_words": { "children": [ "childlessness", - "progeny" + "progeny", + "子女", + "生育" ] }, - "basis_text": "Complete childlessness, no progeny | Complete childlessness, no progeny", + "basis_text": "Complete childlessness, no progeny | 既有规则的传统描述(非个人事实或结果保证):没有子女或后代;不能据此确定生育结果", "mapping": "frozen" }, "bvr_105_chandra_mangala_yoga": { @@ -1012,10 +1014,11 @@ "matched_words": { "spirituality": [ "liberation", - "spiritual" + "spiritual", + "解脱" ] }, - "basis_text": "Divine nature, great yogic powers, spiritual liberation | Divine nature, great yogic powers, spiritual liberation", + "basis_text": "Divine nature, great yogic powers, spiritual liberation | 既有规则的传统描述(非个人事实或结果保证):神圣倾向、瑜伽修持能力与精神解脱", "mapping": "frozen" }, "bvr_anapathya_yoga": { @@ -1027,10 +1030,11 @@ "matched_words": { "children": [ "Childlessness", - "progeny" + "progeny", + "子女" ] }, - "basis_text": "Childlessness, lack of progeny | Childlessness, lack of progeny", + "basis_text": "Childlessness, lack of progeny | 既有规则的传统描述(非个人事实或结果保证):无子女或缺少后代", "mapping": "frozen" }, "bvr_angaheena_yoga": { @@ -1038,7 +1042,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Physical deficiency or disability in limbs | Physical deficiency or disability in limbs", + "basis_text": "Physical deficiency or disability in limbs | 既有规则的传统描述(非个人事实或结果保证):肢体缺损或残障", "mapping": "unmapped" }, "bvr_annadana_yoga": { @@ -1046,7 +1050,7 @@ "category": "dhana", "topics": [], "matched_words": {}, - "basis_text": "Generous, feeds others, charitable, abundance of food | Generous, feeds others, charitable, abundance of food", + "basis_text": "Generous, feeds others, charitable, abundance of food | 既有规则的传统描述(非个人事实或结果保证):慷慨、施食、慈善与食物充裕", "mapping": "unmapped" }, "bvr_annadana_yoga_from_planet_posi": { @@ -1062,8 +1066,11 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Not yet documented | 待补充", - "mapping": "unmapped" + "basis_text": "Not yet documented | 原书关联名誉受损主题;仅为传统参考,不据结构认定实际名誉或未来事件。", + "mapping": "unmapped", + "keyword_proposal": [ + "fame_authority" + ] }, "bvr_ardha_chandra_yoga": { "name": "Ardha Chandra Yoga", @@ -1073,10 +1080,12 @@ ], "matched_words": { "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Commanding appearance, leadership, wealth | Commanding appearance, leadership, wealth", + "basis_text": "Commanding appearance, leadership, wealth | 既有规则的传统描述(非个人事实或结果保证):有威仪的外表、领导与财富", "mapping": "frozen" }, "bvr_asatyavadi_yoga": { @@ -1084,7 +1093,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Untruthful, deceptive, cunning nature | Untruthful, deceptive, cunning nature", + "basis_text": "Untruthful, deceptive, cunning nature | 既有规则的传统描述(非个人事实或结果保证):不实言语、欺骗与机巧", "mapping": "unmapped" }, "bvr_asubha_yoga": { @@ -1092,8 +1101,11 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Inauspicious life, difficulties, physical/mental troubles | Inauspicious life, difficulties, physical/mental troubles", - "mapping": "unmapped" + "basis_text": "Inauspicious life, difficulties, physical/mental troubles | 原文包含欲望、道德及他人财富的历史断语;位置结构不能确认个人道德或行为事实。", + "mapping": "unmapped", + "keyword_proposal": [ + "wealth" + ] }, "bvr_ayatna_griha_prapta_yoga": { "name": "Ayatna Griha Prapta Yoga", @@ -1106,7 +1118,7 @@ "Gains" ] }, - "basis_text": "Gains property without effort, inherits house | Gains property without effort, inherits house", + "basis_text": "Gains property without effort, inherits house | 既有规则的传统描述(非个人事实或结果保证):不费力获得房产或继承住宅", "mapping": "frozen" }, "bvr_ayatnadhanalabha_yoga": { @@ -1118,10 +1130,13 @@ "matched_words": { "wealth": [ "Gains", - "wealth" + "wealth", + "富", + "收入", + "财" ] }, - "basis_text": "Gains wealth without much effort, inherited wealth | Gains wealth without much effort, inherited wealth", + "basis_text": "Gains wealth without much effort, inherited wealth | 传统描述为获得财富较为顺遂;此条原文未指定继承,不能保证实际收入。", "mapping": "frozen" }, "bvr_bahu_puthra_precise": { @@ -1144,7 +1159,7 @@ "category": "kalatra", "topics": [], "matched_words": {}, - "basis_text": "Association with many women | Association with many women", + "basis_text": "Association with many women | 既有规则的传统描述(非个人事实或结果保证):与多位女性交往", "mapping": "unmapped" }, "bvr_bahudravyarjana_yoga": { @@ -1155,10 +1170,12 @@ ], "matched_words": { "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Accumulates great wealth from multiple sources | Accumulates great wealth from multiple sources", + "basis_text": "Accumulates great wealth from multiple sources | 既有规则的传统描述(非个人事实或结果保证):从多种来源积累财富", "mapping": "frozen" }, "bvr_bandhu_pujya_yoga": { @@ -1179,10 +1196,11 @@ "honored" ], "family": [ - "relatives" + "relatives", + "亲属" ] }, - "basis_text": "Respected and honored by relatives | Respected and honored by relatives", + "basis_text": "Respected and honored by relatives | 既有规则的传统描述(非个人事实或结果保证):受到亲属尊重与礼遇", "mapping": "frozen" }, "bvr_bandhubhisthyaktha_precise": { @@ -1213,7 +1231,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Great fortune, luck, divine grace | Great fortune, luck, divine grace", + "basis_text": "Great fortune, luck, divine grace | 既有规则的传统描述(非个人事实或结果保证):好运、机遇与神恩", "mapping": "unmapped" }, "bvr_bhaarathi_yoga": { @@ -1226,13 +1244,17 @@ "matched_words": { "education": [ "Learned", - "knowledge" + "knowledge", + "学", + "知识" ], "wealth": [ - "wealthy" + "wealthy", + "富", + "财" ] }, - "basis_text": "Learned, eloquent, wealthy from knowledge | Learned, eloquent, wealthy from knowledge", + "basis_text": "Learned, eloquent, wealthy from knowledge | 既有规则的传统描述(非个人事实或结果保证):学识、口才与凭知识取得财富", "mapping": "frozen" }, "bvr_bhaaskara_yoga": { @@ -1244,13 +1266,15 @@ ], "matched_words": { "education": [ - "learned" + "learned", + "学" ], "wealth": [ - "Affluent" + "Affluent", + "富" ] }, - "basis_text": "Affluent, brave, learned, skilled in arithmetic and music | Affluent, brave, learned, skilled in arithmetic and music", + "basis_text": "Affluent, brave, learned, skilled in arithmetic and music | 既有规则的传统描述(非个人事实或结果保证):富裕、勇敢、有学识,擅长算术与音乐", "mapping": "frozen" }, "bvr_bhaga_chumbana_yoga": { @@ -1258,7 +1282,7 @@ "category": "kalatra", "topics": [], "matched_words": {}, - "basis_text": "Excessive sensuality, libidinous nature | Excessive sensuality, libidinous nature", + "basis_text": "Excessive sensuality, libidinous nature | 既有规则的传统描述(非个人事实或结果保证):感官欲望或性欲较强", "mapping": "unmapped" }, "bvr_bhagya_malika": { @@ -1291,10 +1315,12 @@ "matched_words": { "marriage": [ "marriage", - "spouse" + "spouse", + "婚", + "配偶" ] }, - "basis_text": "Infidelity in marriage, spouse's questionable conduct | Infidelity in marriage, spouse's questionable conduct", + "basis_text": "Infidelity in marriage, spouse's questionable conduct | 既有规则的传统描述(非个人事实或结果保证):婚姻不忠或对配偶行为的质疑", "mapping": "frozen" }, "bvr_bhojana_soukhya_yoga": { @@ -1302,7 +1328,7 @@ "category": "dhana", "topics": [], "matched_words": {}, - "basis_text": "Enjoyment of food, pleasure in dining, hospitality | Enjoyment of food, pleasure in dining, hospitality", + "basis_text": "Enjoyment of food, pleasure in dining, hospitality | 既有规则的传统描述(非个人事实或结果保证):享受饮食、用餐乐趣与款待他人", "mapping": "unmapped" }, "bvr_bhraathru_saapa_sutakshaya_yog": { @@ -1338,13 +1364,17 @@ }, "matched_words": { "family": [ - "siblings" + "siblings", + "兄弟", + "姐妹" ], "wealth": [ - "Wealth" + "Wealth", + "富", + "财" ] }, - "basis_text": "Wealth through siblings | Wealth through siblings", + "basis_text": "Wealth through siblings | 既有规则的传统描述(非个人事实或结果保证):通过兄弟姐妹获得财富", "mapping": "frozen" }, "bvr_bhratruvriddhi_precise": { @@ -1360,12 +1390,16 @@ }, "matched_words": { "family": [ - "siblings", - "兄弟" + "sibling", + "siblings" ] }, - "basis_text": "Harmony among siblings | Help from siblings | Close bond with siblings | 兄弟和睦 | 兄弟助力 | 手足情深", - "mapping": "frozen" + "basis_text": "The traditional theme is benefit through prospering siblings; neither sibling existence nor actual relations are established by this candidate. | 传统主题为手足发展带来的支持;当前方法不完整,不能据此确认手足存在、关系或兴旺", + "mapping": "frozen", + "keyword_proposal": [ + "family", + "wealth" + ] }, "bvr_buddhi_jada_yoga": { "name": "Buddhi Jada Yoga", @@ -1375,10 +1409,11 @@ ], "matched_words": { "education": [ - "learning" + "learning", + "学" ] }, - "basis_text": "Dull intellect, slow learning, mental challenges | Dull intellect, slow learning, mental challenges", + "basis_text": "Dull intellect, slow learning, mental challenges | 既有规则的传统描述(非个人事实或结果保证):理解迟缓、学习缓慢与认知困难", "mapping": "frozen" }, "bvr_buddhimaturya_yoga": { @@ -1386,7 +1421,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Mature intelligence, wise beyond years, good judgment | Mature intelligence, wise beyond years, good judgment", + "basis_text": "Mature intelligence, wise beyond years, good judgment | 既有规则的传统描述(非个人事实或结果保证):心智成熟、超越年龄的见识与判断力", "mapping": "unmapped" }, "bvr_budha_aaditya_yoga": { @@ -1412,7 +1447,7 @@ "honored" ] }, - "basis_text": "Great fame, honored by kings, eloquent | Great fame, honored by kings, eloquent", + "basis_text": "Great fame, honored by kings, eloquent | 既有规则的传统描述(非个人事实或结果保证):声誉、统治者的礼遇与口才", "mapping": "frozen" }, "bvr_chakra_yoga": { @@ -1428,7 +1463,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Fierce, victorious, destroys enemies | Fierce, victorious, destroys enemies", + "basis_text": "Fierce, victorious, destroys enemies | 既有规则的传统描述(非个人事实或结果保证):强悍、获胜与击败对手", "mapping": "unmapped" }, "bvr_chapa_yoga": { @@ -1452,10 +1487,12 @@ ], "matched_words": { "wealth": [ - "wealthy" + "wealthy", + "富", + "财" ] }, - "basis_text": "Leader, wealthy, charitable | Leader, wealthy, charitable", + "basis_text": "Leader, wealthy, charitable | 既有规则的传统描述(非个人事实或结果保证):领导、财富与慈善", "mapping": "frozen" }, "bvr_dama_yoga": { @@ -1475,10 +1512,12 @@ "matched_words": { "children": [ "child", - "childless" + "childless", + "子女", + "生育" ] }, - "basis_text": "Adoption of a child, childless by own birth | Adoption of a child, childless by own birth", + "basis_text": "Adoption of a child, childless by own birth | 传统收养主题;不能据此认定生育能力、亲生子女数量或实际收养经历", "mapping": "frozen" }, "bvr_dehasthoulya_yoga": { @@ -1486,7 +1525,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Stout/heavy body, obesity tendency | Stout/heavy body, obesity tendency", + "basis_text": "Stout/heavy body, obesity tendency | 既有规则的传统描述(非个人事实或结果保证):体型壮实、体重较大或肥胖倾向", "mapping": "unmapped" }, "bvr_devendra_yoga": { @@ -1551,17 +1590,24 @@ ], "matched_words": { "fame_authority": [ - "respected" + "respected", + "地位" ], "spirituality": [ - "spiritual" + "spiritual", + "宗教" ] }, - "basis_text": "Charitable, respected spiritual leader, generous | Charitable, respected spiritual leader, generous", - "mapping": "frozen" + "basis_text": "Charitable, respected spiritual leader, generous | 传统上与慷慨、施予主题相关;不能据此确定现实品德、财富或宗教地位", + "mapping": "frozen", + "keyword_proposal": [ + "fame_authority", + "spirituality", + "wealth" + ] }, "bvr_dhur_yoga": { - "name": "Dhur Yoga", + "name": "Duryoga", "category": "special", "topics": [ "career" @@ -1569,10 +1615,12 @@ "matched_words": { "career": [ "career", - "profession" + "profession", + "事业", + "职业" ] }, - "basis_text": "Obstacles to career, difficulties in profession | Obstacles to career, difficulties in profession", + "basis_text": "Obstacles to career, difficulties in profession | 既有规则的传统描述(非个人事实或结果保证):事业障碍与职业困难", "mapping": "frozen" }, "bvr_dhurmarana_yoga": { @@ -1586,7 +1634,7 @@ "accidents" ] }, - "basis_text": "Unnatural or violent death, danger from accidents | Unnatural or violent death, danger from accidents", + "basis_text": "Unnatural or violent death, danger from accidents | 既有规则的传统描述(非个人事实或结果保证):非自然或暴力死亡、意外危险;不能据此预测死亡方式", "mapping": "frozen" }, "bvr_durmarana_yoga": { @@ -1594,7 +1642,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Unnatural death, violent end | Unnatural death, violent end", + "basis_text": "Unnatural death, violent end | 既有规则的传统描述(非个人事实或结果保证):非自然或暴力死亡;不能据此预测死亡方式", "mapping": "unmapped" }, "bvr_durmukha_yoga": { @@ -1634,10 +1682,12 @@ "matched_words": { "family": [ "family", - "siblings" + "siblings", + "亲属", + "家庭" ] }, - "basis_text": "Twelve siblings, large family | Twelve siblings, large family", + "basis_text": "Twelve siblings, large family | 既有规则的传统描述(非个人事实或结果保证):十二位手足与大家庭;不能据此确认亲属人数", "mapping": "frozen" }, "bvr_eka_puthra_precise": { @@ -1669,10 +1719,12 @@ "matched_words": { "family": [ "sister", - "sisters" + "sisters", + "亲属", + "姐妹" ] }, - "basis_text": "Only one sister, or loss of sisters | Only one sister, or loss of sisters", + "basis_text": "Only one sister, or loss of sisters | 传统描述指向一位姐妹;亲属人数不能仅凭此配置确认,原文另有强弱修饰条件。", "mapping": "frozen" }, "bvr_gaja_yoga": { @@ -1702,15 +1754,18 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Ear problems, hearing issues, tinnitus | Ear problems, hearing issues, tinnitus", - "mapping": "unmapped" + "basis_text": "Ear problems, hearing issues, tinnitus | 既有规则的传统描述(非个人事实或结果保证):耳部问题、听力问题与耳鸣;不是医学诊断", + "mapping": "unmapped", + "keyword_proposal": [ + "education" + ] }, "bvr_gandharva_yoga": { "name": "Gandharva Yoga", "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Gifted in music, dance, arts; charming personality | Gifted in music, dance, arts; charming personality", + "basis_text": "Gifted in music, dance, arts; charming personality | 既有规则的传统描述(非个人事实或结果保证):音乐、舞蹈与艺术才能,以及吸引力", "mapping": "unmapped" }, "bvr_garuda_yoga": { @@ -1724,8 +1779,12 @@ "Long-lived" ] }, - "basis_text": "Long-lived, powerful, commands fear and respect | Long-lived, powerful, commands fear and respect", - "mapping": "frozen" + "basis_text": "Long-lived, powerful, commands fear and respect | 传统主题包括言语修养与受人尊重。原书对34岁中毒危险的依据提出疑问,此配置不能据此推出年龄、疾病或危险事件。", + "mapping": "frozen", + "keyword_proposal": [ + "health", + "longevity" + ] }, "bvr_gouri_yoga": { "name": "Gouri Yoga", @@ -1740,10 +1799,12 @@ "honors" ], "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Royal honors, wealth, fame, virtuous | Royal honors, wealth, fame, virtuous", + "basis_text": "Royal honors, wealth, fame, virtuous | 既有规则的传统描述(非个人事实或结果保证):统治者礼遇、财富、声誉与德行", "mapping": "frozen" }, "bvr_grihanasa_yoga": { @@ -1751,7 +1812,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Loss or destruction of property/house | Loss or destruction of property/house", + "basis_text": "Loss or destruction of property/house | 既有规则的传统描述(非个人事实或结果保证):房产或住宅损失、毁坏", "mapping": "unmapped" }, "bvr_grihanasa_yoga_planet_position": { @@ -1759,7 +1820,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Loss or destruction of property/house | Loss or destruction of property/house", + "basis_text": "Loss or destruction of property/house | 既有规则的传统描述(非个人事实或结果保证):房产或住宅损失、毁坏", "mapping": "unmapped" }, "bvr_guhyaroga_yoga": { @@ -1770,11 +1831,17 @@ ], "matched_words": { "health": [ - "diseases" + "diseases", + "疾病", + "病" ] }, - "basis_text": "Secret/hidden diseases, diseases of private parts | Secret/hidden diseases, diseases of private parts", - "mapping": "frozen" + "basis_text": "Secret/hidden diseases, diseases of private parts | 既有规则的传统描述(非个人事实或结果保证):隐疾或私密部位疾病;不是医学诊断", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health" + ] }, "bvr_harsha_yoga": { "name": "Harsha Yoga", @@ -1792,7 +1859,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Dull speech, stammering, incoherent communication | Dull speech, stammering, incoherent communication", + "basis_text": "Dull speech, stammering, incoherent communication | 传统描述为公众场合表达时容易紧张;原文指出2宫主处于吉星分盘星座时作用减弱,不等于智力、口吃或语言障碍诊断。", "mapping": "unmapped" }, "bvr_jananatpurvam_pitru_marana_yog": { @@ -1822,10 +1889,11 @@ ], "matched_words": { "marriage": [ - "marital" + "marital", + "婚" ] }, - "basis_text": "Extra-marital relations, illicit love affairs | Extra-marital relations, illicit love affairs", + "basis_text": "Extra-marital relations, illicit love affairs | 原文讨论婚外关系,但作者本人反对由此位置组合直接判断品行,并举处女上升为反例;本项不能证明不忠、实际关系或第三方行为。", "mapping": "frozen" }, "bvr_jarajaputra_yoga": { @@ -1836,11 +1904,16 @@ ], "matched_words": { "children": [ - "Children" + "Children", + "生育" ] }, - "basis_text": "Children from illicit relations | Children from illicit relations", - "mapping": "frozen" + "basis_text": "Children from illicit relations | 保留历史亲子与行为归因的原意,不据此认定不忠、亲属身世或生育能力。", + "mapping": "frozen", + "keyword_proposal": [ + "children", + "family" + ] }, "bvr_kaahala_yoga": { "name": "Kaahala Yoga", @@ -1850,10 +1923,11 @@ ], "matched_words": { "fame_authority": [ - "status" + "status", + "地位" ] }, - "basis_text": "Courage, initiative, status and practical drive | Courage, initiative, status and practical drive", + "basis_text": "Courage, initiative, status and practical drive | 既有规则的传统描述(非个人事实或结果保证):勇气、主动性、地位与实践动力", "mapping": "frozen" }, "bvr_kaalanirdesat_puthra_yoga": { @@ -1894,11 +1968,18 @@ ], "matched_words": { "wealth": [ - "wealthy" + "wealthy", + "富", + "财" ] }, - "basis_text": "Skilled in fine arts, music, dance; cultured and wealthy | Skilled in fine arts, music, dance; cultured and wealthy", - "mapping": "frozen" + "basis_text": "Skilled in fine arts, music, dance; cultured and wealthy | PVR传统描述涉及品格、快乐、健康、财富、学识与社会礼遇;这些是传统解释,不能单凭格局确认个人结果", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health", + "wealth" + ] }, "bvr_kalpadruma_yoga": { "name": "Kalpadruma Yoga", @@ -1933,10 +2014,11 @@ "matched_words": { "family": [ "family", - "household" + "household", + "家庭" ] }, - "basis_text": "Deception, distrust, household/family complications | Deception, distrust, household/family complications", + "basis_text": "Deception, distrust, household/family complications | 既有规则的传统描述(非个人事实或结果保证):欺骗、不信任与家庭或居住事务复杂", "mapping": "frozen" }, "bvr_karascheda_yoga": { @@ -1944,8 +2026,11 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Danger of amputation, loss of hand/arm | Danger of amputation, loss of hand/arm", - "mapping": "unmapped" + "basis_text": "Danger of amputation, loss of hand/arm | 既有规则的传统描述(非个人事实或结果保证):截肢或失去手臂的危险;不能据此预测伤残", + "mapping": "unmapped", + "keyword_proposal": [ + "health" + ] }, "bvr_karma_malika_precise": { "name": "Karma Malika Yoga", @@ -1976,10 +2061,12 @@ ], "matched_words": { "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Lives by agriculture, helpful, amasses wealth | Lives by agriculture, helpful, amasses wealth", + "basis_text": "Lives by agriculture, helpful, amasses wealth | 既有规则的传统描述(非个人事实或结果保证):以农业为生、乐于助人与积累财富", "mapping": "frozen" }, "bvr_khalwata_yoga": { @@ -1987,15 +2074,18 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Baldness or hair loss | Baldness or hair loss", - "mapping": "unmapped" + "basis_text": "Baldness or hair loss | 既有规则的传统描述(非个人事实或结果保证):秃发或脱发;不是医学诊断", + "mapping": "unmapped", + "keyword_proposal": [ + "education" + ] }, "bvr_krisanga_yoga": { "name": "Krisanga Yoga", "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Lean/thin body, frail constitution | Lean/thin body, frail constitution", + "basis_text": "Lean/thin body, frail constitution | 既有规则的传统描述(非个人事实或结果保证):体型消瘦与体质较弱", "mapping": "unmapped" }, "bvr_kushtaroga_yoga": { @@ -2006,11 +2096,17 @@ ], "matched_words": { "health": [ - "diseases" + "diseases", + "疾病", + "病" ] }, - "basis_text": "Skin diseases, leprosy, dermatitis | Skin diseases, leprosy, dermatitis", - "mapping": "frozen" + "basis_text": "Skin diseases, leprosy, dermatitis | 既有规则的传统描述(非个人事实或结果保证):皮肤疾病、麻风或皮炎;不是医学诊断", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health" + ] }, "bvr_laabha_malika_yoga": { "name": "Laabha Malika Yoga", @@ -2021,10 +2117,12 @@ "matched_words": { "wealth": [ "Wealth", - "gains" + "gains", + "富", + "财" ] }, - "basis_text": "Wealth from multiple sources, gains and profits | Wealth from multiple sources, gains and profits", + "basis_text": "Wealth from multiple sources, gains and profits | Raman 此条涉及技能,另有含义待核的女性相关旧式措辞;不能据此断定多来源财富、伴侣容貌或具体关系。", "mapping": "frozen" }, "bvr_lagna_malika": { @@ -2086,7 +2184,8 @@ ], "matched_words": { "education": [ - "knowledge" + "knowledge", + "知识" ], "fame_authority": [ "Fame" @@ -2095,10 +2194,12 @@ "spiritual" ], "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Fame, wealth, spiritual knowledge, commanding | Fame, wealth, spiritual knowledge, commanding", + "basis_text": "Fame, wealth, spiritual knowledge, commanding | 既有规则的传统描述(非个人事实或结果保证):声誉、财富、精神知识与威仪", "mapping": "frozen" }, "bvr_mathibhramana_yoga": { @@ -2106,8 +2207,11 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Mental disturbance, confusion, erratic behavior | Mental disturbance, confusion, erratic behavior", - "mapping": "unmapped" + "basis_text": "Mental disturbance, confusion, erratic behavior | 既有规则的传统描述(非个人事实或结果保证):精神困扰、混乱与行为不稳定;不是医学诊断", + "mapping": "unmapped", + "keyword_proposal": [ + "education" + ] }, "bvr_mathibhramana_yoga_variation": { "name": "Mathibhramana Yoga (Variation)", @@ -2130,10 +2234,11 @@ }, "matched_words": { "parents": [ - "mother" + "mother", + "母" ] }, - "basis_text": "Enmity with mother, difficulties through mother | Enmity with mother, difficulties through mother", + "basis_text": "Enmity with mother, difficulties through mother | 既有规则的传统描述(非个人事实或结果保证):与母亲的冲突或母亲相关困难", "mapping": "frozen" }, "bvr_matru_satrutwa_yoga_from_plane": { @@ -2149,10 +2254,11 @@ }, "matched_words": { "parents": [ - "mother" + "mother", + "母" ] }, - "basis_text": "Difficult relationship with mother | Difficult relationship with mother", + "basis_text": "Difficult relationship with mother | 既有规则的传统描述(非个人事实或结果保证):与母亲的关系困难", "mapping": "frozen" }, "bvr_matru_sneha_yoga": { @@ -2168,10 +2274,11 @@ }, "matched_words": { "parents": [ - "mother" + "mother", + "母" ] }, - "basis_text": "Deep love and affection with mother | Deep love and affection with mother", + "basis_text": "Deep love and affection with mother | 既有规则的传统描述(非个人事实或结果保证):与母亲的亲近与关爱;不是对实际亲子关系的确认", "mapping": "frozen" }, "bvr_matrudeerghayur_yoga": { @@ -2188,15 +2295,23 @@ }, "matched_words": { "longevity": [ - "lives long" + "lives long", + "寿" ], "parents": [ "Mother", - "mother's" + "mother's", + "母" ] }, - "basis_text": "Mother lives long, mother's health is good | Mother lives long, mother's health is good", - "mapping": "frozen" + "basis_text": "Mother lives long, mother's health is good | 既有规则的传统描述(非个人事实或结果保证):母亲长寿与健康;不能据此确定亲属寿命或健康", + "mapping": "frozen", + "keyword_proposal": [ + "family", + "health", + "longevity", + "parents" + ] }, "bvr_matrunasa_199": { "name": "Matrunasa Yoga (Raman 199)", @@ -2241,7 +2356,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Speech impediment, silence, deep contemplation | Speech impediment, silence, deep contemplation", + "basis_text": "Speech impediment, silence, deep contemplation | 原文将此配置与语言能力受限相联系,并明确排除木星本垣或入旺的情形;本项仅为传统结构记录,不能诊断或预测语言障碍。", "mapping": "unmapped" }, "bvr_musala_yoga": { @@ -2252,10 +2367,12 @@ ], "matched_words": { "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Firmness, resolve, stubborn nature, lasting wealth | Firmness, resolve, stubborn nature, lasting wealth", + "basis_text": "Firmness, resolve, stubborn nature, lasting wealth | 既有规则的传统描述(非个人事实或结果保证):坚定、决心、固执与财富持久", "mapping": "frozen" }, "bvr_nala_yoga": { @@ -2263,7 +2380,7 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Dual nature, adaptability, trade skills | Dual nature, adaptability, trade skills", + "basis_text": "Dual nature, adaptability, trade skills | 既有规则的传统描述(非个人事实或结果保证):双重倾向、适应力与交易技能", "mapping": "unmapped" }, "bvr_nav_yoga": { @@ -2271,8 +2388,11 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Success in endeavors, safe passage through difficulties, leadership | Success in endeavors, safe passage through difficulties, leadership", - "mapping": "unmapped" + "basis_text": "Success in endeavors, safe passage through difficulties, leadership | 既有规则的传统描述(非个人事实或结果保证):事业进展、渡过困难与领导", + "mapping": "unmapped", + "keyword_proposal": [ + "career" + ] }, "bvr_netranasa_yoga": { "name": "Netranasa Yoga", @@ -2286,8 +2406,12 @@ "vision" ] }, - "basis_text": "Eye troubles, blindness, vision problems | Eye troubles, blindness, vision problems", - "mapping": "frozen" + "basis_text": "Eye troubles, blindness, vision problems | 既有规则的传统描述(非个人事实或结果保证):眼部问题、失明与视力问题;不是医学诊断", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health" + ] }, "bvr_nishkapata_precise": { "name": "Nishkapata Yoga", @@ -2314,7 +2438,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Harsh, cruel, cutting speech; lack of empathy | Harsh, cruel, cutting speech; lack of empathy", + "basis_text": "Harsh, cruel, cutting speech; lack of empathy | 传统上涉及言语严厉;原文另有木星照射缓解及火星照射加重条件,不能据此判定个人性格或缺少共情。", "mapping": "unmapped" }, "bvr_paasa_yoga": { @@ -2322,15 +2446,18 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Many friends, talkative, skilled in various arts | Many friends, talkative, skilled in various arts", - "mapping": "unmapped" + "basis_text": "Many friends, talkative, skilled in various arts | PVR传统描述包含工作能力、健谈、随从,也含拘束或囚禁及品格方面的古代负面断语;完整保留其文献范围,但不能用于认定个人品格或预言被囚禁", + "mapping": "unmapped", + "keyword_proposal": [ + "career" + ] }, "bvr_parannabhojana_yoga": { "name": "Parannabhojana Yoga", "category": "dhana", "topics": [], "matched_words": {}, - "basis_text": "Depends on others for food, eats at others' homes | Depends on others for food, eats at others' homes", + "basis_text": "Depends on others for food, eats at others' homes | 既有规则的传统描述(非个人事实或结果保证):依赖他人供食或在他人家中用餐", "mapping": "unmapped" }, "bvr_parihasaka_yoga": { @@ -2365,8 +2492,11 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Haunted by spirits, irrational behavior, mental affliction | Haunted by spirits, irrational behavior, mental affliction", - "mapping": "unmapped" + "basis_text": "Haunted by spirits, irrational behavior, mental affliction | 既有规则的传统描述(非个人事实或结果保证):附灵、非理性行为与精神困扰;附灵属于传统信仰解释,不是事实或医学诊断", + "mapping": "unmapped", + "keyword_proposal": [ + "education" + ] }, "bvr_pithru_saapa_sutakshaya_yoga": { "name": "Pithru Saapa Sutakshaya Yoga", @@ -2395,11 +2525,16 @@ ], "matched_words": { "health": [ - "diseases" + "diseases", + "病" ] }, - "basis_text": "Pitta diseases, fevers, inflammatory conditions | Pitta diseases, fevers, inflammatory conditions", - "mapping": "frozen" + "basis_text": "Pitta diseases, fevers, inflammatory conditions | 既有规则的传统描述(非个人事实或结果保证):传统Pitta病症、发热与炎症;不是医学诊断", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health" + ] }, "bvr_pretha_saapa_yoga": { "name": "Pretha Saapa Yoga", @@ -2409,11 +2544,17 @@ ], "matched_words": { "children": [ - "progeny" + "progeny", + "子女", + "生育" ] }, - "basis_text": "Curse of departed souls, difficulties in progeny | Curse of departed souls, difficulties in progeny", - "mapping": "frozen" + "basis_text": "Curse of departed souls, difficulties in progeny | 保留历史诅咒与子女归因的原意,不据此认定诅咒、伤害、生育或子女结局。", + "mapping": "frozen", + "keyword_proposal": [ + "children", + "health" + ] }, "bvr_putrakalatraheena_yoga": { "name": "Putrakalatraheena Yoga", @@ -2429,13 +2570,15 @@ }, "matched_words": { "children": [ - "children" + "children", + "子女" ], "family": [ - "family" + "family", + "家庭" ] }, - "basis_text": "Deprived of family and children | Deprived of family and children", + "basis_text": "Deprived of family and children | 既有规则的传统描述(非个人事实或结果保证):缺少家庭与子女", "mapping": "frozen" }, "bvr_raja_bhanga_yoga": { @@ -2446,10 +2589,11 @@ ], "matched_words": { "fame_authority": [ - "power" + "power", + "地位" ] }, - "basis_text": "Rise followed by fall from power, broken ambitions | Rise followed by fall from power, broken ambitions", + "basis_text": "Rise followed by fall from power, broken ambitions | 传统结果涉及地位与福分受限;原作者不认可仅凭太阳落陷否定全部吉格,不能据此判断个人必然失势。", "mapping": "frozen" }, "bvr_rajabhrashta_yoga": { @@ -2461,10 +2605,12 @@ "matched_words": { "fame_authority": [ "power", - "status" + "status", + "地位", + "权力" ] }, - "basis_text": "Fall from power/status, political downfall | Fall from power/status, political downfall", + "basis_text": "Fall from power/status, political downfall | 既有规则的传统描述(非个人事实或结果保证):权力、地位下降或政治失势", "mapping": "frozen" }, "bvr_rajalakshana_yoga": { @@ -2479,10 +2625,12 @@ "honor" ], "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Royal characteristics, wealth, leadership, honor | Royal characteristics, wealth, leadership, honor", + "basis_text": "Royal characteristics, wealth, leadership, honor | 既有规则的传统描述(非个人事实或结果保证):王者特征、财富、领导与荣誉", "mapping": "frozen" }, "bvr_rajju_yoga": { @@ -2493,10 +2641,11 @@ ], "matched_words": { "migration": [ - "travel" + "travel", + "旅" ] }, - "basis_text": "Restlessness, frequent travel, nomadic nature | Restlessness, frequent travel, nomadic nature", + "basis_text": "Restlessness, frequent travel, nomadic nature | 既有规则的传统描述(非个人事实或结果保证):不安定、频繁旅行与游动生活", "mapping": "frozen" }, "bvr_randhra_malika_yoga": { @@ -2504,7 +2653,7 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Dangers, obstacles, hidden enemies, sudden changes | Dangers, obstacles, hidden enemies, sudden changes", + "basis_text": "Dangers, obstacles, hidden enemies, sudden changes | 既有规则的传统描述(非个人事实或结果保证):危险、障碍、隐蔽对手与突然变化", "mapping": "unmapped" }, "bvr_ravi_yoga": { @@ -2553,10 +2702,11 @@ "matched_words": { "education": [ "Learned", - "scholarship" + "scholarship", + "学" ] }, - "basis_text": "Learned, gifted in scholarship and fine arts | Learned, gifted in scholarship and fine arts", + "basis_text": "Learned, gifted in scholarship and fine arts | 既有规则的传统描述(非个人事实或结果保证):学识、学术与艺术才能", "mapping": "frozen" }, "bvr_sada_sanchara_precise": { @@ -2583,10 +2733,12 @@ "matched_words": { "wealth": [ "Prosperous", - "wealthy" + "wealthy", + "富", + "财" ] }, - "basis_text": "Prosperous, wealthy, respectable | Prosperous, wealthy, respectable", + "basis_text": "Prosperous, wealthy, respectable | 既有规则的传统描述(非个人事实或结果保证):繁荣、财富与受尊重", "mapping": "frozen" }, "bvr_sapthasankhya_sahodara_yoga": { @@ -2604,10 +2756,12 @@ "matched_words": { "family": [ "family", - "siblings" + "siblings", + "亲属", + "家庭" ] }, - "basis_text": "Seven siblings, moderate family size | Seven siblings, moderate family size", + "basis_text": "Seven siblings, moderate family size | 既有规则的传统描述(非个人事实或结果保证):七位手足与中等规模家庭;不能据此确认亲属人数", "mapping": "frozen" }, "bvr_sarala_yoga": { @@ -2680,7 +2834,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Danger from snakes or poison, toxic situations | Danger from snakes or poison, toxic situations", + "basis_text": "Danger from snakes or poison, toxic situations | 既有规则的传统描述(非个人事实或结果保证):蛇、毒物或有害处境的危险", "mapping": "unmapped" }, "bvr_sarpasaapa_yoga": { @@ -2688,7 +2842,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Danger from snakes, karmic snake curse | Danger from snakes, karmic snake curse", + "basis_text": "Danger from snakes, karmic snake curse | 既有规则的传统描述(非个人事实或结果保证):蛇的危险与业力蛇咒;诅咒属于传统信仰解释,不是事实", "mapping": "unmapped" }, "bvr_satkalatra_precise": { @@ -2719,7 +2873,7 @@ "devotion" ] }, - "basis_text": "Love of scriptures, devotion, pious nature | Love of scriptures, devotion, pious nature", + "basis_text": "Love of scriptures, devotion, pious nature | 既有规则的传统描述(非个人事实或结果保证):喜爱经典、虔诚与信仰投入", "mapping": "frozen" }, "bvr_satru_malika_yoga": { @@ -2727,7 +2881,7 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Enemies, litigation, obstacles, struggles | Enemies, litigation, obstacles, struggles", + "basis_text": "Enemies, litigation, obstacles, struggles | 既有规则的传统描述(非个人事实或结果保证):对手、诉讼、障碍与抗争", "mapping": "unmapped" }, "bvr_sirachcheda_yoga": { @@ -2738,10 +2892,11 @@ ], "matched_words": { "health": [ - "accidents" + "accidents", + "伤" ] }, - "basis_text": "Danger to head/neck, accidents affecting head | Danger to head/neck, accidents affecting head", + "basis_text": "Danger to head/neck, accidents affecting head | 既有规则的传统描述(非个人事实或结果保证):头颈危险与涉及头部的意外;不能据此确定伤害事件", "mapping": "frozen" }, "bvr_sodaranasa_yoga": { @@ -2757,10 +2912,11 @@ }, "matched_words": { "family": [ - "siblings" + "siblings", + "亲属" ] }, - "basis_text": "Loss of siblings, difficulties with siblings | Loss of siblings, difficulties with siblings", + "basis_text": "Loss of siblings, difficulties with siblings | 既有规则的传统描述(非个人事实或结果保证):失去手足或手足相关困难;不能据此确认亲属事实", "mapping": "frozen" }, "bvr_soola_yoga": { @@ -2768,7 +2924,7 @@ "category": "nabhasa", "topics": [], "matched_words": {}, - "basis_text": "Fierce, bold, prone to disputes and arguments | Fierce, bold, prone to disputes and arguments", + "basis_text": "Fierce, bold, prone to disputes and arguments | 既有规则的传统描述(非个人事实或结果保证):强悍、大胆与争执倾向", "mapping": "unmapped" }, "bvr_sraddhannabhuktha_yoga": { @@ -2782,7 +2938,7 @@ "devotional" ] }, - "basis_text": "Subsists on ritual offerings, devotional nature | Subsists on ritual offerings, devotional nature", + "basis_text": "Subsists on ritual offerings, devotional nature | 既有规则的传统描述(非个人事实或结果保证):依靠祭祀供品生活与虔诚倾向", "mapping": "frozen" }, "bvr_sreenaatha_yoga": { @@ -2818,13 +2974,14 @@ ], "matched_words": { "health": [ - "health" + "health", + "健康" ], "wealth": [ "prosperity" ] }, - "basis_text": "Auspicious life, good health, happiness, prosperity | Auspicious life, good health, happiness, prosperity", + "basis_text": "Auspicious life, good health, happiness, prosperity | 传统主题涉及表达、仪表与品行;仅检出位置结构,不能据此确认个人品质或健康。", "mapping": "frozen" }, "bvr_sukha_malika_yoga": { @@ -2840,10 +2997,11 @@ }, "matched_words": { "family": [ - "family" + "family", + "家庭" ] }, - "basis_text": "Happiness, comfort, material pleasures, good family life | Happiness, comfort, material pleasures, good family life", + "basis_text": "Happiness, comfort, material pleasures, good family life | 既有规则的传统描述(非个人事实或结果保证):幸福、舒适、物质享受与家庭生活", "mapping": "frozen" }, "bvr_sumukha_precise": { @@ -2851,7 +3009,7 @@ "category": "auspicious", "topics": [], "matched_words": {}, - "basis_text": "Kindly face | Gentle speech | Well liked | 面容和善 | 言语温和 | 受人喜爱", + "basis_text": "The traditional theme is a pleasant, smiling appearance, not confirmation of appearance or character. | 传统上关联愉悦、带笑的面貌;不能据此确认外貌、言语或品格", "mapping": "unmapped" }, "bvr_suputhra_yoga": { @@ -2862,10 +3020,12 @@ ], "matched_words": { "children": [ - "children" + "children", + "子女", + "生育" ] }, - "basis_text": "Blessed with noble children | Blessed with noble children", + "basis_text": "Blessed with noble children | 既有规则的传统描述(非个人事实或结果保证):拥有品行高尚的子女;不能据此确认生育或子女品格", "mapping": "frozen" }, "bvr_swaveeryaddhana_precise": { @@ -2890,15 +3050,18 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "White patches on skin, vitiligo | White patches on skin, vitiligo", - "mapping": "unmapped" + "basis_text": "White patches on skin, vitiligo | 既有规则的传统描述(非个人事实或结果保证):皮肤白斑或白癜风;不是医学诊断", + "mapping": "unmapped", + "keyword_proposal": [ + "education" + ] }, "bvr_theevrabuddhi_yoga": { "name": "Theevrabuddhi Yoga", "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Sharp intellect, penetrating mind, quick understanding | Sharp intellect, penetrating mind, quick understanding", + "basis_text": "Sharp intellect, penetrating mind, quick understanding | 既有规则的传统描述(非个人事实或结果保证):敏锐思维、洞察力与快速理解", "mapping": "unmapped" }, "bvr_thrikaala_gnana_yoga": { @@ -2912,7 +3075,7 @@ "Knowledge" ] }, - "basis_text": "Knowledge of past/present/future, intuitive wisdom | Knowledge of past/present/future, intuitive wisdom", + "basis_text": "Knowledge of past/present/future, intuitive wisdom | 既有规则的传统描述(非个人事实或结果保证):知晓过去、现在、未来与直觉智慧;不是超自然能力的验证", "mapping": "frozen" }, "bvr_trilochana_yoga": { @@ -2920,7 +3083,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Adventurous, fiery nature, achieves goals through boldness | Adventurous, fiery nature, achieves goals through boldness", + "basis_text": "Adventurous, fiery nature, achieves goals through boldness | 既有规则的传统描述(非个人事实或结果保证):冒险、热烈与通过大胆行动追求目标", "mapping": "unmapped" }, "bvr_utthama_graha_yoga": { @@ -2928,7 +3091,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Excellent house/property, comfortable living | Excellent house/property, comfortable living", + "basis_text": "Excellent house/property, comfortable living | 既有规则的传统描述(非个人事实或结果保证):优良住宅、房产与舒适生活", "mapping": "unmapped" }, "bvr_vaatharoga_yoga": { @@ -2939,18 +3102,23 @@ ], "matched_words": { "health": [ - "diseases" + "diseases", + "病" ] }, - "basis_text": "Vata diseases, rheumatism, nerve disorders | Vata diseases, rheumatism, nerve disorders", - "mapping": "frozen" + "basis_text": "Vata diseases, rheumatism, nerve disorders | 既有规则的传统描述(非个人事实或结果保证):传统Vata病症、风湿与神经问题;不是医学诊断", + "mapping": "frozen", + "keyword_proposal": [ + "education", + "health" + ] }, "bvr_vakchalana_yoga": { "name": "Vakchalana Yoga", "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Speech impediment, stammering, difficulty expressing | Speech impediment, stammering, difficulty expressing", + "basis_text": "Speech impediment, stammering, difficulty expressing | 既有规则的传统描述(非个人事实或结果保证):言语障碍、口吃与表达困难", "mapping": "unmapped" }, "bvr_vallaki_yoga": { @@ -2961,10 +3129,11 @@ ], "matched_words": { "migration": [ - "travels" + "travels", + "旅" ] }, - "basis_text": "Talented in music or fine arts, travels extensively | Talented in music or fine arts, travels extensively", + "basis_text": "Talented in music or fine arts, travels extensively | 既有规则的传统描述(非个人事实或结果保证):音乐或艺术才能与广泛旅行", "mapping": "frozen" }, "bvr_vamsacheda_yoga": { @@ -2980,18 +3149,23 @@ }, "matched_words": { "family": [ - "family" + "family", + "家族" ] }, - "basis_text": "End of family lineage, no male heirs | End of family lineage, no male heirs", - "mapping": "frozen" + "basis_text": "End of family lineage, no male heirs | 既有规则的传统描述(非个人事实或结果保证):家族传承终止或没有男性后代;不能据此确认生育或后代性别", + "mapping": "frozen", + "keyword_proposal": [ + "children", + "family" + ] }, "bvr_vanchana_chora_bheethi_yoga": { "name": "Vanchana Chora Bheethi Yoga", "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Fear of deception, theft; deceptive nature | Fear of deception, theft; deceptive nature", + "basis_text": "Fear of deception, theft; deceptive nature | 既有规则的传统描述(非个人事实或结果保证):担忧欺骗、盗窃或欺骗倾向", "mapping": "unmapped" }, "bvr_vasumathi_yoga": { @@ -3006,10 +3180,12 @@ "respected" ], "wealth": [ - "Wealthy" + "Wealthy", + "富", + "财" ] }, - "basis_text": "Wealthy, respected, generous | Wealthy, respected, generous", + "basis_text": "Wealthy, respected, generous | 传统上关联财富积累;吉星数量、力量与其他影响会改变表现,不保证财富结果。上升与月亮两种参考不能算作独立证据。", "mapping": "frozen" }, "bvr_vichitra_saudha_prakara_yoga": { @@ -3017,7 +3193,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Wonderful and varied palaces/dwellings, luxury homes | Wonderful and varied palaces/dwellings, luxury homes", + "basis_text": "Wonderful and varied palaces/dwellings, luxury homes | 既有规则的传统描述(非个人事实或结果保证):华美、多样的宫室或豪华住宅", "mapping": "unmapped" }, "bvr_vidyut_yoga": { @@ -3028,11 +3204,18 @@ ], "matched_words": { "wealth": [ - "wealth" + "wealth", + "富", + "财" ] }, - "basis_text": "Commands electricity/technology, sudden wealth, powerful | Commands electricity/technology, sudden wealth, powerful", - "mapping": "frozen" + "basis_text": "Commands electricity/technology, sudden wealth, powerful | 传统含义关联掌权或与掌权者相当的地位、财富、享乐与慈善;名称中的闪电不构成电力或技术职业判断", + "mapping": "frozen", + "keyword_proposal": [ + "career", + "fame_authority", + "wealth" + ] }, "bvr_vimala_yoga": { "name": "Vimala Yoga", @@ -3047,7 +3230,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Danger from poison, toxic environments | Danger from poison, toxic environments", + "basis_text": "Danger from poison, toxic environments | 既有规则的传统描述(非个人事实或结果保证):毒物或有毒环境的危险", "mapping": "unmapped" }, "bvr_vrana_yoga": { @@ -3058,10 +3241,11 @@ ], "matched_words": { "health": [ - "injuries" + "injuries", + "伤" ] }, - "basis_text": "Wounds, injuries, scars on body | Wounds, injuries, scars on body", + "basis_text": "Wounds, injuries, scars on body | 既有规则的传统描述(非个人事实或结果保证):身体伤口、损伤与疤痕", "mapping": "frozen" }, "bvr_vyaya_malika_yoga": { @@ -3075,7 +3259,7 @@ "spiritual" ] }, - "basis_text": "Loss, expenditure, waste, spiritual inclination | Loss, expenditure, waste, spiritual inclination", + "basis_text": "Loss, expenditure, waste, spiritual inclination | 既有规则的传统描述(非个人事实或结果保证):损失、支出、浪费与精神追求", "mapping": "frozen" }, "bvr_yuddha_marana_yoga": { @@ -3083,7 +3267,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Death in battle or through weapons/violence | Death in battle or through weapons/violence", + "basis_text": "Death in battle or through weapons/violence | 既有规则的传统描述(非个人事实或结果保证):战斗、武器或暴力死亡;不能据此预测死亡方式", "mapping": "unmapped" }, "bvr_yuddhatpaschaddrudha_yoga": { @@ -3107,7 +3291,7 @@ "category": "special", "topics": [], "matched_words": {}, - "basis_text": "Eloquent, skilled in debate, good communicator | Eloquent, skilled in debate, good communicator", + "basis_text": "Eloquent, skilled in debate, good communicator | 既有规则的传统描述(非个人事实或结果保证):口才、辩论技能与沟通能力", "mapping": "unmapped" }, "chakra_nabhasa": { @@ -3306,8 +3490,8 @@ "mapping": "frozen" }, "daridra_2": { - "name": "Daridra Yoga (variant)", - "category": "durbhaga", + "name": "Second lord debilitated in house 6, 8 or 12 (structural observation)", + "category": "observation", "topics": [ "family", "wealth" @@ -3319,80 +3503,69 @@ }, "matched_words": { "family": [ - "Family", - "household", "家庭" ], "wealth": [ - "Financial", - "frugal", "财" ] }, - "basis_text": "Financial pressure | Family disputes | Needs a frugal household | 财务压力 | 家庭纠纷 | 需节俭持家", + "basis_text": "财务压力 | 家庭纠纷 | 需节俭持家", "mapping": "frozen" }, "daridra_yoga_11_lord_6_8_12": { - "name": "Daridra Yoga (11th Lord in 6/8/12)", - "category": "durbhaga", + "name": "Eleventh lord in house 6, 8 or 12 (structural observation)", + "category": "observation", "topics": [ "wealth" ], "matched_words": { "wealth": [ - "income", "收入" ] }, - "basis_text": "Unstable income | Thin social connections | 收入不稳定 | 人脉关系淡薄", + "basis_text": "收入不稳定 | 人脉关系淡薄", "mapping": "frozen" }, "daridra_yoga_2_lord_6_8_12": { - "name": "Daridra Yoga (2nd Lord in 6/8/12)", - "category": "durbhaga", + "name": "Second lord in house 6, 8 or 12 (structural observation)", + "category": "observation", "topics": [ "wealth" ], "matched_words": { "wealth": [ - "Financial", - "saving", "财" ] }, - "basis_text": "Financial instability | Difficulty saving | 财务不稳定 | 储蓄困难", + "basis_text": "财务不稳定 | 储蓄困难", "mapping": "frozen" }, "daridra_yoga_6": { - "name": "Daridra Yoga (6th Lord)", - "category": "durbhaga", + "name": "Sixth lord in house 6, 8 or 12 (structural observation)", + "category": "observation", "topics": [ "wealth" ], "matched_words": { "wealth": [ - "Debt", - "thrift", "债" ] }, - "basis_text": "Debt problems | Needs thrift | 债务问题 | 需要节约", + "basis_text": "债务问题 | 需要节约", "mapping": "frozen" }, "daridra_yoga_combined": { - "name": "Daridra Yoga (Combined)", - "category": "durbhaga", + "name": "Second and eleventh lords in houses 6, 8 or 12 (structural observation)", + "category": "observation", "topics": [ "wealth" ], "matched_words": { "wealth": [ - "financial", - "thrift", "财" ] }, - "basis_text": "Severe financial difficulty | Needs extreme thrift | 严重财务困难 | 需要极度节俭", + "basis_text": "严重财务困难 | 需要极度节俭", "mapping": "frozen" }, "deepha_yoga": { @@ -4680,6 +4853,14 @@ "basis_text": "Emotionally rich | Artistic talent | Refined aesthetic sense | 情感丰富 | 艺术才华 | 审美卓越", "mapping": "frozen" }, + "mridanga_raman_navamsa_chain": { + "name": "Mridanga Yoga (Raman Navamsa Chain)", + "category": "auspicious", + "topics": [], + "matched_words": {}, + "basis_text": "Traditional theme: personal influence and charisma; the ascendant lord's strength and the timing must be assessed separately. | 传统主题:个人影响力与吸引力;需另评上升主强度与应期", + "mapping": "unmapped" + }, "mridanga_yoga": { "name": "Mridanga Yoga", "category": "auspicious", @@ -4698,7 +4879,7 @@ "mapping": "frozen" }, "mridanga_yoga_variant": { - "name": "Mridanga Yoga (Full)", + "name": "Mridanga Yoga (Legacy Dignity Variant)", "category": "special", "topics": [], "matched_words": {}, diff --git a/references/yoga_rules.json b/references/yoga_rules.json index ea51b8d0a..cf58b1ff5 100644 --- a/references/yoga_rules.json +++ b/references/yoga_rules.json @@ -1,7 +1,7 @@ { "schema_version": "1.0", "description": "Yoga 规则库 - 数据驱动架构 v1.0", - "total_rules": 480, + "total_rules": 481, "rules": [ { "id": "raja_yoga", @@ -2461,32 +2461,28 @@ ], "strength": "弱", "strength_en": "weak", - "enabled": true + "enabled": false, + "retirement_reason": "Exact same eleventh-lord placement predicate. Canonical entry retains position and shared evidence identity.", + "alias_of": "daridra_yoga_11_lord_6_8_12" }, { "id": "daridra_2", - "name": "Daridra Yoga (variant)", - "name_cn": "贫困格局变体", + "name": "Second lord debilitated in house 6, 8 or 12 (structural observation)", + "name_cn": "第二宫主落陷且在第6、8或12宫(结构观察)", "source": "BPHS", "bvr_id": null, - "category": "durbhaga", + "category": "observation", "logic": { - "type": "custom", - "expr": "\nlord_2 = lord(2)\nlord_2 in ctx.planets and debil(lord_2) and dusthana(house_of(lord_2))\n", - "participants_expr": "[lord_2]", - "combo_template": "2宫主落陷在凶宫", - "combo_template_en": "2nd lord debilitated in a Dusthana" + "type": "wealth_house_observation", + "lord_houses": [ + 2 + ], + "require_debilitation": true, + "description_zh": "第二宫主落陷且在第6、8或12宫(结构观察)", + "description_en": "Second lord debilitated in house 6, 8 or 12." }, - "effects": [ - "财务压力", - "家庭纠纷", - "需节俭持家" - ], - "effects_en": [ - "Financial pressure", - "Family disputes", - "Needs a frugal household" - ], + "effects": [], + "effects_en": [], "strength": "弱", "strength_en": "weak", "enabled": true, @@ -2494,7 +2490,29 @@ "method_review": { "status": "pending", "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." - } + }, + "evidence_lordship_houses": [ + 2 + ], + "english_source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "claim_kind": "structural_observation", + "legacy_logic": { + "type": "custom", + "expr": "\nlord_2 = lord(2)\nlord_2 in ctx.planets and debil(lord_2) and dusthana(house_of(lord_2))\n", + "combo_template": "2宫主落陷在凶宫", + "participants_expr": "[lord_2]" + }, + "legacy_name": { + "en": "Daridra Yoga (variant)", + "zh": "贫困格局变体" + }, + "source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "combination_en": "Second lord debilitated in house 6, 8 or 12.", + "traditional_effects": [ + "财务压力", + "家庭纠纷", + "需节俭持家" + ] }, { "id": "gola_yoga", @@ -3969,12 +3987,35 @@ }, { "id": "daridra_yoga_6", - "name": "Daridra Yoga (6th Lord)", - "name_cn": "贫困格局(6宫主)", - "category": "durbhaga", + "name": "Sixth lord in house 6, 8 or 12 (structural observation)", + "name_cn": "第六宫主在第6、8或12宫(结构观察)", + "category": "observation", "source": "BPHS", "bvr_id": "Daridra-3", "logic": { + "type": "wealth_house_observation", + "lord_houses": [ + 6 + ], + "require_debilitation": false, + "description_zh": "第六宫主在第6、8或12宫(结构观察)", + "description_en": "Sixth lord in house 6, 8 or 12." + }, + "effects": [], + "effects_en": [], + "strength": "弱", + "strength_en": "weak", + "enabled": true, + "method_review": { + "status": "pending", + "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." + }, + "evidence_lordship_houses": [ + 6 + ], + "english_source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "claim_kind": "structural_observation", + "legacy_logic": { "type": "and", "conditions": [ { @@ -3983,30 +4024,50 @@ } ] }, - "effects": [ + "legacy_name": { + "en": "Daridra Yoga (6th Lord)", + "zh": "贫困格局(6宫主)" + }, + "source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "combination_en": "Sixth lord in house 6, 8 or 12.", + "traditional_effects": [ "债务问题", "需要节约" - ], - "effects_en": [ - "Debt problems", - "Needs thrift" - ], + ] + }, + { + "id": "daridra_yoga_combined", + "name": "Second and eleventh lords in houses 6, 8 or 12 (structural observation)", + "name_cn": "第二与第十一宫主在第6、8或12宫(结构观察)", + "category": "observation", + "source": "BPHS", + "bvr_id": "Daridra-4", + "logic": { + "type": "wealth_house_observation", + "lord_houses": [ + 2, + 11 + ], + "require_debilitation": false, + "description_zh": "第二与第十一宫主在第6、8或12宫(结构观察)", + "description_en": "Second and eleventh lords in houses 6, 8 or 12." + }, + "effects": [], + "effects_en": [], "strength": "弱", "strength_en": "weak", "enabled": true, "method_review": { "status": "pending", "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." - } - }, - { - "id": "daridra_yoga_combined", - "name": "Daridra Yoga (Combined)", - "name_cn": "贫困格局(组合)", - "category": "durbhaga", - "source": "BPHS", - "bvr_id": "Daridra-4", - "logic": { + }, + "evidence_lordship_houses": [ + 2, + 11 + ], + "english_source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "claim_kind": "structural_observation", + "legacy_logic": { "type": "and", "conditions": [ { @@ -4016,21 +4077,16 @@ } ] }, - "effects": [ + "legacy_name": { + "en": "Daridra Yoga (Combined)", + "zh": "贫困格局(组合)" + }, + "source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "combination_en": "Second and eleventh lords in houses 6, 8 or 12.", + "traditional_effects": [ "严重财务困难", "需要极度节俭" - ], - "effects_en": [ - "Severe financial difficulty", - "Needs extreme thrift" - ], - "strength": "弱", - "strength_en": "weak", - "enabled": true, - "method_review": { - "status": "pending", - "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." - } + ] }, { "id": "surya_guru_yoga", @@ -5064,8 +5120,8 @@ }, { "id": "mridanga_yoga_variant", - "name": "Mridanga Yoga (Full)", - "name_cn": "全鼓格局", + "name": "Mridanga Yoga (Legacy Dignity Variant)", + "name_cn": "鼓格局(既有尊贵状态变体)", "category": "special", "source": "BPHS", "bvr_id": "Mridanga-2", @@ -7226,23 +7282,35 @@ }, { "id": "daridra_yoga_2_lord_6_8_12", - "name": "Daridra Yoga (2nd Lord in 6/8/12)", - "name_cn": "贫穷瑜伽(2宫主入6/8/12宫)", + "name": "Second lord in house 6, 8 or 12 (structural observation)", + "name_cn": "第二宫主在第6、8或12宫(结构观察)", "source": "BPHS", "bvr_id": "DB-7", - "category": "durbhaga", + "category": "observation", "enabled": true, "strength": "弱", "strength_en": "weak", - "effects": [ - "财务不稳定", - "储蓄困难" - ], - "effects_en": [ - "Financial instability", - "Difficulty saving" - ], + "effects": [], + "effects_en": [], "logic": { + "type": "wealth_house_observation", + "lord_houses": [ + 2 + ], + "require_debilitation": false, + "description_zh": "第二宫主在第6、8或12宫(结构观察)", + "description_en": "Second lord in house 6, 8 or 12." + }, + "method_review": { + "status": "pending", + "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." + }, + "evidence_lordship_houses": [ + 2 + ], + "english_source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "claim_kind": "structural_observation", + "legacy_logic": { "type": "lord_in_house", "house": 2, "target_houses": [ @@ -7251,30 +7319,48 @@ 12 ] }, - "method_review": { - "status": "pending", - "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." - } + "legacy_name": { + "en": "Daridra Yoga (2nd Lord in 6/8/12)", + "zh": "贫穷瑜伽(2宫主入6/8/12宫)" + }, + "source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "combination_en": "Second lord in house 6, 8 or 12.", + "traditional_effects": [ + "财务不稳定", + "储蓄困难" + ] }, { "id": "daridra_yoga_11_lord_6_8_12", - "name": "Daridra Yoga (11th Lord in 6/8/12)", - "name_cn": "贫穷瑜伽(11宫主入6/8/12宫)", + "name": "Eleventh lord in house 6, 8 or 12 (structural observation)", + "name_cn": "第十一宫主在第6、8或12宫(结构观察)", "source": "BPHS", "bvr_id": "DB-8", - "category": "durbhaga", + "category": "observation", "enabled": true, "strength": "弱", "strength_en": "weak", - "effects": [ - "收入不稳定", - "人脉关系淡薄" - ], - "effects_en": [ - "Unstable income", - "Thin social connections" - ], + "effects": [], + "effects_en": [], "logic": { + "type": "wealth_house_observation", + "lord_houses": [ + 11 + ], + "require_debilitation": false, + "description_zh": "第十一宫主在第6、8或12宫(结构观察)", + "description_en": "Eleventh lord in house 6, 8 or 12." + }, + "method_review": { + "status": "pending", + "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." + }, + "evidence_lordship_houses": [ + 11 + ], + "english_source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "claim_kind": "structural_observation", + "legacy_logic": { "type": "lord_in_house", "house": 11, "target_houses": [ @@ -7283,10 +7369,16 @@ 12 ] }, - "method_review": { - "status": "pending", - "reason": "Exact source definition not located; preserve geometry, not a named poverty verdict." - } + "legacy_name": { + "en": "Daridra Yoga (11th Lord in 6/8/12)", + "zh": "贫穷瑜伽(11宫主入6/8/12宫)" + }, + "source_reference": "Legacy BPHS attribution is unlocated for this exact abbreviated predicate. Science of Light indexed595–596 lines14142–14178 gives broader wealth/dusthana relationships with additional conditions and mitigating aspects; not exact formation admission.", + "combination_en": "Eleventh lord in house 6, 8 or 12.", + "traditional_effects": [ + "收入不稳定", + "人脉关系淡薄" + ] }, { "id": "rog yoga_6", @@ -11750,20 +11842,18 @@ "combo_template_en": "Benefic in the 2nd house" }, "effects": [ - "面容和善", - "言语温和", - "受人喜爱" + "传统上关联愉悦、带笑的面貌;不能据此确认外貌、言语或品格" ], "effects_en": [ - "Kindly face", - "Gentle speech", - "Well liked" + "The traditional theme is a pleasant, smiling appearance, not confirmation of appearance or character." ], "strength": "中", "strength_en": "moderate", "enabled": true, - "accuracy_note": "高置信:定义来自 PyJHora/B.V. Raman。", - "accuracy_note_en": "High confidence: definition from PyJHora / B.V. Raman." + "accuracy_note": "Raman no.166出处已定位;仍保留具名PyJHora自然吉星与相位口径,不把软件一致性当作现实验证。", + "accuracy_note_en": "High confidence: definition from PyJHora / B.V. Raman.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.166, printed164 (PDF174), with PyJHora implementation conventions retained separately.", + "combination_en": "Second lord angular with benefic aspect, or a benefic occupying house 2; this row retains the PyJHora natural-benefic and aspect implementation profile, not Raman combination 167." }, { "id": "bvr_swaveeryaddhana_precise", @@ -11805,29 +11895,33 @@ "bvr_id": null, "category": "auspicious", "logic": { - "type": "custom", - "expr": "\n# PyJHora/BVR-177 source-parity: 3rd lord, Mars, or 3rd house joined/aspected by PyJHora natural benefics.\n# NOTE: PyJHora house.aspected_planets_of_the_planet(chart, p) returns planets aspected BY p.\nlord_3 = lord(3)\nbenefics = external_benchmark_natural_benefics()\ndef benefic_link_to_planet(p):\n return p in ctx.planets and strong(p) and any(\n b != p and (same_house(b, p) or aspect(p, b))\n for b in benefics\n )\nhouse_joined = any(house_of(b) == 3 for b in benefics)\nhouse_aspected = any(b in external_benchmark_aspected_planets_of_raasi(3) for b in benefics)\nbenefic_link_to_planet(lord_3) or benefic_link_to_planet('Mars') or house_joined or house_aspected\n", - "combo_template": "3宫主、火星或3宫按PyJHora源码受吉星连接", - "combo_template_en": "3rd lord, Mars or the 3rd house connected with benefics (per PyJHora source)" + "type": "raman_strength_qualified_geometry", + "profile": "bhratruvriddhi_177", + "description_zh": "第三宫主、火星或第三宫受到吉星同宫或相照,另须分别核定强度", + "summary_zh": "吉星连接的位置条件已记录,相关行星或第三宫的综合有力条件尚未核定;不能据此确认手足人数、兴旺或相处情况。", + "summary_en": "Benefic connections are recorded; the separate planetary or third-house strength requirement remains unresolved. Sibling number, prosperity and relations are not established.", + "description_en": "Raman177: the third lord, Mars or third house receives benefic conjunction/aspect and must separately be strong. Positional witnesses are retained; composite strength remains unresolved." }, "effects": [ - "兄弟和睦", - "兄弟助力", - "手足情深" + "传统主题为手足发展带来的支持;当前方法不完整,不能据此确认手足存在、关系或兴旺" ], "effects_en": [ - "Harmony among siblings", - "Help from siblings", - "Close bond with siblings" + "The traditional theme is benefit through prospering siblings; neither sibling existence nor actual relations are established by this candidate." ], "strength": "中", "strength_en": "moderate", "enabled": true, - "accuracy_note": "v6.0.42 source-parity: uses PyJHora natural benefics and preserves house.aspected_planets_of_the_planet() direction semantics.", + "accuracy_note": "Received Parashari aspects replace the outgoing-aspect compatibility bug; strength is no longer silently inferred from sign dignity or skipped for the house branch.", "method_review": { "status": "pending", "reason": "Received-aspect geometry repaired; separate planetary/house strength and whole-chart qualifications remain unresolved." - } + }, + "english_source_reference": "Raman, Three Hundred Important Combinations, no.177, printed169-170/PDF179-180; received Parashari aspect geometry, strength unresolved.", + "unresolved_source_conditions": [ + "Third-lord, Mars or third-house composite strength and whole-chart qualifications" + ], + "source_reference": "Raman177 printed169-170/PDF179-180", + "combination_en": "Raman177: the third lord, Mars or third house receives benefic conjunction/aspect and must separately be strong. Positional witnesses are retained; composite strength remains unresolved." }, { "id": "bvr_bandhubhisthyaktha_precise", @@ -11838,9 +11932,9 @@ "category": "durbhaga", "logic": { "type": "custom", - "expr": "\n# PyJHora BVR-195: 4th lord associated with malefics or inimical/debilitated.\n# PyJHora uses house_strength <= _ENEMY (1) for 'inimical', not <= _NEUTRAL (2).\nlord_4 = lord(4)\nif lord_4 not in ctx.planets:\n False\nelse:\n malefic_assoc = any(m in ctx.planets and associated(lord_4, m) for m in MALEFICS if m != lord_4)\n inimical_or_debil = debil(lord_4) or (house_strength(lord_4) is not None and house_strength(lord_4) <= 1) or is_shashtiamsa_evil(lord_4)\n malefic_assoc or inimical_or_debil\n", - "participants_expr": "[lord_4]+[m for m in MALEFICS if m in ctx.planets and m!=lord_4 and associated(lord_4,m)]", + "expr": "\n# PyJHora BVR-195: 4th lord associated with malefics or inimical/debilitated.\n# PyJHora uses house_strength <= _ENEMY (1) for 'inimical', not <= _NEUTRAL (2).\nlord_4 = lord(4)\nif lord_4 not in ctx.planets:\n False\nelse:\n malefic_assoc = any(m in ctx.planets and associated(lord_4, m) for m in MALEFICS if m != lord_4)\n inimical_or_debil = debil(lord_4) or (house_strength(lord_4) is not None and house_strength(lord_4) <= 1)\n malefic_assoc or inimical_or_debil or is_shashtiamsa_evil(lord_4)\n", "combo_template": "4宫主受凶星关联或处于弱/不利状态", + "participants_expr": "[lord_4]+[m for m in MALEFICS if m in ctx.planets and m!=lord_4 and associated(lord_4,m)]", "combo_template_en": "4th lord associated with malefics or weak or afflicted" }, "effects": [ @@ -11856,7 +11950,8 @@ "strength": "弱", "strength_en": "weak", "enabled": true, - "accuracy_note": "v6.1.3: added D60 evil shashtiamsa check" + "accuracy_note": "D1 条件保留;传统凶性细分名称尚未接入,不能以 D60 落宫或尊贵度替代。", + "accuracy_note_en": "The D1 conditions are kept; the traditional named cruel-amsa subdivision is not yet connected, and a D60 house or dignity does not stand in for it." }, { "id": "bvr_matrunasa_precise", @@ -11948,7 +12043,8 @@ "strength": "中", "strength_en": "moderate", "enabled": true, - "accuracy_note": "v6.1.8: BVR-205 restored friendly-sign planet in 4th check; keeps Vaiseshikamsa scoring for lagna lord" + "accuracy_note": "保留第4宫及上升主的既有条件;旧三盘加权分不是 Vaiseshikamsa,未核定该分支前不据此判成立。", + "accuracy_note_en": "The existing fourth-house and ascendant-lord conditions are kept; the old three-chart weighted score is not Vaiseshikamsa, so that branch does not establish formation until it is ruled on." }, { "id": "bvr_bahu_puthra_precise", @@ -12012,7 +12108,7 @@ "note": "" }, "effects": [ - "Divine nature, great yogic powers, spiritual liberation" + "既有规则的传统描述(非个人事实或结果保证):神圣倾向、瑜伽修持能力与精神解脱" ], "effects_en": [ "Divine nature, great yogic powers, spiritual liberation" @@ -12020,14 +12116,15 @@ "strength": "very_rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-50" + "evidence_note": "Source: B.V. Raman, BVR: BVR-50", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_anapathya_yoga", "name": "Anapathya Yoga", "name_cn": "无子嗣瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-211", "category": "putra", "logic": { "type": "compound_conditions", @@ -12055,7 +12152,7 @@ "note": "" }, "effects": [ - "Childlessness, lack of progeny" + "既有规则的传统描述(非个人事实或结果保证):无子女或缺少后代" ], "effects_en": [ "Childlessness, lack of progeny" @@ -12063,7 +12160,16 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Raman211 printed197-198/PDF207-208. Weakness is required for all four roles; source gives a Jupiter/fifth-lord strength qualification, not a universal dignity-only proxy.", + "english_source_reference": "Raman no211 printed197-198/PDF207-208; author definition and qualifying remarks, not fertility evidence.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "source_reference": "Raman, Three Hundred Important Combinations, no211 printed197-198/PDF207-208.", + "source_method_notes": [ + "All four roles require weakness; one weak planet is insufficient.", + "The legacy note equating weakness with debility, combustion or enemy sign is not admitted as a complete Raman definition.", + "The author's strong-Jupiter/fifth-lord qualification is retained; no childlessness or fertility diagnosis." + ], + "combination_en": "Jupiter and the ascendant, seventh and fifth lords must all be weak; strong Jupiter and fifth lord modify the author's interpretation. Composite weakness is not implemented." }, { "id": "bvr_angaheena_yoga", @@ -12073,6 +12179,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "angaheena_285", + "description_zh": "从太阳起算,月亮第10宫、火星第7宫、土星第2宫;仅核对传统结构", + "description_en": "Moon tenth, Mars seventh and Saturn second from Sun; historical geometry only, not a medical prediction." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):肢体缺损或残障" + ], + "effects_en": [ + "Physical deficiency or disability in limbs" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.285, printed287/PDF297.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12111,16 +12235,7 @@ ], "note": "" }, - "effects": [ - "Physical deficiency or disability in limbs" - ], - "effects_en": [ - "Physical deficiency or disability in limbs" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Moon tenth, Mars seventh and Saturn second from Sun; historical geometry only, not a medical prediction." }, { "id": "bvr_annadana_yoga", @@ -12134,7 +12249,7 @@ "expr": "\nl2 = ctx.lord_of_house(2)\nif not l2 or l2 not in ctx.planets: False\nelse:\n l2_strong = strong(l2, include_neutral=True)\n # PyJHora uses aspected_planets_of_the_planet(chart_1d, l2) i.e. planets ASPECTED BY l2\n jup_link = ctx.house_of(l2) == ctx.house_of('Jupiter') or aspect(l2, 'Jupiter')\n merc_link = ctx.house_of(l2) == ctx.house_of('Mercury') or aspect(l2, 'Mercury')\n l2_strong and jup_link and merc_link\n" }, "effects": [ - "Generous, feeds others, charitable, abundance of food" + "既有规则的传统描述(非个人事实或结果保证):慷慨、施食、慈善与食物充裕" ], "effects_en": [ "Generous, feeds others, charitable, abundance of food" @@ -12142,7 +12257,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-127" + "evidence_note": "Source: B.V. Raman, BVR: BVR-127", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_annadana_yoga_from_planet_posi", @@ -12169,18 +12285,19 @@ { "id": "bvr_apakeerthi_yoga", "name": "Apakeerthi Yoga", - "name_cn": "TBD", - "source": "待查", + "name_cn": "名誉压力传统配置", + "source": "B.V. Raman, Three Hundred Important Combinations, no.244, printed236–237", "source_en": "Source pending", - "bvr_id": null, + "bvr_id": 244, "category": "special", "logic": { - "type": "placeholder", - "note": "BVR definition: TBD", - "draft": true + "type": "jada_apakeerti_raman", + "profile": "apakeerti_244", + "description_zh": "太阳与土星同在第10宫,并有其他凶星照射,或两星均在凶星主宰的D9星座;木星照射另作缓解记录", + "description_en": "Sun and Saturn in house 10, with an external malefic aspect or both in malefic-ruled Navamsas; Jupiter mitigation is separate." }, "effects": [ - "待补充" + "原书关联名誉受损主题;仅为传统参考,不据结构认定实际名誉或未来事件。" ], "effects_en": [ "Not yet documented" @@ -12189,7 +12306,10 @@ "strength_en": "pending assessment", "enabled": true, "draft": false, - "evidence_note": "From PyJhora function: apakeerthi_yoga()" + "evidence_note": "Raman244 printed236–237 / PDF pages246–247; alternative branches, not Sun–Saturn conjunction alone.", + "english_source_reference": "Raman244 printed236–237 / PDF pages246–247", + "source_effect_review": "Named-source geometry with explicit native classification; no independent outcome validation.", + "combination_en": "Sun and Saturn in house 10, with an external malefic aspect or both in malefic-ruled Navamsas; Jupiter mitigation is separate." }, { "id": "bvr_ardha_chandra_yoga", @@ -12209,7 +12329,7 @@ "note": "All 7 visible planets in 7 consecutive houses starting from non-Kendra, each house occupied" }, "effects": [ - "Commanding appearance, leadership, wealth" + "既有规则的传统描述(非个人事实或结果保证):有威仪的外表、领导与财富" ], "effects_en": [ "Commanding appearance, leadership, wealth" @@ -12217,16 +12337,36 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-79" + "evidence_note": "Source: B.V. Raman, BVR: BVR-79", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "source_reference": "PVR Integrated Approach, indexed p134, line2726: seven consecutive signs starting from a panapara or apoklima; seven occupied-house profile. Legacy Raman attribution retained, not independently located here." }, { "id": "bvr_asatyavadi_yoga", "name": "Asatyavadi Yoga", "name_cn": "谎言瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-157", "category": "special", "logic": { + "type": "learning_expression_raman", + "profile": "asatyavadi_157", + "description_zh": "2宫主落火星或土星星座并有凶星居角宫与三方宫;或满足D9定位星替代路径", + "description_en": "Second lord in Mars/Saturn sign with malefic angular/trinal occupancy, or the separate Navamsa-dispositor alternative." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):不实言语、欺骗与机巧" + ], + "effects_en": [ + "Untruthful, deceptive, cunning nature" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no157, printed157/PDF167; explicit natural classification and profile scope.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no157, printed157/PDF167; explicit natural classification and profile scope.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12247,25 +12387,36 @@ ], "note": "" }, - "effects": [ - "Untruthful, deceptive, cunning nature" - ], - "effects_en": [ - "Untruthful, deceptive, cunning nature" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Second lord in Mars/Saturn sign with malefic angular/trinal occupancy, or the separate Navamsa-dispositor alternative." }, { "id": "bvr_asubha_yoga", "name": "Asubha Yoga", "name_cn": "不祥瑜伽", - "source": "B.V. Raman", + "source": "PVR Integrated Approach, indexed page136, lines2760-2764", "bvr_id": null, "category": "special", "logic": { + "type": "lagna_presence_or_kartari_pvr", + "kind": "malefic", + "description_zh": "自然凶星占上升,或分占第2、12宫", + "description_en": "Natural malefics occupy the ascendant, or occupy both houses 2 and 12; PVR definition without an additional aspect veto." + }, + "effects": [ + "原文包含欲望、道德及他人财富的历史断语;位置结构不能确认个人道德或行为事实。" + ], + "effects_en": [ + "Inauspicious life, difficulties, physical/mental troubles" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "PVR Integrated Approach, indexed page136, lines2760-2764", + "legacy_source": "B.V. Raman", + "source_effect_review": "PVR p136; source meaning and geometric branch review, not empirical validation", + "meaning_source_reference": "PVR Integrated Approach, indexed page136, lines2760-2764", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12285,16 +12436,10 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Inauspicious life, difficulties, physical/mental troubles" ], - "effects_en": [ - "Inauspicious life, difficulties, physical/mental troubles" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Natural malefics occupy the ascendant, or occupy both houses 2 and 12; PVR definition without an additional aspect veto." }, { "id": "bvr_ayatna_griha_prapta_yoga", @@ -12310,7 +12455,7 @@ "combo_template_en": "BVR-189/190 per the PyJHora source" }, "effects": [ - "Gains property without effort, inherits house" + "既有规则的传统描述(非个人事实或结果保证):不费力获得房产或继承住宅" ], "effects_en": [ "Gains property without effort, inherits house" @@ -12319,7 +12464,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: None", - "accuracy_note": "v6.0.42 source-parity: rewritten as custom BVR-189/190 logic after A/B simulation improved recall without adding FP." + "accuracy_note": "v6.0.42 source-parity: rewritten as custom BVR-189/190 logic after A/B simulation improved recall without adding FP.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_ayatnadhanalabha_yoga", @@ -12329,6 +12475,27 @@ "bvr_id": "BVR-143", "category": "dhana", "logic": { + "type": "reviewed_raman_geometry", + "profile": "ayatnadhanalabha_143", + "description_zh": "上升主在第2宫,2宫主在上升宫,形成互换", + "description_en": "Ascendant lord in house 2 and second lord in house 1." + }, + "effects": [ + "传统描述为获得财富较为顺遂;此条原文未指定继承,不能保证实际收入。" + ], + "effects_en": [ + "Gains wealth without much effort, inherited wealth" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: BVR-143", + "english_source_reference": "Raman no.143 printed152/PDF162; source geometry, not outcome validation", + "source_effect_review": "Raman no.143 printed152/PDF162; source geometry, not outcome validation", + "legacy_effects_en": [ + "Gains wealth without much effort, inherited wealth" + ], + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12340,16 +12507,7 @@ ], "note": "Lagna lord and 2nd lord exchange their places (Parivartana)" }, - "effects": [ - "Gains wealth without much effort, inherited wealth" - ], - "effects_en": [ - "Gains wealth without much effort, inherited wealth" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-143" + "combination_en": "Ascendant lord in house 2 and second lord in house 1." }, { "id": "bvr_bahu_sthree_yoga", @@ -12364,7 +12522,7 @@ "combo_template": "PyJHora aligned source logic" }, "effects": [ - "Association with many women" + "既有规则的传统描述(非个人事实或结果保证):与多位女性交往" ], "effects_en": [ "Association with many women" @@ -12372,7 +12530,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bahudravyarjana_yoga", @@ -12412,7 +12571,7 @@ "note": "" }, "effects": [ - "Accumulates great wealth from multiple sources" + "既有规则的传统描述(非个人事实或结果保证):从多种来源积累财富" ], "effects_en": [ "Accumulates great wealth from multiple sources" @@ -12420,7 +12579,8 @@ "strength": "strong", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-129" + "evidence_note": "Source: B.V. Raman, BVR: BVR-129", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bandhu_pujya_yoga", @@ -12435,7 +12595,7 @@ "combo_template": "PyJHora aligned source logic" }, "effects": [ - "Respected and honored by relatives" + "既有规则的传统描述(非个人事实或结果保证):受到亲属尊重与礼遇" ], "effects_en": [ "Respected and honored by relatives" @@ -12443,16 +12603,40 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bhaagya_yoga", "name": "Bhaagya Yoga", "name_cn": "福气瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-241", "category": "special", "logic": { + "type": "raman_strength_qualified_geometry", + "profile": "bhagya_241", + "description_zh": "吉星位于第一、三或五宫并照射第九宫;另须核定该星综合强度与功能角色", + "summary_zh": "保留福气主题的位置支持;综合有力条件尚未核定,功能角色也会改变表现,不能据此确定富裕或好运。", + "summary_en": "Retain positional support for the traditional fortune theme. Composite strength remains unresolved and functional lordship modifies expression; wealth or good fortune is not established.", + "description_en": "A benefic in house1,3 or5 aspects house9; its composite strength and functional role require separate assessment." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):好运、机遇与神恩" + ], + "effects_en": [ + "Great fortune, luck, divine grace" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman241 positional screen only; own/exalted sign or a generic score does not substitute for total strength.", + "unresolved_source_conditions": [ + "Composite benefic strength and functional-lordship qualification" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "Raman241 printed232-233/PDF242-243; Cancer/Gemini remarks distinguish functional roles.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12462,16 +12646,8 @@ ], "note": "Strong benefic in Lagna, 3rd or 5th, simultaneously aspecting 9th" }, - "effects": [ - "Great fortune, luck, divine grace" - ], - "effects_en": [ - "Great fortune, luck, divine grace" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman241 printed232-233/PDF242-243", + "combination_en": "A benefic in house1,3 or5 aspects house9; its composite strength and functional role require separate assessment." }, { "id": "bvr_bhaarathi_yoga", @@ -12491,7 +12667,7 @@ "note": "Lord of sign occupied in navamsa by 2nd/5th/11th lord, exalted and joins the 9th lord" }, "effects": [ - "Learned, eloquent, wealthy from knowledge" + "既有规则的传统描述(非个人事实或结果保证):学识、口才与凭知识取得财富" ], "effects_en": [ "Learned, eloquent, wealthy from knowledge" @@ -12499,7 +12675,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-29" + "evidence_note": "Source: B.V. Raman, BVR: BVR-29", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bhaaskara_yoga", @@ -12516,26 +12693,32 @@ "operator": "AND", "conditions": [ { - "type": "moon_in_position_from_planet", - "from_planet": "Mercury", - "position": 11, - "note": "Moon 11th from Mercury (BVR method)" - }, - { - "type": "planet_in_position_from_planet", - "planet": "Mercury", - "from_planet": "Sun", - "position": 2, - "note": "Mercury 2nd from Sun" - }, - { - "type": "planet_in_position_from_moon", - "planet": "Jupiter", - "positions": [ - 5, - 9 + "type": "in_houses_from", + "planet": "Moon", + "from": "Sun", + "relations": [ + 11 ], - "note": "Jupiter in 5th or 9th from Moon" + "combo_template": "Moon in the 12th from Sun" + }, + { + "type": "in_houses_from", + "planet": "Mercury", + "from": "Sun", + "relations": [ + 1 + ], + "combo_template": "Mercury in the 2nd from Sun" + }, + { + "type": "in_houses_from", + "planet": "Jupiter", + "from": "Moon", + "relations": [ + 4, + 8 + ], + "combo_template": "Jupiter in the 5th or 9th from Moon" } ] } @@ -12543,7 +12726,7 @@ "note": "" }, "effects": [ - "Affluent, brave, learned, skilled in arithmetic and music" + "既有规则的传统描述(非个人事实或结果保证):富裕、勇敢、有学识,擅长算术与音乐" ], "effects_en": [ "Affluent, brave, learned, skilled in arithmetic and music" @@ -12551,7 +12734,10 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-159" + "evidence_note": "Legacy catalog attribution: B.V. Raman BVR-159. Formation checked against PVR p.144: Moon 12th from Sun, Mercury 2nd from Sun, Jupiter 5th/9th from Moon. With Mercury 2nd from Sun, the legacy Moon 11th from Mercury is equivalent. Relations use zero-based sign offsets; no prediction calibration is claimed.", + "english_source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144, P144_B002; book corpus line 2872", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144, P144_B002; book corpus line 2872" }, { "id": "bvr_bhaga_chumbana_yoga", @@ -12567,7 +12753,7 @@ "combo_template_en": "7th lord with Venus in the 4th, or the Lagna lord debilitated in D1/D9" }, "effects": [ - "Excessive sensuality, libidinous nature" + "既有规则的传统描述(非个人事实或结果保证):感官欲望或性欲较强" ], "effects_en": [ "Excessive sensuality, libidinous nature" @@ -12575,16 +12761,35 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bharyasahavyabhichara_yoga", "name": "Bharyasahavyabhichara Yoga", - "name_cn": "妻子不贞瑜伽", + "name_cn": "Bharyasahavyabhichara(传统关系结构)", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-282", "category": "kalatra", "logic": { + "type": "reviewed_raman_geometry", + "profile": "bharyasahavyabhichara_282", + "description_zh": "金星、土星、火星、月亮全部在第七宫;不将作者另述的非同格案例并作成立条件", + "description_en": "Venus, Saturn, Mars and Moon all occupy the seventh house. The author's later nonmatching anecdote is not an alternative formation rule." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):婚姻不忠或对配偶行为的质疑" + ], + "effects_en": [ + "Infidelity in marriage, spouse's questionable conduct" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no282, printed pp283-285 / PDF pp293-295, definition and remarks.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12604,16 +12809,7 @@ ], "note": "" }, - "effects": [ - "Infidelity in marriage, spouse's questionable conduct" - ], - "effects_en": [ - "Infidelity in marriage, spouse's questionable conduct" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Venus, Saturn, Mars and Moon all occupy the seventh house. The author's later nonmatching anecdote is not an alternative formation rule." }, { "id": "bvr_bhojana_soukhya_yoga", @@ -12627,7 +12823,7 @@ "expr": "\nl2 = ctx.lord_of_house(2)\nif not l2 or l2 not in ctx.planets: False\nelse:\n l2_strong = ctx.is_exalted(l2) or ctx.is_own_sign(l2) or ctx.is_moolatrikona(l2)\n ben_aspect = any(b in ctx.planets and (ctx.house_of(l2) == ctx.house_of(b) or aspect(b, l2)) for b in ['Jupiter','Venus'])\n l2_strong and ben_aspect\n" }, "effects": [ - "Enjoyment of food, pleasure in dining, hospitality" + "既有规则的传统描述(非个人事实或结果保证):享受饮食、用餐乐趣与款待他人" ], "effects_en": [ "Enjoyment of food, pleasure in dining, hospitality" @@ -12635,7 +12831,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-126" + "evidence_note": "Source: B.V. Raman, BVR: BVR-126", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_bhraathru_saapa_sutakshaya_yog", @@ -12671,7 +12868,7 @@ "expr": "\n# BVR-136 v6.0.46: L1 and L2 both in 3rd, 3rd house rasi-aspected by a benefic\nl1 = lord_of_house(1)\nl2 = lord_of_house(2)\nif not l1 or l1 not in ctx.planets or not l2 or l2 not in ctx.planets: False\nelse:\n cond1 = house_of(l1) == 3 and house_of(l2) == 3\n h3_benefic_aspected = any(rasi_aspects_house(b, 3) for b in BENEFICS if b in ctx.planets)\n cond1 and h3_benefic_aspected\n" }, "effects": [ - "Wealth through siblings" + "既有规则的传统描述(非个人事实或结果保证):通过兄弟姐妹获得财富" ], "effects_en": [ "Wealth through siblings" @@ -12679,16 +12876,35 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-180" + "evidence_note": "Source: B.V. Raman, BVR: BVR-180", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_buddhi_jada_yoga", "name": "Buddhi Jada Yoga", "name_cn": "迟钝智力瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-233", "category": "special", "logic": { + "type": "learning_expression_raman", + "profile": "buddhi_jada_233", + "description_zh": "土星居5宫并实际照射上升主;保留定义,不把后续个例扩为通用分支", + "description_en": "Saturn in fifth aspects the ascendant lord; definition only, not the later anecdote generalized." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):理解迟缓、学习缓慢与认知困难" + ], + "effects_en": [ + "Dull intellect, slow learning, mental challenges" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no233, printed222–224/PDF232–234; explicit natural classification and profile scope.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no233, printed222–224/PDF232–234; explicit natural classification and profile scope.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12734,25 +12950,34 @@ ], "note": "" }, - "effects": [ - "Dull intellect, slow learning, mental challenges" - ], - "effects_en": [ - "Dull intellect, slow learning, mental challenges" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Saturn in fifth aspects the ascendant lord; definition only, not the later anecdote generalized." }, { "id": "bvr_buddhimaturya_yoga", "name": "Buddhimaturya Yoga", "name_cn": "成熟智慧瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-231", "category": "special", "logic": { + "type": "learning_expression_raman", + "profile": "buddhimaturya_231", + "description_zh": "吉星5宫主受另一吉星照射或居吉星星座;另列5宫吉星与5宫主吉星伴随取法", + "description_en": "Benefic fifth lord receives another benefic aspect or occupies a benefic sign; separate named remarks-companion profile." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):心智成熟、超越年龄的见识与判断力" + ], + "effects_en": [ + "Mature intelligence, wise beyond years, good judgment" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no231, printed218–220/PDF228–230; explicit natural classification and profile scope.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no231, printed218–220/PDF228–230; explicit natural classification and profile scope.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12772,16 +12997,7 @@ ], "note": "" }, - "effects": [ - "Mature intelligence, wise beyond years, good judgment" - ], - "effects_en": [ - "Mature intelligence, wise beyond years, good judgment" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Benefic fifth lord receives another benefic aspect or occupies a benefic sign; separate named remarks-companion profile." }, { "id": "bvr_budha_aaditya_yoga", @@ -12824,39 +13040,11 @@ "bvr_id": "BVR-21", "category": "raja", "logic": { - "type": "compound_conditions", - "conditions": [ - { - "type": "compound", - "operator": "OR", - "conditions": [ - { - "type": "lagna_lord_exalted_in_kendra_with_jupiter_aspect", - "note": "Lagna lord exalted in a quadrant with Jupiter's aspect" - }, - { - "type": "two_benefics_in_house", - "house_offsets": [ - 6, - 8, - 9 - ], - "benefics": [ - "Jupiter", - "Venus", - "Mercury", - "Moon" - ], - "count": 2, - "note": "Two benefics join in 7th, 9th or 10th" - } - ] - } - ], - "note": "" + "type": "chaamara_pvr", + "note": "PVR corpus p137 L2782; two explicit alternatives, no invented strength threshold" }, "effects": [ - "Great fame, honored by kings, eloquent" + "既有规则的传统描述(非个人事实或结果保证):声誉、统治者的礼遇与口才" ], "effects_en": [ "Great fame, honored by kings, eloquent" @@ -12864,7 +13052,10 @@ "strength": "strong", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-21" + "evidence_note": "Source: B.V. Raman, BVR: BVR-21", + "english_source_reference": "PVR Integrated Approach, corpus p137 L2782; named profile, not verification of the legacy BVR-21 identifier.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "combination_en": "Exalted ascendant lord in a quadrant receives Jupiter's aspect, or at least two natural benefics share house 7, 9 or 10." }, { "id": "bvr_chakra_yoga", @@ -12899,6 +13090,24 @@ "bvr_id": "BVR-57", "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "chandika_57", + "description_zh": "固定上升受到6宫主照射,6及9宫主的D9定位星均与太阳在D1同宫", + "description_en": "Fixed ascendant receives the sixth lord aspect; D9 dispositors of sixth and ninth lords join Sun in D1." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):强悍、获胜与击败对手" + ], + "effects_en": [ + "Fierce, victorious, destroys enemies" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: BVR-57", + "english_source_reference": "Raman no.57 printed84/PDF94 lines2744-2763", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -12918,16 +13127,7 @@ ], "note": "" }, - "effects": [ - "Fierce, victorious, destroys enemies" - ], - "effects_en": [ - "Fierce, victorious, destroys enemies" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-57" + "combination_en": "Fixed ascendant receives the sixth lord aspect; D9 dispositors of sixth and ninth lords join Sun in D1." }, { "id": "bvr_chapa_yoga", @@ -12944,14 +13144,16 @@ "operator": "AND", "conditions": [ { - "type": "house_lord_exchange", - "house1": 4, - "house2": 10, - "note": "4th and 10th lords exchange signs (Parivartana)" + "type": "parivartana", + "lord_a": "lord:4", + "lord_b": "lord:10", + "combo_template": "Fourth and tenth lords exchange signs" }, { - "type": "lagna_lord_exalted", - "note": "Lagna lord is exalted" + "type": "dignity", + "planet": "lord:1", + "dignity": "exalted", + "combo_template": "Ascendant lord is exalted" } ] } @@ -12967,8 +13169,10 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-30", - "meaning_source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144; book corpus line 2884" + "evidence_note": "Legacy catalog attribution: B.V. Raman BVR-30. Formation and meaning checked against PVR p.144. Existing Parivartana and exaltation predicates are reused; no strength or event realization is implied.", + "meaning_source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144; book corpus line 2884", + "english_source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144; book corpus line 2884", + "source_reference": "PVR, Vedic Astrology: An Integrated Approach, p.144; book corpus line 2884" }, { "id": "bvr_daama_yoga", @@ -12998,7 +13202,7 @@ "note": "7 visible planets occupy exactly 6 distinct signs" }, "effects": [ - "Leader, wealthy, charitable" + "既有规则的传统描述(非个人事实或结果保证):领导、财富与慈善" ], "effects_en": [ "Leader, wealthy, charitable" @@ -13006,7 +13210,8 @@ "strength": "occasional", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-92" + "evidence_note": "Source: B.V. Raman, BVR: BVR-92", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_dama_yoga", @@ -13041,6 +13246,25 @@ "bvr_id": null, "category": "putra", "logic": { + "type": "dattaputra_raman" + }, + "effects": [ + "传统收养主题;不能据此认定生育能力、亲生子女数量或实际收养经历" + ], + "effects_en": [ + "Adoption of a child, childless by own birth" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, nos222-223, printed pp212-213 / PDF pp222-223. Literal definition profile; explanatory remarks do not silently replace its AND with OR.", + "source_effect_review": "Raman222-223 definition review2026-11-23; bounded adoption theme, not fertility or personal-history assertion", + "legacy_effects_en": [ + "Adoption of a child, childless by own birth" + ], + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13087,16 +13311,7 @@ ], "note": "" }, - "effects": [ - "Adoption of a child, childless by own birth" - ], - "effects_en": [ - "Adoption of a child, childless by own birth" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "222: Mars and Saturn fifth; ascendant lord in a Mercury sign and conjoined with or aspected by Mercury. 223: seventh lord eleventh; fifth lord conjoins a distinct benefic; Mars or Saturn fifth. Alternatives are not independent votes." }, { "id": "bvr_dehasthoulya_yoga", @@ -13130,7 +13345,7 @@ "note": "" }, "effects": [ - "Stout/heavy body, obesity tendency" + "既有规则的传统描述(非个人事实或结果保证):体型壮实、体重较大或肥胖倾向" ], "effects_en": [ "Stout/heavy body, obesity tendency" @@ -13138,7 +13353,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-114" + "evidence_note": "Source: B.V. Raman, BVR: BVR-114", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_devendra_yoga", @@ -13148,32 +13364,42 @@ "bvr_id": "BVR-55", "category": "raja", "logic": { - "type": "compound_conditions", + "type": "and", "conditions": [ { - "type": "compound", - "operator": "AND", - "conditions": [ - { - "type": "lagna_in_fixed_sign", - "note": "Lagna in a fixed sign" - }, - { - "type": "house_lord_exchange", - "house1": 2, - "house2": 10, - "note": "2nd and 10th lords exchange" - }, - { - "type": "house_lord_exchange", - "house1": 1, - "house2": 11, - "note": "1st and 11th lords exchange" - } + "type": "custom", + "expr": "house_sign(1) in ('Taurus', 'Leo', 'Scorpio', 'Aquarius')", + "combo_template": "Fixed-sign ascendant" + }, + { + "type": "in_houses", + "planet": "lord:2", + "houses": [ + 10 + ] + }, + { + "type": "in_houses", + "planet": "lord:10", + "houses": [ + 2 + ] + }, + { + "type": "in_houses", + "planet": "lord:1", + "houses": [ + 11 + ] + }, + { + "type": "in_houses", + "planet": "lord:11", + "houses": [ + 1 ] } - ], - "note": "" + ] }, "effects": [ "传统含义:领导倾向、吸引力、情感投入与声誉;书中另有长寿之说,不据此断定个人寿命" @@ -13185,16 +13411,38 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-55", - "meaning_source_reference": "PVR Integrated Approach p.143, Devendra Yoga." + "meaning_source_reference": "PVR Integrated Approach p.143, Devendra Yoga.", + "english_source_reference": "PVR Integrated Approach p.143; traditional description, not predictive validation.", + "source_reference": "PVR Integrated Approach p.143, Devendra Yoga; legacy BVR identifier retained for compatibility.", + "combination_en": "Fixed ascendant; second/tenth lords exchange their named houses and first/eleventh lords exchange their named houses." }, { "id": "bvr_dhatrutwa_yoga", "name": "Dhatrutwa Yoga", "name_cn": "善施主瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-243", "category": "special", "logic": { + "type": "dhatrutwa_raman" + }, + "effects": [ + "传统上与慷慨、施予主题相关;不能据此确定现实品德、财富或宗教地位" + ], + "effects_en": [ + "Charitable, respected spiritual leader, generous" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no243, printed pp234-236 / PDF pp244-246, definition and alternatives (a), (b).", + "source_effect_review": "Raman243 source review2026-11-23; unsupported spiritual-authority gloss removed", + "legacy_effects_en": [ + "Charitable, respected spiritual leader, generous" + ], + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13221,25 +13469,34 @@ ], "note": "" }, - "effects": [ - "Charitable, respected spiritual leader, generous" - ], - "effects_en": [ - "Charitable, respected spiritual leader, generous" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Raman243: the definition and two explicit alternatives are evaluated separately. Matching alternatives are not independent votes." }, { "id": "bvr_dhur_yoga", - "name": "Dhur Yoga", + "name": "Duryoga", "name_cn": "障碍瑜伽", "source": "B.V. Raman", "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "duryoga_103", + "description_zh": "10宫主落第6、8或12宫", + "description_en": "Tenth lord in house 6, 8 or 12." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):事业障碍与职业困难" + ], + "effects_en": [ + "Obstacles to career, difficulties in profession" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.103; printed127/PDF137; geometry only, not observed outcomes", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13255,16 +13512,9 @@ ], "note": "10th lord in 6th, 8th or 12th house" }, - "effects": [ - "Obstacles to career, difficulties in profession" - ], - "effects_en": [ - "Obstacles to career, difficulties in profession" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "legacy_name": "Dhur Yoga", + "source_reference": "Raman, Three Hundred Important Combinations, no.103; printed127/PDF137; geometry only, not observed outcomes", + "combination_en": "Tenth lord in house 6, 8 or 12." }, { "id": "bvr_dhurmarana_yoga", @@ -13278,7 +13528,7 @@ "expr": "\nif 'Moon' not in ctx.planets: False\nelse:\n moon_h = ctx.house_of('Moon')\n if moon_h not in (6,8,12): False\n else:\n l1 = ctx.lord_of_house(1)\n l1_link = l1 in ctx.planets and (ctx.house_of(l1) == moon_h or aspect(l1, 'Moon'))\n sat_rahu = any(p in ctx.planets and ctx.house_of(p) == moon_h for p in ['Saturn','Rahu'])\n l1_link and sat_rahu\n" }, "effects": [ - "Unnatural or violent death, danger from accidents" + "既有规则的传统描述(非个人事实或结果保证):非自然或暴力死亡、意外危险;不能据此预测死亡方式" ], "effects_en": [ "Unnatural or violent death, danger from accidents" @@ -13286,16 +13536,34 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-215" + "evidence_note": "Source: B.V. Raman, BVR: BVR-215", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_durmarana_yoga", "name": "Durmarana Yoga", "name_cn": "横死瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-274", "category": "special", "logic": { + "type": "durmarana_geometry_raman", + "description_zh": "月亮在第6、8或12宫,受上升主照射,并与土星、Maandi或罗睺同宫(Raman274定义)。", + "description_en": "Moon in house 6, 8 or 12, aspected by the ascendant lord and associated with Saturn, Maandi or Rahu." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):非自然或暴力死亡;不能据此预测死亡方式" + ], + "effects_en": [ + "Unnatural death, violent end" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman274 definition geometry only. Later illustrative death configurations are not additional definition branches. No mortality outcome established.", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations,274, printed p277 / PDF p287, definition.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13315,16 +13583,7 @@ ], "note": "" }, - "effects": [ - "Unnatural death, violent end" - ], - "effects_en": [ - "Unnatural death, violent end" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Moon in house 6, 8 or 12, aspected by the ascendant lord and associated with Saturn, Maandi or Rahu." }, { "id": "bvr_dwadasa_sahodara_yoga", @@ -13338,7 +13597,7 @@ "expr": "\nif 'Jupiter' not in ctx.planets: False\nelse:\n jup_aspects_5 = aspect('Jupiter', 5)\n l5 = ctx.lord_of_house(5)\n jup_aspects_l5 = l5 in ctx.planets and aspect('Jupiter', l5)\n l1 = ctx.lord_of_house(1)\n l1_in_3_11 = l1 in ctx.planets and ctx.house_of(l1) in (3, 11)\n (jup_aspects_5 or jup_aspects_l5) and l1_in_3_11\n" }, "effects": [ - "Twelve siblings, large family" + "既有规则的传统描述(非个人事实或结果保证):十二位手足与大家庭;不能据此确认亲属人数" ], "effects_en": [ "Twelve siblings, large family" @@ -13346,7 +13605,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-178" + "evidence_note": "Source: B.V. Raman, BVR: BVR-178", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_ekabhagini_yoga", @@ -13356,6 +13616,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "ekabhagini_179", + "description_zh": "水星在第3宫,3宫主与月亮同宫,火星与土星同宫", + "description_en": "Mercury in house 3; third lord joins Moon; Mars joins Saturn." + }, + "effects": [ + "传统描述指向一位姐妹;亲属人数不能仅凭此配置确认,原文另有强弱修饰条件。" + ], + "effects_en": [ + "Only one sister, or loss of sisters" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.179; printed172/PDF182; geometry only, not observed outcomes", + "source_effect_review": "Raman no.179 printed172; removes unsupported loss-of-sisters gloss; not outcome validation", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13381,16 +13659,8 @@ ], "note": "" }, - "effects": [ - "Only one sister, or loss of sisters" - ], - "effects_en": [ - "Only one sister, or loss of sisters" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman, Three Hundred Important Combinations, no.179; printed172/PDF182; geometry only, not observed outcomes", + "combination_en": "Mercury in house 3; third lord joins Moon; Mars joins Saturn." }, { "id": "bvr_gaja_yoga", @@ -13422,9 +13692,30 @@ "name": "Galakarna Yoga", "name_cn": "耳鸣瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-264", "category": "special", "logic": { + "type": "galakarna_raman", + "description_zh": "Maandi与罗睺同在第3宫,或火星在第3宫且落入Raman第十二具名六十分区;罗睺凶性分区的补充口径另列。", + "description_en": "Maandi and Rahu in the third, or Mars in the third in Preta Puriha (ordinal12, even-sign reverse order). Rahu cruel-amsa remarks remain unresolved." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):耳部问题、听力问题与耳鸣;不是医学诊断" + ], + "effects_en": [ + "Ear problems, hearing issues, tinnitus" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Both definition branches executable. Manual art127 identifies Preta Puriha as ordinal12 with even-sign reversal; absolute longitude or explicit degree_in_sign required. Rahu cruel-amsa remarks remain unresolved.", + "unresolved_source_conditions": [ + "Rahu cruel shashtiamsa method" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "partial_named_amsa_unresolved", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations,264 printed260; A Manual of Hindu Astrology art127 printed103–104, corpus indexed286/288 lines2874–2900.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13444,25 +13735,39 @@ ], "note": "" }, - "effects": [ - "Ear problems, hearing issues, tinnitus" - ], - "effects_en": [ - "Ear problems, hearing issues, tinnitus" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Maandi and Rahu in the third, or Mars in the third in Preta Puriha (ordinal12, even-sign reverse order). Rahu cruel-amsa remarks remain unresolved." }, { "id": "bvr_gandharva_yoga", "name": "Gandharva Yoga", "name_cn": "乐神瑜伽", - "source": "B.V. Raman", + "source": "PVR Narasimha Rao, An Integrated Approach, indexed144", "bvr_id": "BVR-60", "category": "special", "logic": { + "type": "gandharva_pvr_geometry", + "description_zh": "PVR四项位置条件分别核对;太阳综合有力仍需独立判定。", + "description_en": "Tenth lord in3/7/11; ascendant lord contacted by Jupiter; Sun exalted and separately strong; Moon ninth. Positional candidate only until strength is assessed." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):音乐、舞蹈与艺术才能,以及吸引力" + ], + "effects_en": [ + "Gifted in music, dance, arts; charming personality" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Partial geometry implementation, never complete formation merely because a callable predicate exists.", + "unresolved_source_conditions": [ + "Source-admitted composite solar strength criterion", + "Self-association when Jupiter rules Lagna requires source choice" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "geometry_only_strength_unresolved", + "english_source_reference": "PVR_Integrated_Approach.md indexed144 line2878; named PVR profile, not a merged Raman remarks variant.", + "legacy_source": "B.V. Raman", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13495,16 +13800,7 @@ ], "note": "" }, - "effects": [ - "Gifted in music, dance, arts; charming personality" - ], - "effects_en": [ - "Gifted in music, dance, arts; charming personality" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-60" + "combination_en": "Tenth lord in3/7/11; ascendant lord contacted by Jupiter; Sun exalted and separately strong; Moon ninth. Positional candidate only until strength is assessed." }, { "id": "bvr_garuda_yoga", @@ -13514,6 +13810,24 @@ "bvr_id": "BVR-66", "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "garuda_66", + "description_zh": "昼生、盈月,月亮D9定位星在D1入旺", + "description_en": "Day birth with waxing Moon; the dispositor of Moon in D9 is exalted in D1." + }, + "effects": [ + "传统主题包括言语修养与受人尊重。原书对34岁中毒危险的依据提出疑问,此配置不能据此推出年龄、疾病或危险事件。" + ], + "effects_en": [ + "Long-lived, powerful, commands fear and respect" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: BVR-66", + "english_source_reference": "Raman no.66 printed97-99/PDF107-109 lines3083-3131", + "source_effect_review": "Raman no.66 printed97-99/PDF107-109 lines3083-3131", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13533,16 +13847,10 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Long-lived, powerful, commands fear and respect" ], - "effects_en": [ - "Long-lived, powerful, commands fear and respect" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-66" + "combination_en": "Day birth with waxing Moon; the dispositor of Moon in D9 is exalted in D1." }, { "id": "bvr_gouri_yoga", @@ -13563,7 +13871,7 @@ "note": "10th lord's navamsa dispositor is exalted in 10th and lagna lord joins him" }, "effects": [ - "Royal honors, wealth, fame, virtuous" + "既有规则的传统描述(非个人事实或结果保证):统治者礼遇、财富、声誉与德行" ], "effects_en": [ "Royal honors, wealth, fame, virtuous" @@ -13571,7 +13879,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-28" + "evidence_note": "Source: B.V. Raman, BVR: BVR-28", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_grihanasa_yoga", @@ -13614,7 +13923,7 @@ "note": "" }, "effects": [ - "Loss or destruction of property/house" + "既有规则的传统描述(非个人事实或结果保证):房产或住宅损失、毁坏" ], "effects_en": [ "Loss or destruction of property/house" @@ -13622,7 +13931,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_grihanasa_yoga_planet_position", @@ -13636,7 +13946,7 @@ "expr": "\nl4 = ctx.lord_of_house(4)\nl4_dust = l4 in ctx.planets and ctx.house_of(l4) in (6,8,12)\nl4_asp = l4 in ctx.planets and any(m in ctx.planets and aspect(m, l4) for m in ['Mars','Saturn','Rahu','Ketu'])\njup_dust = 'Jupiter' in ctx.planets and ctx.house_of('Jupiter') in (6,8,12)\n(l4_dust and l4_asp) or jup_dust\n" }, "effects": [ - "Loss or destruction of property/house" + "既有规则的传统描述(非个人事实或结果保证):房产或住宅损失、毁坏" ], "effects_en": [ "Loss or destruction of property/house" @@ -13644,7 +13954,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-192b" + "evidence_note": "Source: B.V. Raman, BVR: BVR-192b", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_guhyaroga_yoga", @@ -13664,7 +13975,7 @@ "note": "Moon joins malefics in navamsa of Cancer or Scorpio" }, "effects": [ - "Secret/hidden diseases, diseases of private parts" + "既有规则的传统描述(非个人事实或结果保证):隐疾或私密部位疾病;不是医学诊断" ], "effects_en": [ "Secret/hidden diseases, diseases of private parts" @@ -13672,7 +13983,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_harsha_yoga", @@ -13685,12 +13997,15 @@ "type": "compound_conditions", "conditions": [ { - "type": "lord_in_own_house", - "house": 6, - "note": "6th lord occupies the 6th house (Vipareeta Raja Yoga)" + "type": "in_houses", + "planet": "lord:6", + "houses": [ + 6 + ], + "note": "PVR p.145: 6th lord occupies the 6th house; not the broader dusthana-exchange variant." } ], - "note": "6th lord occupies the 6th house (Vipareeta Raja Yoga)" + "note": "6th lord occupies the 6th house, PVR p.145." }, "effects": [ "传统含义:愉悦、坚韧、善意与应对竞争的能力;不保证具体结果" @@ -13702,40 +14017,26 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-105", - "meaning_source_reference": "PVR Integrated Approach p.145, Harsha Yoga, line 2894." + "meaning_source_reference": "PVR Integrated Approach p.145, Harsha Yoga, line 2894.", + "english_source_reference": "PVR Integrated Approach p.145, Harsha Yoga; conditional traditional meaning, not outcome validation.", + "source_reference": "PVR Integrated Approach p.145, Harsha Yoga, line 2894; legacy BVR attribution retained separately.", + "combination_en": "The lord of house 6 occupies house 6. This is the same-house definition, not an interchangeable placement anywhere in houses 6, 8 or 12." }, { "id": "bvr_jada_yoga", "name": "Jada Yoga", - "name_cn": "迟钝语言瑜伽", + "name_cn": "公众表达紧张配置", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": 158, "category": "special", "logic": { - "type": "compound_conditions", - "conditions": [ - { - "type": "compound", - "operator": "OR", - "conditions": [ - { - "type": "lord_in_house_with_malefics", - "lord_of": 2, - "house_offset": 9, - "note": "2nd lord in 10th with malefics" - }, - { - "type": "sun_and_mandi_in_house", - "house_offset": 1, - "note": "Sun and Mandi in 2nd house" - } - ] - } - ], - "note": "" + "type": "jada_apakeerti_raman", + "profile": "jada_158", + "description_zh": "2宫主在10宫与其他凶星同宫,或太阳与Maandi同在2宫;2宫主的D9吉星星座缓解条件独立核对", + "description_en": "Second lord in house 10 with another malefic, or Sun and Maandi in house 2; assess the second lord's benefic Navamsa separately." }, "effects": [ - "Dull speech, stammering, incoherent communication" + "传统描述为公众场合表达时容易紧张;原文指出2宫主处于吉星分盘星座时作用减弱,不等于智力、口吃或语言障碍诊断。" ], "effects_en": [ "Dull speech, stammering, incoherent communication" @@ -13743,7 +14044,13 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman158 printed157–158/PDF167–168", + "source_effect_review": "Raman158 printed157–158/PDF167–168: both alternatives executed; benefic Navamsa separately qualifies expression; no outcome validation.", + "legacy_effects_en": [ + "Dull speech, stammering, incoherent communication" + ], + "combination_en": "Second lord in house 10 with another malefic, or Sun and Maandi in house 2; assess the second lord's benefic Navamsa separately." }, { "id": "bvr_jananatpurvam_pitru_marana_yog", @@ -13778,6 +14085,24 @@ "bvr_id": null, "category": "kalatra", "logic": { + "type": "reviewed_raman_geometry", + "profile": "jara_236", + "description_zh": "第10、2、7宫主均位于第10宫;只记录原文位置结构", + "description_en": "Lords of houses 10, 2 and 7 occupy house 10; geometric definition only." + }, + "effects": [ + "原文讨论婚外关系,但作者本人反对由此位置组合直接判断品行,并举处女上升为反例;本项不能证明不忠、实际关系或第三方行为。" + ], + "effects_en": [ + "Extra-marital relations, illicit love affairs" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman no.236 printed226-228/PDF236-238; retain author disagreement, not moral diagnosis", + "source_effect_review": "Raman no.236 printed226-228/PDF236-238; retain author disagreement, not moral diagnosis", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13787,25 +14112,47 @@ ], "note": "10th house occupied by lords of 10th, 2nd and 7th" }, - "effects": [ + "legacy_effects_en": [ "Extra-marital relations, illicit love affairs" ], - "effects_en": [ - "Extra-marital relations, illicit love affairs" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Lords of houses 10, 2 and 7 occupy house 10; geometric definition only." }, { "id": "bvr_jarajaputra_yoga", "name": "Jarajaputra Yoga", "name_cn": "私生子瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-237", "category": "putra", "logic": { + "type": "raman_strength_qualified_geometry", + "profile": "jarajaputra_237", + "description_zh": "第五、第七宫主与第六宫主同宫,接受自然吉星照射;第五、第七宫主另须有力", + "summary_zh": "仅记录同宫与受照结构,两位宫主有力的条件尚待核定;不能据此认定不忠、亲子身世或生育能力。", + "summary_en": "Conjunction and received-aspect geometry only; the two lords' separate strength qualifier remains unresolved. No infidelity, paternity or fertility conclusion is established.", + "description_en": "Fifth and seventh lords join the sixth lord and receive a natural-benefic aspect; powerful fifth/seventh lords remain a separate unassessed qualifier." + }, + "effects": [ + "保留历史亲子与行为归因的原意,不据此认定不忠、亲属身世或生育能力。" + ], + "effects_en": [ + "Children from illicit relations" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman no237 printed228/PDF238: strength of fifth/seventh lords is separate from conjunction and received benefic aspect.", + "unresolved_source_conditions": [ + "Source-admitted strength assessment for fifth and seventh lords" + ], + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "geometry_only_qualification_unresolved", + "english_source_reference": "Raman, Three Hundred Important Combinations, no237 printed228/PDF238; received Parashari aspect convention; no outcome admission.", + "legacy_effects": [ + "既有规则的传统描述(非个人事实或结果保证):婚外关系中的子女;不能据此确认亲属身世" + ], + "source_effect_review": "Raman237 source-located conditional expression; not independent outcome validation", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -13825,16 +14172,11 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Children from illicit relations" ], - "effects_en": [ - "Children from illicit relations" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman, Three Hundred Important Combinations, no237 printed228/PDF238.", + "combination_en": "Fifth and seventh lords join the sixth lord and receive a natural-benefic aspect; powerful fifth/seventh lords remain a separate unassessed qualifier." }, { "id": "bvr_kaalanirdesat_puthra_yoga", @@ -13910,7 +14252,7 @@ "note": "Jupiter in 2nd or 5th house, conjoined or aspected by Mercury and Venus" }, "effects": [ - "Skilled in fine arts, music, dance; cultured and wealthy" + "PVR传统描述涉及品格、快乐、健康、财富、学识与社会礼遇;这些是传统解释,不能单凭格局确认个人结果" ], "effects_en": [ "Skilled in fine arts, music, dance; cultured and wealthy" @@ -13918,7 +14260,10 @@ "strength": "strong", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-49" + "evidence_note": "Source: B.V. Raman, BVR: BVR-49", + "english_source_reference": "PVR Integrated Approach, corpus p139 L2806 (Kalaanidhi); corroborates the implemented two-benefactor condition, without independent outcome validation.", + "source_effect_review": "PVR corpus p139 L2806; source paraphrase, not outcome admission", + "combination_en": "Jupiter occupies house 2 or 5 and receives conjunction or aspect from both Mercury and Venus; either planet alone is insufficient." }, { "id": "bvr_kalpadruma_yoga", @@ -13947,7 +14292,10 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-47b", - "meaning_source_reference": "PVR Integrated Approach, source p.139, L2810-L2812; results and author footnote 34" + "meaning_source_reference": "PVR Integrated Approach, source p.139, L2810-L2812; results and author footnote 34", + "english_source_reference": "PVR Integrated Approach pp.139–140; named-chain example checks the formula, not predictive accuracy.", + "source_reference": "PVR Integrated Approach pp.139–140, Kalpadruma definition and Shivaji named-chain example; legacy BVR identifier retained.", + "combination_en": "The ascendant lord, its D1 dispositor, and that second planet's D1 and D9 dispositors must each occupy a natal quadrant, trine or exaltation sign. Repeated planets are shared witnesses, not independent confirmation." }, { "id": "bvr_karascheda_yoga", @@ -13981,7 +14329,7 @@ "note": "" }, "effects": [ - "Danger of amputation, loss of hand/arm" + "既有规则的传统描述(非个人事实或结果保证):截肢或失去手臂的危险;不能据此预测伤残" ], "effects_en": [ "Danger of amputation, loss of hand/arm" @@ -13989,7 +14337,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_kedaara_yoga", @@ -14019,7 +14368,7 @@ "note": "7 visible planets occupy exactly 4 distinct signs" }, "effects": [ - "Lives by agriculture, helpful, amasses wealth" + "既有规则的传统描述(非个人事实或结果保证):以农业为生、乐于助人与积累财富" ], "effects_en": [ "Lives by agriculture, helpful, amasses wealth" @@ -14027,16 +14376,35 @@ "strength": "occasional", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-94" + "evidence_note": "Source: B.V. Raman, BVR: BVR-94", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_khalwata_yoga", "name": "Khalwata Yoga", "name_cn": "秃头瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-295", "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "khalwata_295", + "description_zh": "上升为白羊、狮子、天蝎、摩羯、水瓶、射手或金牛,且受自然凶星照射", + "description_en": "Ascendant in Aries, Leo, Scorpio, Capricorn, Aquarius, Sagittarius or Taurus, with a malefic aspect required in every case. Uses classical planetary aspects without node aspects." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):秃发或脱发;不是医学诊断" + ], + "effects_en": [ + "Baldness or hair loss" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no295, printed pp300-301 / PDF pp310-311, definition and remarks.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14046,16 +14414,7 @@ ], "note": "Lagna in malefic sign (Ar/Sc/Cp/Aq) or Sg/Ta aspected by malefics" }, - "effects": [ - "Baldness or hair loss" - ], - "effects_en": [ - "Baldness or hair loss" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Ascendant in Aries, Leo, Scorpio, Capricorn, Aquarius, Sagittarius or Taurus, with a malefic aspect required in every case. Uses classical planetary aspects without node aspects." }, { "id": "bvr_krisanga_yoga", @@ -14095,7 +14454,7 @@ "note": "" }, "effects": [ - "Lean/thin body, frail constitution" + "既有规则的传统描述(非个人事实或结果保证):体型消瘦与体质较弱" ], "effects_en": [ "Lean/thin body, frail constitution" @@ -14103,7 +14462,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-112" + "evidence_note": "Source: B.V. Raman, BVR: BVR-112", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_kushtaroga_yoga", @@ -14113,6 +14473,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "kushtaroga_268_269", + "description_zh": "第268条:上升主、火星、水星同在第四或十二宫;第269条:木星、土星、月亮同在第六宫;两条分别核对", + "description_en": "268: ascendant lord, Mars and Mercury together in fourth or twelfth. 269: Jupiter, Saturn and Moon together in sixth. Alternatives retain separate status; no disease or age-of-onset claim follows." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):皮肤疾病、麻风或皮炎;不是医学诊断" + ], + "effects_en": [ + "Skin diseases, leprosy, dermatitis" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, nos268-269, printed pp265-266/PDF275-276, including author's caution and untested age claim.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14132,16 +14510,7 @@ ], "note": "" }, - "effects": [ - "Skin diseases, leprosy, dermatitis" - ], - "effects_en": [ - "Skin diseases, leprosy, dermatitis" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "268: ascendant lord, Mars and Mercury together in fourth or twelfth. 269: Jupiter, Saturn and Moon together in sixth. Alternatives retain separate status; no disease or age-of-onset claim follows." }, { "id": "bvr_laabha_malika_yoga", @@ -14151,6 +14520,24 @@ "bvr_id": "BVR-42", "category": "dhana", "logic": { + "type": "reviewed_raman_geometry", + "profile": "labha_malika_42", + "description_zh": "七颗传统行星连续占据第11、12、1、2、3、4、5宫,不含交点", + "description_en": "Seven classical planets occupy seven consecutive houses beginning with house 11; nodes excluded." + }, + "effects": [ + "Raman 此条涉及技能,另有含义待核的女性相关旧式措辞;不能据此断定多来源财富、伴侣容貌或具体关系。" + ], + "effects_en": [ + "Wealth from multiple sources, gains and profits" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: BVR-42", + "english_source_reference": "Raman, Three Hundred Important Combinations, nos.32-43, printed65-66/PDF75-76; selected contiguous-house definition, not the separately discussed Bhavartha Ratnakara variant.", + "source_effect_review": "source-located geometry and historical meaning; no independent outcome validation", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14161,16 +14548,10 @@ ], "note": "Malika Yoga (planets in consecutive houses) starting from 11th house" }, - "effects": [ + "legacy_effects_en": [ "Wealth from multiple sources, gains and profits" ], - "effects_en": [ - "Wealth from multiple sources, gains and profits" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-42" + "combination_en": "Seven classical planets occupy seven consecutive houses beginning with house 11; nodes excluded." }, { "id": "bvr_maalavya_yoga", @@ -14246,6 +14627,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "marud_160", + "description_zh": "木星在金星起第5或9宫,月亮在木星起第5宫,太阳在月亮起角宫", + "description_en": "Jupiter fifth or ninth from Venus, Moon fifth from Jupiter, Sun angular from Moon." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):声誉、财富、精神知识与威仪" + ], + "effects_en": [ + "Fame, wealth, spiritual knowledge, commanding" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: Classical, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.160; printed159/PDF169; geometry only, not observed outcomes", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14279,16 +14678,8 @@ ], "note": "" }, - "effects": [ - "Fame, wealth, spiritual knowledge, commanding" - ], - "effects_en": [ - "Fame, wealth, spiritual knowledge, commanding" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: Classical, BVR: None" + "source_reference": "Raman, Three Hundred Important Combinations, no.160; printed159/PDF169; geometry only, not observed outcomes", + "combination_en": "Jupiter fifth or ninth from Venus, Moon fifth from Jupiter, Sun angular from Moon." }, { "id": "bvr_mathibhramana_yoga", @@ -14304,7 +14695,7 @@ "combo_template_en": "Jupiter and Mars in 1/7, Saturn in the Lagna with Mars in 5/7/9, Saturn in the 12th with a waning Moon, or a BVR mental-affliction variant" }, "effects": [ - "Mental disturbance, confusion, erratic behavior" + "既有规则的传统描述(非个人事实或结果保证):精神困扰、混乱与行为不稳定;不是医学诊断" ], "effects_en": [ "Mental disturbance, confusion, erratic behavior" @@ -14313,7 +14704,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: None", - "accuracy_note": "v6.0.50: mathibhramana 294 fix: Moon/Mercury aspected by OR conjoined with any planet (was: aspected only)" + "accuracy_note": "v6.0.50: mathibhramana 294 fix: Moon/Mercury aspected by OR conjoined with any planet (was: aspected only)", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_mathibhramana_yoga_variation", @@ -14340,11 +14732,33 @@ { "id": "bvr_matru_satrutwa_yoga", "name": "Matru Satrutwa Yoga", - "name_cn": "母亲仇视瑜伽", + "name_cn": "Matru Satrutwa(传统母子关系结构)", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-207", "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "matru_satrutwa_207", + "description_zh": "水星同时为第一、四宫主(仅双子上升),与另一自然凶星同宫或受其照射", + "description_en": "Mercury rules both the first and fourth houses (Gemini ascendant only) and conjoins or receives an aspect from a distinct natural malefic; node aspects are not used." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):与母亲的冲突或母亲相关困难" + ], + "effects_en": [ + "Enmity with mother, difficulties through mother" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no207, printed p195 / PDF p205. Subsequent two-person Navamsa observation is expressly tentative, not an alternate rule.", + "source_effect_review": "Raman207 source review2026-11-23; no observed hatred or family conduct established", + "legacy_effects_en": [ + "Enmity with mother, difficulties through mother" + ], + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14364,16 +14778,7 @@ ], "note": "" }, - "effects": [ - "Enmity with mother, difficulties through mother" - ], - "effects_en": [ - "Enmity with mother, difficulties through mother" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Mercury rules both the first and fourth houses (Gemini ascendant only) and conjoins or receives an aspect from a distinct natural malefic; node aspects are not used." }, { "id": "bvr_matru_satrutwa_yoga_from_plane", @@ -14387,15 +14792,18 @@ "expr": "\nl1 = ctx.lord_of_house(1)\nl4 = ctx.lord_of_house(4)\nif not l1 or not l4 or l1 != l4 or l1 != 'Mercury': False\nelse:\n any(m in ctx.planets and (ctx.house_of('Mercury') == ctx.house_of(m) or aspect(m, 'Mercury')) for m in ['Mars','Saturn','Rahu','Ketu'])\n" }, "effects": [ - "Difficult relationship with mother" + "既有规则的传统描述(非个人事实或结果保证):与母亲的关系困难" ], "effects_en": [ "Difficult relationship with mother" ], "strength": "moderate", - "enabled": true, + "enabled": false, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-185b" + "evidence_note": "Source: B.V. Raman, BVR: BVR-185b", + "retirement_reason": "Duplicate partial implementation of Raman207; retained for historical lookup, not independent evidence. Canonical definition uses explicit natural-malefic convention.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "alias_of": "bvr_matru_satrutwa_yoga" }, { "id": "bvr_matru_sneha_yoga", @@ -14411,7 +14819,7 @@ "combo_template_en": "1st and 4th lords identical, friendly, or both aspected by benefics" }, "effects": [ - "Deep love and affection with mother" + "既有规则的传统描述(非个人事实或结果保证):与母亲的亲近与关爱;不是对实际亲子关系的确认" ], "effects_en": [ "Deep love and affection with mother" @@ -14419,16 +14827,43 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.208, printed195-196 (PDF205-206); friendship is mutual, not a one-direction relation.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "combination_en": "The first and fourth houses share a lord, or their lords are mutual natural or temporary friends, or both receive benefic aspects. The retained implementation uses its explicit PyJHora natural-benefic convention." }, { "id": "bvr_matrudeerghayur_yoga", "name": "Matrudeerghayur Yoga", "name_cn": "母长寿瑜伽", - "source": "B.V. Raman", - "bvr_id": null, + "source": "B.V. Raman, Three Hundred Important Combinations,196–197 printed187", + "bvr_id": "BVR-196/197", "category": "special", "logic": { + "type": "matrudeerghayur_raman_geometry", + "description_zh": "Raman196与197分别核对本命位置及第四宫主的D9定位星;综合有力条件保留。", + "description_en": "196: benefic fourth occupant, exalted fourth lord and strong Moon.197: the dispositor of the fourth lord's Navamsa strong and angular from both ascendant and Moon. Strength remains unresolved." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):母亲长寿与健康;不能据此确定亲属寿命或健康" + ], + "effects_en": [ + "Mother lives long, mother's health is good" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Partial geometry implementation, never complete formation merely because a callable predicate exists.", + "unresolved_source_conditions": [ + "Composite Moon strength for196", + "Composite fourth-lord Navamsa dispositor strength for197", + "Whole fourth-house qualification in author remarks" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "geometry_only_strength_unresolved", + "english_source_reference": "B.V. Raman196–197, printed187/PDF197, lines5455–5470; separate definitions and whole-chart remarks.", + "legacy_source": "B.V. Raman", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14464,16 +14899,7 @@ ], "note": "" }, - "effects": [ - "Mother lives long, mother's health is good" - ], - "effects_en": [ - "Mother lives long, mother's health is good" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "196: benefic fourth occupant, exalted fourth lord and strong Moon.197: the dispositor of the fourth lord's Navamsa strong and angular from both ascendant and Moon. Strength remains unresolved." }, { "id": "bvr_mooka_yoga", @@ -14483,6 +14909,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "mooka_163", + "description_zh": "2宫主与木星同在第8宫;木星本垣或入旺时不适用", + "description_en": "Second lord and Jupiter in house 8, excluding Jupiter in own or exaltation sign. The separate twelfth-house variant is not merged." + }, + "effects": [ + "原文将此配置与语言能力受限相联系,并明确排除木星本垣或入旺的情形;本项仅为传统结构记录,不能诊断或预测语言障碍。" + ], + "effects_en": [ + "Speech impediment, silence, deep contemplation" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman no.163 printed162/PDF172 lines4833-4841; exact exception retained; medical outcomes not validated", + "source_effect_review": "Raman no.163 printed162/PDF172 lines4833-4841; exact exception retained; medical outcomes not validated", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14505,16 +14949,10 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Speech impediment, silence, deep contemplation" ], - "effects_en": [ - "Speech impediment, silence, deep contemplation" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Second lord and Jupiter in house 8, excluding Jupiter in own or exaltation sign. The separate twelfth-house variant is not merged." }, { "id": "bvr_musala_yoga", @@ -14544,7 +14982,7 @@ "note": "All planets exclusively in fixed signs (Ta/Le/Sc/Aq)" }, "effects": [ - "Firmness, resolve, stubborn nature, lasting wealth" + "既有规则的传统描述(非个人事实或结果保证):坚定、决心、固执与财富持久" ], "effects_en": [ "Firmness, resolve, stubborn nature, lasting wealth" @@ -14553,7 +14991,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-99", - "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2664; seven visible planets. Historical BVR id retained." + "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2664; seven visible planets. Historical BVR id retained.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_nala_yoga", @@ -14583,7 +15022,7 @@ "note": "All planets exclusively in dual signs (Ge/Vi/Sg/Pi)" }, "effects": [ - "Dual nature, adaptability, trade skills" + "既有规则的传统描述(非个人事实或结果保证):双重倾向、适应力与交易技能" ], "effects_en": [ "Dual nature, adaptability, trade skills" @@ -14592,7 +15031,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-100", - "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2666; seven visible planets. Historical BVR id retained." + "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2666; seven visible planets. Historical BVR id retained.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_nav_yoga", @@ -14606,7 +15046,7 @@ "expr": "\np_to_h = {p: ctx.house_of(p) for p in ['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] if ctx.house_of(p)}\nif len(p_to_h) < 7: False\nelse:\n targets = list(range(1, 8))\n all(h in targets for h in p_to_h.values()) and len(set(p_to_h.values())) == 7\n" }, "effects": [ - "Success in endeavors, safe passage through difficulties, leadership" + "既有规则的传统描述(非个人事实或结果保证):事业进展、渡过困难与领导" ], "effects_en": [ "Success in endeavors, safe passage through difficulties, leadership" @@ -14614,16 +15054,37 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-75" + "evidence_note": "Source: B.V. Raman, BVR: BVR-75", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_netranasa_yoga", "name": "Netranasa Yoga", "name_cn": "眼病瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-164", "category": "special", "logic": { + "type": "netranasa_raman_geometry", + "description_zh": "第二、六、十宫主同在上升宫;另列未核定的落陷分区替代条件,不以本命落陷冒充", + "description_en": "Second, sixth and tenth lords together in the ascendant. The separate Neechamsa alternative is unresolved, not replaced by D1 debility." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):眼部问题、失明与视力问题;不是医学诊断" + ], + "effects_en": [ + "Eye troubles, blindness, vision problems" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Literal D1 source branch implemented; amsa alternative and luminary mitigation remain explicit. An anecdotal sixth-lord aspect does not replace the definition's conjunction.", + "unresolved_source_conditions": [ + "Neechamsa alternative scope/referents and luminary favourable-strength qualification" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "Raman164 printed162-163/PDF172-173; retain the separate Sun/Moon qualification, no medical verdict.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14643,16 +15104,8 @@ ], "note": "" }, - "effects": [ - "Eye troubles, blindness, vision problems" - ], - "effects_en": [ - "Eye troubles, blindness, vision problems" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman164 printed162-163/PDF172-173; Chart78 is explicitly a variation, not the literal definition.", + "combination_en": "Second, sixth and tenth lords together in the ascendant. The separate Neechamsa alternative is unresolved, not replaced by D1 debility." }, { "id": "bvr_nishturabhashi_yoga", @@ -14662,6 +15115,21 @@ "bvr_id": null, "category": "special", "logic": { + "type": "nishturabhashi_raman" + }, + "effects": [ + "传统上涉及言语严厉;原文另有木星照射缓解及火星照射加重条件,不能据此判定个人性格或缺少共情。" + ], + "effects_en": [ + "Harsh, cruel, cutting speech; lack of empathy" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.296, printed301/PDF311, definition and remarks.", + "source_effect_review": "formation separated from neutralization; no independent character validation", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14686,16 +15154,10 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Harsh, cruel, cutting speech; lack of empathy" ], - "effects_en": [ - "Harsh, cruel, cutting speech; lack of empathy" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Moon conjunct Saturn; assess Jupiter's neutralizing and Mars' intensifying aspects separately." }, { "id": "bvr_paasa_yoga", @@ -14725,7 +15187,7 @@ "note": "7 visible planets occupy exactly 5 distinct signs" }, "effects": [ - "Many friends, talkative, skilled in various arts" + "PVR传统描述包含工作能力、健谈、随从,也含拘束或囚禁及品格方面的古代负面断语;完整保留其文献范围,但不能用于认定个人品格或预言被囚禁" ], "effects_en": [ "Many friends, talkative, skilled in various arts" @@ -14733,7 +15195,10 @@ "strength": "occasional", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-93" + "evidence_note": "Source: B.V. Raman, BVR: BVR-93", + "english_source_reference": "PVR Integrated Approach, corpus p135 L2744 (Paasa); geometric formation only. The legacy effect gloss is not a complete translation of PVR's phala.", + "source_effect_review": "PVR corpus p135 L2744; full theme range retained, no personal outcome admission", + "combination_en": "The seven classical planets occupy exactly five distinct signs; Rahu and Ketu do not enter the count. Nabhasa family precedence must be reviewed before treating overlapping names as separate support." }, { "id": "bvr_parannabhojana_yoga", @@ -14747,7 +15212,7 @@ "expr": "\nl2 = ctx.lord_of_house(2)\nif not l2 or l2 not in ctx.planets: False\nelse:\n l2_deb = ctx.is_debilitated(l2)\n # PyJHora: aspected_planets_of_the_planet(chart_1d, l2) = planets ASPECTED BY l2\n has_deb_aspect = any(ctx.is_debilitated(p) and aspect(l2, p) for p in ctx.planets if p != l2)\n l2_deb and has_deb_aspect\n" }, "effects": [ - "Depends on others for food, eats at others' homes" + "既有规则的传统描述(非个人事实或结果保证):依赖他人供食或在他人家中用餐" ], "effects_en": [ "Depends on others for food, eats at others' homes" @@ -14755,7 +15220,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-128" + "evidence_note": "Source: B.V. Raman, BVR: BVR-128", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_parihasaka_yoga", @@ -14816,9 +15282,26 @@ "name": "Pisacha Grastha Yoga", "name_cn": "鬼魅缠身瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-287", "category": "special", "logic": { + "type": "pisacha_raman", + "description_zh": "Raman287:月亮罗睺同在上升且第五、第九宫均有自然凶星;另列作者月罗与土星同宫或受土星照射的补充口径。", + "description_en": "Raman287 definition profile: Moon/Rahu in Lagna with natural malefics in both fifth and ninth. Separate remarks profile: Moon/Rahu conjunction receives Saturn conjunction or aspect." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):附灵、非理性行为与精神困扰;附灵属于传统信仰解释,不是事实或医学诊断" + ], + "effects_en": [ + "Haunted by spirits, irrational behavior, mental affliction" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Named geometry profiles only, not spirit or psychiatric claims. Separate from local Mars/Ketu Pisacha tradition. Both5/9 is an explicit reading of plural trines, not proof every tradition uses this convention.", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations,287, printed289–290/PDF299–300, lines8207–8235.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14838,16 +15321,7 @@ ], "note": "" }, - "effects": [ - "Haunted by spirits, irrational behavior, mental affliction" - ], - "effects_en": [ - "Haunted by spirits, irrational behavior, mental affliction" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Raman287 definition profile: Moon/Rahu in Lagna with natural malefics in both fifth and ninth. Separate remarks profile: Moon/Rahu conjunction receives Saturn conjunction or aspect." }, { "id": "bvr_pithru_saapa_sutakshaya_yoga", @@ -14879,6 +15353,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "pittharoga_279", + "description_zh": "太阳在第六宫,与一颗自然凶星同宫,并受另一颗不同自然凶星照射", + "description_en": "Sun in sixth conjoins one natural malefic and receives an aspect from another distinct malefic. Uses classical planetary aspects without node aspects; no medical outcome follows." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):传统Pitta病症、发热与炎症;不是医学诊断" + ], + "effects_en": [ + "Pitta diseases, fevers, inflammatory conditions" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no279, printed pp281-282/PDF291-292, definition and remarks.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14900,16 +15392,7 @@ ], "note": "" }, - "effects": [ - "Pitta diseases, fevers, inflammatory conditions" - ], - "effects_en": [ - "Pitta diseases, fevers, inflammatory conditions" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Sun in sixth conjoins one natural malefic and receives an aspect from another distinct malefic. Uses classical planetary aspects without node aspects; no medical outcome follows." }, { "id": "bvr_pretha_saapa_yoga", @@ -14919,6 +15402,34 @@ "bvr_id": "BVR-219", "category": "special", "logic": { + "type": "raman_strength_qualified_geometry", + "profile": "pretasapa_219", + "description_zh": "太阳与土星在第五宫、月亮在第七宫、罗睺在上升、木星在第十二宫;月亮弱另行核定", + "summary_zh": "仅记录五颗星的落宫结构;月亮弱的综合条件尚待核定,不能把亏月直接等同于弱。诅咒属于历史信仰解释,不据此判断子女、生育或伤害。", + "summary_en": "Five positional conditions only; composite lunar weakness remains unresolved and is not replaced by waning phase. Curse language is a historical belief, not a fact or a child, fertility or harm prediction.", + "description_en": "Sun and Saturn in5, Moon in7, Rahu in1 and Jupiter in12; the separate weak-Moon condition is unresolved, not a waning-Moon proxy." + }, + "effects": [ + "保留历史诅咒与子女归因的原意,不据此认定诅咒、伤害、生育或子女结局。" + ], + "effects_en": [ + "Curse of departed souls, difficulties in progeny" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman no219 printed208-209/PDF218-219: lunar weakness is separate from the five planetary placements; Chart99 is an author illustration, not independent validation.", + "unresolved_source_conditions": [ + "Source-admitted composite lunar weakness criterion" + ], + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "geometry_only_qualification_unresolved", + "english_source_reference": "Raman, Three Hundred Important Combinations, no219 printed208-209/PDF218-219; geometry only, not outcome validation.", + "legacy_effects": [ + "既有规则的传统描述(非个人事实或结果保证):亡灵诅咒与子女困难;诅咒属于传统信仰解释,不是事实" + ], + "source_effect_review": "Raman219 source-located conditional expression; not independent outcome validation", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14955,25 +15466,38 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Curse of departed souls, difficulties in progeny" ], - "effects_en": [ - "Curse of departed souls, difficulties in progeny" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-219" + "source_reference": "Raman, Three Hundred Important Combinations, no219 printed208-209/PDF218-219.", + "combination_en": "Sun and Saturn in5, Moon in7, Rahu in1 and Jupiter in12; the separate weak-Moon condition is unresolved, not a waning-Moon proxy." }, { "id": "bvr_putrakalatraheena_yoga", "name": "Putrakalatraheena Yoga", "name_cn": "无妻无子瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-281", "category": "putra", "logic": { + "type": "family_geometry_raman", + "profile": "putrakalatraheena_281", + "description_zh": "亏月在5宫,太阳、火星、土星分别占据1、7、12宫(原书说明段取法)", + "description_en": "Waning Moon in5 with Sun/Mars/Saturn occupying distinct houses1/7/12 (named remarks profile)." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):缺少家庭与子女" + ], + "effects_en": [ + "Deprived of family and children" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no281, printed283/PDF293; named Sun/Mars/Saturn remarks profile.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no281, printed283/PDF293; named Sun/Mars/Saturn remarks profile.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -14999,25 +15523,37 @@ ], "note": "" }, - "effects": [ - "Deprived of family and children" - ], - "effects_en": [ - "Deprived of family and children" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Waning Moon in5 with Sun/Mars/Saturn occupying distinct houses1/7/12 (named remarks profile)." }, { "id": "bvr_raja_bhanga_yoga", "name": "Raja Bhanga Yoga", - "name_cn": "王业破坏瑜伽", + "name_cn": "Raja Bhanga(王者格局制约条件)", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-298/299", "category": "special", "logic": { + "type": "raja_bhanga_raman", + "description_zh": "分别核对Raman298的狮子上升土星天秤及D9/吉星照射分支,与299的太阳深度落陷点;不据此整体取消吉格。", + "description_en": "Raman298: Leo rising and Saturn in Libra, with debilitated Navamsa or benefic aspect. Raman299: Sun at the exact10-degree Libra deep-debilitation point. These are separate screens, not global cancellation." + }, + "effects": [ + "传统结果涉及地位与福分受限;原作者不认可仅凭太阳落陷否定全部吉格,不能据此判断个人必然失势。" + ], + "effects_en": [ + "Rise followed by fall from power, broken ambitions" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Definition printed302, remarks printed303/PDF312–313. Definition's benefic-aspect alternative retained separately from remarks. Solar10-degree point does not establish cancellation; no arbitrary orb.", + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations,298–299, printed302–303", + "legacy_effects": [ + "既有规则的传统描述(非个人事实或结果保证):掌权后失势与抱负受挫" + ], + "meaning_source_reference": "Raman298–299 printed302–303: result and author's explicit solar-debility qualification; legacy rise-then-fall gloss archived.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15027,16 +15563,11 @@ ], "note": "Raja Yoga disrupted by malefic associations or aspects" }, - "effects": [ + "legacy_effects_en": [ "Rise followed by fall from power, broken ambitions" ], - "effects_en": [ - "Rise followed by fall from power, broken ambitions" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Raman298: Leo rising and Saturn in Libra, with debilitated Navamsa or benefic aspect. Raman299: Sun at the exact10-degree Libra deep-debilitation point. These are separate screens, not global cancellation.", + "legacy_name_cn": "王业破坏瑜伽" }, { "id": "bvr_rajabhrashta_yoga", @@ -15046,6 +15577,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "rajabhrashta_297_unadjusted", + "description_zh": "按Raman297原文直接计数的AL与A12之主星同宫;不混入PVR例外修正,同星兼主不能当作自己与自己合相", + "description_en": "Distinct lords of literal unadjusted Arudha Lagna and Arudha12 conjoin under Raman297; PVR-adjusted coordinates are retained separately." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):权力、地位下降或政治失势" + ], + "effects_en": [ + "Fall from power/status, political downfall" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.297, printed301-302/PDF311-312; literal count and Aries example, not a universal Arudha exception ruling.", + "source_effect_review": "Raman297 source review2026-11-23; literal Arudha profile and qualified traditional theme, not observed career loss", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15055,16 +15604,8 @@ ], "note": "Lords of Aroodha Lagna (A1/AL) and Aroodha Dwadasa (A12/UL) in conjunction" }, - "effects": [ - "Fall from power/status, political downfall" - ], - "effects_en": [ - "Fall from power/status, political downfall" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "legacy_effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "combination_en": "Distinct lords of literal unadjusted Arudha Lagna and Arudha12 conjoin under Raman297; PVR-adjusted coordinates are retained separately." }, { "id": "bvr_rajalakshana_yoga", @@ -15090,7 +15631,7 @@ "note": "Jupiter, Venus, Mercury and Moon all in kendras (1,4,7,10) from Lagna" }, "effects": [ - "Royal characteristics, wealth, leadership, honor" + "既有规则的传统描述(非个人事实或结果保证):王者特征、财富、领导与荣誉" ], "effects_en": [ "Royal characteristics, wealth, leadership, honor" @@ -15098,7 +15639,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-10" + "evidence_note": "Source: B.V. Raman, BVR: BVR-10", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_rajju_yoga", @@ -15128,7 +15670,7 @@ "note": "All 7 visible planets exclusively in movable signs (Ar/Cn/Li/Cp)" }, "effects": [ - "Restlessness, frequent travel, nomadic nature" + "既有规则的传统描述(非个人事实或结果保证):不安定、频繁旅行与游动生活" ], "effects_en": [ "Restlessness, frequent travel, nomadic nature" @@ -15137,7 +15679,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-98", - "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2662; seven visible planets. Historical BVR id retained." + "source_reference": "Definition adopted from PVR Integrated Approach 11.5.1, printed p119 / corpus Page 131, L2662; seven visible planets. Historical BVR id retained.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_randhra_malika_yoga", @@ -15151,7 +15694,7 @@ "expr": "\np_to_h = {p: ctx.house_of(p) for p in ['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] if ctx.house_of(p)}\nif len(p_to_h) < 7: False\nelse:\n start = (1 + 7) % 12\n if start == 0: start = 12\n targets = [((start - 1 + i) % 12) + 1 for i in range(7)]\n all(h in targets for h in p_to_h.values()) and len(set(p_to_h.values())) == 7\n" }, "effects": [ - "Dangers, obstacles, hidden enemies, sudden changes" + "既有规则的传统描述(非个人事实或结果保证):危险、障碍、隐蔽对手与突然变化" ], "effects_en": [ "Dangers, obstacles, hidden enemies, sudden changes" @@ -15159,7 +15702,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-39" + "evidence_note": "Source: B.V. Raman, BVR: BVR-39", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_ravi_yoga", @@ -15169,29 +15713,35 @@ "bvr_id": "BVR-65", "category": "special", "logic": { - "type": "compound_conditions", + "type": "and", "conditions": [ { - "type": "compound", - "operator": "AND", - "conditions": [ - { - "type": "planet_in_house", - "planet": "Sun", - "house_offset": 9, - "note": "Sun in the 10th house" - }, - { - "type": "lord_in_house_with_planet", - "lord_of": 10, - "house_offset": 2, - "planet": "Saturn", - "note": "10th lord in 3rd house with Saturn" - } + "type": "in_houses", + "planet": "Sun", + "houses": [ + 10 ] + }, + { + "type": "in_houses", + "planet": "lord:10", + "houses": [ + 3 + ] + }, + { + "type": "in_houses", + "planet": "Saturn", + "houses": [ + 3 + ] + }, + { + "type": "same_house", + "a": "lord:10", + "b": "Saturn" } - ], - "note": "" + ] }, "effects": [ "传统含义:学识、热情与获得权威认可的倾向" @@ -15203,7 +15753,10 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-65", - "meaning_source_reference": "PVR Integrated Approach p.143, Ravi Yoga." + "meaning_source_reference": "PVR Integrated Approach p.143, Ravi Yoga.", + "english_source_reference": "PVR Integrated Approach p.143; traditional description, not predictive validation.", + "source_reference": "PVR Integrated Approach p.143, Ravi Yoga; legacy BVR identifier retained for compatibility.", + "combination_en": "Sun in house ten; the tenth lord in house three with Saturn. Saturn is not counted as conjunct itself." }, { "id": "bvr_saarada_yoga", @@ -15213,6 +15766,27 @@ "bvr_id": null, "category": "special", "logic": { + "type": "saarada_pvr_geometry", + "description_zh": "十宫主在五宫、水星在角宫、太阳在狮子、水星或木星在月亮起三方、火星在十一宫;太阳综合有力条件另待核定。", + "description_en": "Tenth lord in fifth; Mercury angular; Sun strong in Leo; Mercury or Jupiter in a trine from Moon; Mars in eleventh. Geometry is evaluated; composite solar strength remains unresolved." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):学识、学术与艺术才能" + ], + "effects_en": [ + "Learned, gifted in scholarship and fine arts" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Partial geometry, not full formation. Do not equate Sun in Leo with a fully assessed strength qualifier.", + "unresolved_source_conditions": [ + "Source-admitted composite solar strength criterion" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "geometry_only_strength_unresolved", + "english_source_reference": "PVR Integrated Approach, indexed143, line2854; five-clause definition. Legacy three-clause logic archived.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15241,16 +15815,8 @@ ], "note": "" }, - "effects": [ - "Learned, gifted in scholarship and fine arts" - ], - "effects_en": [ - "Learned, gifted in scholarship and fine arts" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: Classical, BVR: None" + "source_reference": "PVR Integrated Approach, indexed143, line2854; five-clause definition. Legacy three-clause logic archived.", + "combination_en": "Tenth lord in fifth; Mercury angular; Sun strong in Leo; Mercury or Jupiter in a trine from Moon; Mars in eleventh. Geometry is evaluated; composite solar strength remains unresolved." }, { "id": "bvr_samudra_yoga", @@ -15287,7 +15853,7 @@ "note": "All planets in even houses (2,4,6,8,10,12) from Lagna" }, "effects": [ - "Prosperous, wealthy, respectable" + "既有规则的传统描述(非个人事实或结果保证):繁荣、财富与受尊重" ], "effects_en": [ "Prosperous, wealthy, respectable" @@ -15295,7 +15861,9 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-90" + "evidence_note": "Source: B.V. Raman, BVR: BVR-90", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "source_reference": "PVR Integrated Approach, indexed p135, line2732: the seven classical planets occupy houses 2,4,6,8,10,12; exact occupied-house profile. Legacy Raman attribution retained, not independently located here." }, { "id": "bvr_sapthasankhya_sahodara_yoga", @@ -15309,7 +15877,7 @@ "expr": "\n# BVR-179 v6.0.46: L12 joins Mars; Moon+Jupiter both in 3rd; Venus neither in 3rd nor aspecting Moon\nl12 = lord_of_house(12)\nif l12 is None or l12 not in ctx.planets: False\nelse:\n cond1 = 'Mars' in ctx.planets and house_of(l12) == house_of('Mars')\n cond2 = 'Moon' in ctx.planets and 'Jupiter' in ctx.planets and house_of('Moon') == 3 and house_of('Jupiter') == 3\n cond3 = 'Venus' not in ctx.planets or house_of('Venus') != 3\n cond4 = not aspect('Venus', 'Moon') if 'Venus' in ctx.planets and 'Moon' in ctx.planets else True\n cond1 and cond2 and cond3 and cond4\n" }, "effects": [ - "Seven siblings, moderate family size" + "既有规则的传统描述(非个人事实或结果保证):七位手足与中等规模家庭;不能据此确认亲属人数" ], "effects_en": [ "Seven siblings, moderate family size" @@ -15317,7 +15885,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-179" + "evidence_note": "Source: B.V. Raman, BVR: BVR-179", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_sarala_yoga", @@ -15330,12 +15899,15 @@ "type": "compound_conditions", "conditions": [ { - "type": "lord_in_own_house", - "house": 8, - "note": "8th lord occupies the 8th house (Vipareeta Raja Yoga)" + "type": "in_houses", + "planet": "lord:8", + "houses": [ + 8 + ], + "note": "PVR p.145: 8th lord occupies the 8th house; not the broader dusthana-exchange variant." } ], - "note": "8th lord occupies the 8th house (Vipareeta Raja Yoga)" + "note": "8th lord occupies the 8th house, PVR p.145." }, "effects": [ "传统含义:无畏、学识、声誉与富足;书中另有长寿之说,不据此断定个人寿命" @@ -15347,7 +15919,10 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-106", - "meaning_source_reference": "PVR Integrated Approach p.145, Sarala Yoga, line 2896." + "meaning_source_reference": "PVR Integrated Approach p.145, Sarala Yoga, line 2896.", + "english_source_reference": "PVR Integrated Approach p.145, Sarala Yoga; conditional traditional meaning, not outcome validation.", + "source_reference": "PVR Integrated Approach p.145, Sarala Yoga, line 2896; legacy BVR attribution retained separately.", + "combination_en": "The lord of house 8 occupies house 8. This is the same-house definition, not an interchangeable placement anywhere in houses 6, 8 or 12." }, { "id": "bvr_saraswathi_yoga", @@ -15381,6 +15956,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "sarpaganda_174", + "description_zh": "罗睺与Maandi同在第2宫", + "description_en": "Rahu and Maandi occupy house 2." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):蛇、毒物或有害处境的危险" + ], + "effects_en": [ + "Danger from snakes or poison, toxic situations" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.174; printed168/PDF178; geometry only, not observed outcomes", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15400,16 +15993,8 @@ ], "note": "" }, - "effects": [ - "Danger from snakes or poison, toxic situations" - ], - "effects_en": [ - "Danger from snakes or poison, toxic situations" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman, Three Hundred Important Combinations, no.174; printed168/PDF178; geometry only, not observed outcomes", + "combination_en": "Rahu and Maandi occupy house 2." }, { "id": "bvr_sarpasaapa_yoga", @@ -15423,7 +16008,7 @@ "expr": "\n# BVR-212-215 v6.0.46: 4 variants - Rahu/5th house/Mars/Saturn/Moon/Jupiter/Mercury combinations\nrahu_h = house_of('Rahu') if 'Rahu' in ctx.planets else None\nmars_h = house_of('Mars') if 'Mars' in ctx.planets else None\nsat_h = house_of('Saturn') if 'Saturn' in ctx.planets else None\nmoon_h = house_of('Moon') if 'Moon' in ctx.planets else None\njup_h = house_of('Jupiter') if 'Jupiter' in ctx.planets else None\nmerc_h = house_of('Mercury') if 'Mercury' in ctx.planets else None\nl5 = lord_of_house(5)\n\n# 212: Rahu in 5th + Mars aspects Rahu, OR 5th is Mars sign + Rahu in 5th\ncond212 = rahu_h == 5 and (('Mars' in ctx.planets and aspect('Mars', 'Rahu')) or l5 == 'Mars')\n\n# 213: L5 with Rahu + Saturn in 5th + (Moon in 5th or Moon aspects 5th)\ncond213 = False\nif l5 in ctx.planets and rahu_h is not None and sat_h is not None:\n l5_rahu = house_of(l5) == rahu_h\n moon_in_5_or_aspects = moon_h == 5 or (moon_h is not None and offset(moon_h, 5) == 6)\n cond213 = l5_rahu and sat_h == 5 and moon_in_5_or_aspects\n\n# 214: Jupiter + Mars together + Rahu in Lagna + L5 in dusthana\ncond214 = False\nif jup_h is not None and mars_h is not None and rahu_h is not None:\n jup_mars = jup_h == mars_h\n rahu_lagna = rahu_h == 1\n l5_dusthana = l5 in ctx.planets and house_of(l5) in (6, 8, 12)\n cond214 = jup_mars and rahu_lagna and l5_dusthana\n\n# 215: 5th is Mars' sign + Rahu in 5th + (Mercury in 5th or Mercury aspects 5th)\ncond215 = False\nif rahu_h is not None and merc_h is not None:\n cond215 = l5 == 'Mars' and rahu_h == 5 and (merc_h == 5 or graha_aspects_house('Mercury', 5))\n\ncond212 or cond213 or cond214 or cond215\n" }, "effects": [ - "Danger from snakes, karmic snake curse" + "既有规则的传统描述(非个人事实或结果保证):蛇的危险与业力蛇咒;诅咒属于传统信仰解释,不是事实" ], "effects_en": [ "Danger from snakes, karmic snake curse" @@ -15431,16 +16016,38 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-212" + "evidence_note": "Source: B.V. Raman, BVR: BVR-212", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_satkathadisravana_yoga", "name": "Satkathadisravana Yoga", "name_cn": "善听圣典瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-186", "category": "special", "logic": { + "type": "satkathadisravana_raman", + "description_zh": "分别记录第三宫受吉星相照及第三宫主受自然吉星相照;吉性分区条件不以D1星座替代。", + "description_en": "Definition: third house a benefic sign receiving benefic aspects, third lord in a benefic amsa. Remarks separately emphasize a natural-benefic aspect to the third lord regardless of the third-house sign; amsa and variant choice remain unresolved." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):喜爱经典、虔诚与信仰投入" + ], + "effects_en": [ + "Love of scriptures, devotion, pious nature" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman186 printed179-180/PDF189-190: definition and remarks differ. A benefic amsa is not automatically replaced by D1 sign dignity.", + "unresolved_source_conditions": [ + "Benefic amsa identity and definition-versus-remarks scope" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "received_aspect_geometry_amsa_scope_unresolved", + "english_source_reference": "Raman no186 printed179-180/PDF189-190; definition and remarks kept separate.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15460,16 +16067,13 @@ ], "note": "" }, - "effects": [ - "Love of scriptures, devotion, pious nature" + "source_reference": "Raman, Three Hundred Important Combinations, no186 printed179-180/PDF189-190.", + "source_method_notes": [ + "Do not replace benefic amsa with D1 sign dignity or conjunction.", + "The remarks' received aspect to the third lord is not identical to the definition's aspect to the third house.", + "External software's Navamsa readings are separate named interpretations, not proof that the source wording is unambiguous." ], - "effects_en": [ - "Love of scriptures, devotion, pious nature" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Definition: third house a benefic sign receiving benefic aspects, third lord in a benefic amsa. Remarks separately emphasize a natural-benefic aspect to the third lord regardless of the third-house sign; amsa and variant choice remain unresolved." }, { "id": "bvr_satru_malika_yoga", @@ -15483,7 +16087,7 @@ "expr": "\np_to_h = {p: ctx.house_of(p) for p in ['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] if ctx.house_of(p)}\nif len(p_to_h) < 7: False\nelse:\n start = (1 + 5) % 12\n if start == 0: start = 12\n targets = [((start - 1 + i) % 12) + 1 for i in range(7)]\n all(h in targets for h in p_to_h.values()) and len(set(p_to_h.values())) == 7\n" }, "effects": [ - "Enemies, litigation, obstacles, struggles" + "既有规则的传统描述(非个人事实或结果保证):对手、诉讼、障碍与抗争" ], "effects_en": [ "Enemies, litigation, obstacles, struggles" @@ -15491,16 +16095,40 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-37" + "evidence_note": "Source: B.V. Raman, BVR: BVR-37", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_sirachcheda_yoga", "name": "Sirachcheda Yoga", "name_cn": "斩首瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-273", "category": "special", "logic": { + "type": "sirachcheda_raman_geometry", + "description_zh": "六宫主与金星同宫,太阳或土星与罗睺同宫;保留同一六十分区与仅太阳/土星六十分区两种条件读法。", + "description_en": "Sixth lord joins Venus; Sun or Saturn joins Rahu with a cruel-shashtiamsa qualifier. The author discusses both shared-amsa and Sun/Saturn-only readings; the scope and nature table remain unresolved." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):头颈危险与涉及头部的意外;不能据此确定伤害事件" + ], + "effects_en": [ + "Danger to head/neck, accidents affecting head" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman273 PDF285-286. Remarks explicitly contrast shared cruel shashtiamsa with the Sun/Saturn-only reading; do not collapse the alternatives.", + "unresolved_source_conditions": [ + "Named cruel-amsa nature profile", + "Shared-amsa versus planet-only scope", + "Venus as sixth lord self-association" + ], + "implementation_status": "partial", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "Raman no273 PDF285-286 (one-based), including explicit disagreement in the remarks.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15520,16 +16148,13 @@ ], "note": "" }, - "effects": [ - "Danger to head/neck, accidents affecting head" + "source_reference": "Raman, Three Hundred Important Combinations, no273 PDF285-286 (one-based).", + "source_method_notes": [ + "Shared-amsa and planet-only-amsa readings are distinct alternatives explicitly discussed by the author.", + "No D60 zodiac dignity substitutes for a named amsa nature table.", + "Historical injury/death attribution is not an individual outcome prediction." ], - "effects_en": [ - "Danger to head/neck, accidents affecting head" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Sixth lord joins Venus; Sun or Saturn joins Rahu with a cruel-shashtiamsa qualifier. The author discusses both shared-amsa and Sun/Saturn-only readings; the scope and nature table remain unresolved." }, { "id": "bvr_sodaranasa_yoga", @@ -15543,7 +16168,7 @@ "expr": "\nl3 = ctx.lord_of_house(3)\nif not l3 or 'Mars' not in ctx.planets: False\nelse:\n targets = [3,5,7,8]\n mars_h = ctx.house_of('Mars')\n l3_h = ctx.house_of(l3) if l3 in ctx.planets else None\n if mars_h not in targets or l3_h not in targets: False\n else:\n ms = ['Mars','Saturn','Sun','Rahu','Ketu']\n any(m in ctx.planets and (aspect(m, 'Mars') or aspect(m, l3)) for m in ms if m not in ('Mars', l3))\n" }, "effects": [ - "Loss of siblings, difficulties with siblings" + "既有规则的传统描述(非个人事实或结果保证):失去手足或手足相关困难;不能据此确认亲属事实" ], "effects_en": [ "Loss of siblings, difficulties with siblings" @@ -15551,7 +16176,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-177b" + "evidence_note": "Source: B.V. Raman, BVR: BVR-177b", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_soola_yoga", @@ -15581,7 +16207,7 @@ "note": "7 visible planets occupy exactly 3 distinct signs" }, "effects": [ - "Fierce, bold, prone to disputes and arguments" + "既有规则的传统描述(非个人事实或结果保证):强悍、大胆与争执倾向" ], "effects_en": [ "Fierce, bold, prone to disputes and arguments" @@ -15589,7 +16215,8 @@ "strength": "occasional", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-95" + "evidence_note": "Source: B.V. Raman, BVR: BVR-95", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_sraddhannabhuktha_yoga", @@ -15603,7 +16230,7 @@ "expr": "\nl2 = ctx.lord_of_house(2)\nif not l2 or 'Saturn' not in ctx.planets: False\nelse:\n cond1 = l2 == 'Saturn'\n cond2 = l2 in ctx.planets and ctx.house_of(l2) == ctx.house_of('Saturn')\n sat_deb = ctx.is_debilitated('Saturn')\n cond3 = sat_deb and aspect('Saturn', 2)\n cond1 or cond2 or cond3\n" }, "effects": [ - "Subsists on ritual offerings, devotional nature" + "既有规则的传统描述(非个人事实或结果保证):依靠祭祀供品生活与虔诚倾向" ], "effects_en": [ "Subsists on ritual offerings, devotional nature" @@ -15611,7 +16238,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-129" + "evidence_note": "Source: B.V. Raman, BVR: BVR-129", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_sreenaatha_yoga", @@ -15621,28 +16249,26 @@ "bvr_id": "BVR-31", "category": "raja", "logic": { - "type": "compound_conditions", + "type": "and", "conditions": [ { - "type": "compound", - "operator": "AND", - "conditions": [ - { - "type": "lord_exalted_in_house", - "lord_of": 7, - "house_offset": 9, - "note": "7th lord exalted in 10th" - }, - { - "type": "lords_conjunct", - "lord1_house": 10, - "lord2_house": 9, - "note": "10th lord conjoined with 9th lord" - } + "type": "in_houses", + "planet": "lord:7", + "houses": [ + 10 ] + }, + { + "type": "dignity", + "planet": "lord:7", + "dignity": "exalted" + }, + { + "type": "same_house", + "a": "lord:10", + "b": "lord:9" } - ], - "note": "" + ] }, "effects": [ "传统含义:地位、权威与富足;不保证职位或财富" @@ -15654,16 +16280,39 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-31", - "meaning_source_reference": "PVR Integrated Approach p.138, Sreenaatha Yoga." + "meaning_source_reference": "PVR Integrated Approach p.138, Sreenaatha Yoga.", + "english_source_reference": "PVR Integrated Approach p.138; traditional description, not predictive validation.", + "source_reference": "PVR Integrated Approach p.138, Sreenaatha Yoga; legacy BVR identifier retained for compatibility.", + "combination_en": "Seventh lord exalted in house ten; tenth and ninth lords conjoin. The strict seventh-lord condition is possible only for Sagittarius ascendant." }, { "id": "bvr_subha_yoga", "name": "Subha Yoga", "name_cn": "吉祥瑜伽", - "source": "B.V. Raman", + "source": "PVR Integrated Approach, indexed page136, lines2760-2764", "bvr_id": null, "category": "special", "logic": { + "type": "lagna_presence_or_kartari_pvr", + "kind": "benefic", + "description_zh": "自然吉星占上升,或分占第2、12宫", + "description_en": "Natural benefics occupy the ascendant, or occupy both houses 2 and 12; PVR definition without an additional aspect veto." + }, + "effects": [ + "传统主题涉及表达、仪表与品行;仅检出位置结构,不能据此确认个人品质或健康。" + ], + "effects_en": [ + "Auspicious life, good health, happiness, prosperity" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "PVR Integrated Approach, indexed page136, lines2760-2764", + "legacy_source": "B.V. Raman", + "source_effect_review": "PVR p136; source meaning and geometric branch review, not empirical validation", + "meaning_source_reference": "PVR Integrated Approach, indexed page136, lines2760-2764", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15683,16 +16332,10 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Auspicious life, good health, happiness, prosperity" ], - "effects_en": [ - "Auspicious life, good health, happiness, prosperity" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Natural benefics occupy the ascendant, or occupy both houses 2 and 12; PVR definition without an additional aspect veto." }, { "id": "bvr_sukha_malika_yoga", @@ -15706,7 +16349,7 @@ "expr": "\np_to_h = {p: ctx.house_of(p) for p in ['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] if ctx.house_of(p)}\nif len(p_to_h) < 7: False\nelse:\n start = (1 + 3) % 12\n if start == 0: start = 12\n targets = [((start - 1 + i) % 12) + 1 for i in range(7)]\n all(h in targets for h in p_to_h.values()) and len(set(p_to_h.values())) == 7\n" }, "effects": [ - "Happiness, comfort, material pleasures, good family life" + "既有规则的传统描述(非个人事实或结果保证):幸福、舒适、物质享受与家庭生活" ], "effects_en": [ "Happiness, comfort, material pleasures, good family life" @@ -15714,16 +16357,40 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-35" + "evidence_note": "Source: B.V. Raman, BVR: BVR-35", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_suputhra_yoga", "name": "Suputhra Yoga", "name_cn": "良子瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-226", "category": "putra", "logic": { + "type": "raman_strength_qualified_geometry", + "profile": "suputra_226", + "description_zh": "木星为第五宫主;太阳处境有利的独立条件尚待核定", + "summary_zh": "仅确认狮子或天蝎上升的第五宫主为木星;太阳处境有利尚未核定,不能据此判断生育、子女性别或品格。", + "summary_en": "Only Jupiter's fifth-house lordship for Leo or Scorpio is established; the favourable solar-position criterion remains unresolved. No fertility, child-sex or character outcome follows.", + "description_en": "Jupiter rules house5, with the Sun favourably situated. The latter is not defined here as own/exalted/friendly sign alone." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):拥有品行高尚的子女;不能据此确认生育或子女品格" + ], + "effects_en": [ + "Blessed with noble children" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman226 lordship screen; legacy favourable=own/exalted/friendly simplification is not source-admitted.", + "unresolved_source_conditions": [ + "Source-admitted favourable solar position; not a dignity-only substitute" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "english_source_reference": "Raman226 printed215-216/PDF225-226; remarks discuss benefic vargas without a fixed threshold.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15743,16 +16410,8 @@ ], "note": "" }, - "effects": [ - "Blessed with noble children" - ], - "effects_en": [ - "Blessed with noble children" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman226 printed215-216/PDF225-226", + "combination_en": "Jupiter rules house5, with the Sun favourably situated. The latter is not defined here as own/exalted/friendly sign alone." }, { "id": "bvr_swetakushta_yoga", @@ -15762,6 +16421,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "swetakushta_286", + "description_zh": "火星第2宫、土星第12宫、月亮第1宫、太阳第7宫;木星相关说明另列,非医学判断", + "description_en": "Mars second, Saturn twelfth, Moon first and Sun seventh; retain Jupiter qualification separately. Not a medical prediction." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):皮肤白斑或白癜风;不是医学诊断" + ], + "effects_en": [ + "White patches on skin, vitiligo" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.286, printed288/PDF298; remarks and Chart140 confirm Saturn in house12.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15794,16 +16471,7 @@ ], "note": "" }, - "effects": [ - "White patches on skin, vitiligo" - ], - "effects_en": [ - "White patches on skin, vitiligo" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Mars second, Saturn twelfth, Moon first and Sun seventh; retain Jupiter qualification separately. Not a medical prediction." }, { "id": "bvr_theevrabuddhi_yoga", @@ -15817,7 +16485,7 @@ "expr": "# PyJHora/BVR-232: Lord of 5th in Rasi should be a benefic and should be in Navamsa Lagna.\n# Lord of Navamsa Lagna should be a benefic or aspected by benefic.\nl5 = lord(5)\nif l5 not in ctx.planets: False\nelse:\n nb = external_benchmark_natural_benefics()\n cond1 = l5 in nb # L5 is a natural benefic\n cond2 = d9_house_of(l5) == 1 # L5 in Navamsa Lagna\n d9_l1 = d9_lord_of_house(1)\n cond3a = d9_l1 in nb # D9 Lagna lord is benefic\n cond3b = d9_l1 is not None and any(p in nb and p != l5 and aspect(p, d9_l1) for p in ctx.planets)\n cond1 and cond2 and (cond3a or cond3b)\n" }, "effects": [ - "Sharp intellect, penetrating mind, quick understanding" + "既有规则的传统描述(非个人事实或结果保证):敏锐思维、洞察力与快速理解" ], "effects_en": [ "Sharp intellect, penetrating mind, quick understanding" @@ -15826,7 +16494,8 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-230", - "accuracy_note": "v6.0.49: rewritten to match PyJHora BVR-232 (D9-dependent: L5 benefic + in Navamsa Lagna; D9 L1 benefic/aspected)" + "accuracy_note": "v6.0.49: rewritten to match PyJHora BVR-232 (D9-dependent: L5 benefic + in Navamsa Lagna; D9 L1 benefic/aspected)", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_thrikaala_gnana_yoga", @@ -15840,7 +16509,7 @@ "expr": "\nif 'Jupiter' not in ctx.planets or 'Mercury' not in ctx.planets or 'Venus' not in ctx.planets: False\nelse:\n jup_kt = ctx.is_kendra(ctx.house_of('Jupiter')) or ctx.is_trikona(ctx.house_of('Jupiter'))\n # D1 strong: exalted/own/moola ONLY (kendra/trikona removed per BVR-248)\n d1_strong = lambda p: ctx.is_exalted(p) or ctx.is_own_sign(p) or ctx.is_moolatrikona(p)\n # D9 strong: exalted/own/moola in D9 (if D9 available)\n d9_strong = lambda p: ctx.is_exalted_in_d9(p) or ctx.is_own_sign_in_d9(p) or ctx.is_moolatrikona_in_d9(p)\n all_strong = all(d1_strong(p) for p in ['Jupiter','Mercury','Venus'])\n # If D9 data available, require at least 2 of 3 to be strong in D9 as well\n d9_available = bool(ctx.d9.get('ascendant'))\n d9_check = True\n if d9_available:\n d9_count = sum(1 for p in ['Jupiter','Mercury','Venus'] if d9_strong(p))\n d9_check = d9_count >= 1\n jup_kt and all_strong and d9_check\n" }, "effects": [ - "Knowledge of past/present/future, intuitive wisdom" + "既有规则的传统描述(非个人事实或结果保证):知晓过去、现在、未来与直觉智慧;不是超自然能力的验证" ], "effects_en": [ "Knowledge of past/present/future, intuitive wisdom" @@ -15848,7 +16517,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-248" + "evidence_note": "Source: B.V. Raman, BVR: BVR-248", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_trilochana_yoga", @@ -15873,7 +16543,7 @@ "note": "Sun, Moon and Mars are in mutual trines (trikona) from each other" }, "effects": [ - "Adventurous, fiery nature, achieves goals through boldness" + "既有规则的传统描述(非个人事实或结果保证):冒险、热烈与通过大胆行动追求目标" ], "effects_en": [ "Adventurous, fiery nature, achieves goals through boldness" @@ -15881,7 +16551,9 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-69" + "evidence_note": "Source: B.V. Raman, BVR: BVR-69", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "source_reference": "PVR Integrated Approach, indexed p142, line2844: Sun, Moon and Mars in mutual trines. Legacy Raman attribution retained, not independently located here." }, { "id": "bvr_utthama_graha_yoga", @@ -15897,7 +16569,7 @@ "combo_template_en": "4th lord in a Kendra/Trikona, conjoined with PyJHora benefics and aspected by benefics" }, "effects": [ - "Excellent house/property, comfortable living" + "既有规则的传统描述(非个人事实或结果保证):优良住宅、房产与舒适生活" ], "effects_en": [ "Excellent house/property, comfortable living" @@ -15906,16 +16578,35 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: None", - "accuracy_note": "v6.0.42 source-parity: rewritten as custom BVR-187 logic using PyJHora natural benefics and graha aspect semantics." + "accuracy_note": "v6.0.42 source-parity: rewritten as custom BVR-187 logic using PyJHora natural benefics and graha aspect semantics.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_vaatharoga_yoga", "name": "Vaatharoga Yoga", "name_cn": "风病瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-290", "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "vatharoga_290", + "description_zh": "木星在第1宫,土星在第7宫(Raman第290条)", + "description_en": "Jupiter in the first house and Saturn in the seventh; Raman290 geometry only." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):传统Vata病症、风湿与神经问题;不是医学诊断" + ], + "effects_en": [ + "Vata diseases, rheumatism, nerve disorders" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no290, printed291–293/PDF301–303.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no290, printed291–293/PDF301–303.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -15946,16 +16637,12 @@ ], "note": "" }, - "effects": [ - "Vata diseases, rheumatism, nerve disorders" - ], - "effects_en": [ - "Vata diseases, rheumatism, nerve disorders" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Jupiter in the first house and Saturn in the seventh; Raman290 geometry only.", + "legacy_branch_review": { + "state": "not_admitted_to_named_profile", + "branch": "mars_in_5_7_9_with_malefic_moon_and_saturn_in_12", + "reason": "Not located in Raman290 definition or remarks; preserved for research, not silently combined." + } }, { "id": "bvr_vakchalana_yoga", @@ -15969,7 +16656,7 @@ "expr": "\nl2 = ctx.lord_of_house(2)\nif not l2: False\nelse:\n mal_lord = l2 in ['Mars','Saturn','Sun','Rahu','Ketu']\n h2_ben = any(p in ctx.planets_in_house(2) for p in ['Jupiter','Venus','Mercury','Moon'])\n ben_asp_2 = any(b in ctx.planets and aspect(b, 2) for b in ['Jupiter','Venus','Mercury'])\n mal_lord and not (h2_ben or ben_asp_2)\n" }, "effects": [ - "Speech impediment, stammering, difficulty expressing" + "既有规则的传统描述(非个人事实或结果保证):言语障碍、口吃与表达困难" ], "effects_en": [ "Speech impediment, stammering, difficulty expressing" @@ -15977,7 +16664,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-175" + "evidence_note": "Source: B.V. Raman, BVR: BVR-175", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_vallaki_yoga", @@ -16007,7 +16695,7 @@ "note": "7 visible planets occupy exactly 7 distinct signs" }, "effects": [ - "Talented in music or fine arts, travels extensively" + "既有规则的传统描述(非个人事实或结果保证):音乐或艺术才能与广泛旅行" ], "effects_en": [ "Talented in music or fine arts, travels extensively" @@ -16015,16 +16703,35 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-91" + "evidence_note": "Source: B.V. Raman, BVR: BVR-91", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_vamsacheda_yoga", "name": "Vamsacheda Yoga", "name_cn": "家系断绝瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-283", "category": "special", "logic": { + "type": "family_geometry_raman", + "profile": "vamsacheda_283", + "description_zh": "月亮10宫、金星7宫且4宫有凶星;或月金7宫且4、10宫各有凶星", + "description_en": "Moon10/Venus7 with a malefic4, or Moon/Venus7 with malefics in both4 and10; explicit native natural classification." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):家族传承终止或没有男性后代;不能据此确认生育或后代性别" + ], + "effects_en": [ + "End of family lineage, no male heirs" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman, Three Hundred Important Combinations, no283, printed285–286/PDF295–296; definition and author alternative.", + "english_source_reference": "Raman, Three Hundred Important Combinations, no283, printed285–286/PDF295–296; definition and author alternative.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16044,16 +16751,7 @@ ], "note": "" }, - "effects": [ - "End of family lineage, no male heirs" - ], - "effects_en": [ - "End of family lineage, no male heirs" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Moon10/Venus7 with a malefic4, or Moon/Venus7 with malefics in both4 and10; explicit native natural classification." }, { "id": "bvr_vanchana_chora_bheethi_yoga", @@ -16073,7 +16771,7 @@ "note": "Lagna malefic/Gulika in trine OR Gulika with Kendra/Trine lords OR L1 with Rahu/Sat/Ket" }, "effects": [ - "Fear of deception, theft; deceptive nature" + "既有规则的传统描述(非个人事实或结果保证):担忧欺骗、盗窃或欺骗倾向" ], "effects_en": [ "Fear of deception, theft; deceptive nature" @@ -16081,7 +16779,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-11" + "evidence_note": "Source: B.V. Raman, BVR: BVR-11", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_vasumathi_yoga", @@ -16091,6 +16790,21 @@ "bvr_id": "BVR-9", "category": "dhana", "logic": { + "type": "vasumathi_raman" + }, + "effects": [ + "传统上关联财富积累;吉星数量、力量与其他影响会改变表现,不保证财富结果。上升与月亮两种参考不能算作独立证据。" + ], + "effects_en": [ + "Wealthy, respected, generous" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: BVR-9", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no.9, printed pp29-31 (PDF39-41).", + "source_effect_review": "Raman9 partial occupancy and strength qualifications; source-bound, not independently outcome-validated", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16112,16 +16826,10 @@ ], "note": "Benefics in Upachaya houses (3,6,10,11) from Lagna or Moon" }, - "effects": [ + "legacy_effects_en": [ "Wealthy, respected, generous" ], - "effects_en": [ - "Wealthy, respected, generous" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-9" + "conditions_en": "Natural benefics in houses 3, 6, 10 or 11 from Lagna or Moon; retain partial occupancy and distinguish strength from formation." }, { "id": "bvr_vichitra_saudha_prakara_yoga", @@ -16131,6 +16839,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "vichitra_188", + "description_zh": "4宫主、10宫主、土星与火星同宫;同星可兼宫主角色", + "description_en": "Fourth and tenth lords join Saturn and Mars; role overlap permitted." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):华美、多样的宫室或豪华住宅" + ], + "effects_en": [ + "Wonderful and varied palaces/dwellings, luxury homes" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "Raman, Three Hundred Important Combinations, no.188; printed181-182/PDF191-192; geometry only, not observed outcomes", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16146,16 +16872,8 @@ ], "note": "" }, - "effects": [ - "Wonderful and varied palaces/dwellings, luxury homes" - ], - "effects_en": [ - "Wonderful and varied palaces/dwellings, luxury homes" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "source_reference": "Raman, Three Hundred Important Combinations, no.188; printed181-182/PDF191-192; geometry only, not observed outcomes", + "combination_en": "Fourth and tenth lords join Saturn and Mars; role overlap permitted." }, { "id": "bvr_vidyut_yoga", @@ -16165,6 +16883,28 @@ "bvr_id": "BVR-59", "category": "special", "logic": { + "type": "vidyut_source_geometry", + "description_zh": "第十一宫主在入旺星座与金星同座,并位于上升主起角宫;另核对深度入旺点及自我同座问题", + "description_en": "Eleventh lord in exaltation sign with Venus, in a quadrant from ascendant lord. Exact exaltation peak is checked separately; off-peak extent and Venus self-association remain conditional." + }, + "effects": [ + "传统含义关联掌权或与掌权者相当的地位、财富、享乐与慈善;名称中的闪电不构成电力或技术职业判断" + ], + "effects_en": [ + "Commands electricity/technology, sudden wealth, powerful" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman59 printed87/PDF97 and PVR indexed144 line2882; exact peak from PVR indexed46 Table6. Explicit sufficient exact-point branch; no invented finite orb or automatic Venus self-conjunction. Not independent outcome validation.", + "unresolved_source_conditions": [ + "Finite extent of deep exaltation away from the tabulated peak", + "Self-association when Venus is eleventh lord" + ], + "implementation_scope": "exact_peak_sufficient_branch_and_qualified_off_peak_geometry", + "english_source_reference": "Raman no59 printed87/PDF97; PVR indexed144 line2882 and indexed46 Table6. Exact-point reading only, not a source-approved finite orb.", + "meaning_source_reference": "PVR, Vedic Astrology: An Integrated Approach, indexed144 line2882; conditional traditional meaning, not a technology occupation or outcome guarantee", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16190,16 +16930,11 @@ ], "note": "" }, - "effects": [ + "legacy_effects_en": [ "Commands electricity/technology, sudden wealth, powerful" ], - "effects_en": [ - "Commands electricity/technology, sudden wealth, powerful" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-59" + "source_reference": "Raman, Three Hundred Important Combinations, no59 printed87/PDF97; PVR Integrated Approach indexed144 line2882 and indexed46 Table6.", + "combination_en": "Eleventh lord in exaltation sign with Venus, in a quadrant from ascendant lord. Exact exaltation peak is checked separately; off-peak extent and Venus self-association remain conditional." }, { "id": "bvr_vimala_yoga", @@ -16212,12 +16947,15 @@ "type": "compound_conditions", "conditions": [ { - "type": "lord_in_own_house", - "house": 12, - "note": "12th lord occupies the 12th house (Vipareeta Raja Yoga)" + "type": "in_houses", + "planet": "lord:12", + "houses": [ + 12 + ], + "note": "PVR p.145: 12th lord occupies the 12th house; not the broader dusthana-exchange variant." } ], - "note": "12th lord occupies the 12th house (Vipareeta Raja Yoga)" + "note": "12th lord occupies the 12th house, PVR p.145." }, "effects": [ "传统含义:高尚、节俭、愉悦与独立" @@ -16229,7 +16967,10 @@ "enabled": true, "draft": false, "evidence_note": "Source: B.V. Raman, BVR: BVR-107", - "meaning_source_reference": "PVR Integrated Approach p.145, Vimala Yoga, line 2898." + "meaning_source_reference": "PVR Integrated Approach p.145, Vimala Yoga, line 2898.", + "english_source_reference": "PVR Integrated Approach p.145, Vimala Yoga; conditional traditional meaning, not outcome validation.", + "source_reference": "PVR Integrated Approach p.145, Vimala Yoga, line 2898; legacy BVR attribution retained separately.", + "combination_en": "The lord of house 12 occupies house 12. This is the same-house definition, not an interchangeable placement anywhere in houses 6, 8 or 12." }, { "id": "bvr_vishaprayoga_yoga", @@ -16243,7 +16984,7 @@ "expr": "\nh2p = ctx.planets_in_house(2)\nms = ['Mars','Saturn','Sun','Rahu','Ketu']\njoined = any(p in h2p for p in ms)\naspected = any(m in ctx.planets and aspect(m, 2) for m in ms)\njoined and aspected\n" }, "effects": [ - "Danger from poison, toxic environments" + "既有规则的传统描述(非个人事实或结果保证):毒物或有毒环境的危险" ], "effects_en": [ "Danger from poison, toxic environments" @@ -16251,7 +16992,8 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-176" + "evidence_note": "Source: B.V. Raman, BVR: BVR-176", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_vrana_yoga", @@ -16261,6 +17003,24 @@ "bvr_id": null, "category": "special", "logic": { + "type": "reviewed_raman_geometry", + "profile": "vrana_265", + "description_zh": "第六宫主为太阳、火星或土星且位于第一、八或十宫;另列作者的天蝎上升例外建议及吉星照射", + "description_en": "Sixth lord Sun, Mars or Saturn in house 1, 8 or 10. Literal geometry is separate from the author's proposed Scorpio exception and benefic-aspect qualification; no medical outcome follows." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):身体伤口、损伤与疤痕" + ], + "effects_en": [ + "Wounds, injuries, scars on body" + ], + "strength": "moderate", + "enabled": true, + "draft": false, + "evidence_note": "Source: B.V. Raman, BVR: None", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations, no265, printed pp260-262 / PDF pp270-272, definition and cautions. This is not the similarly named Prasna Marga ulcer heading.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16280,16 +17040,7 @@ ], "note": "" }, - "effects": [ - "Wounds, injuries, scars on body" - ], - "effects_en": [ - "Wounds, injuries, scars on body" - ], - "strength": "moderate", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Sixth lord Sun, Mars or Saturn in house 1, 8 or 10. Literal geometry is separate from the author's proposed Scorpio exception and benefic-aspect qualification; no medical outcome follows." }, { "id": "bvr_vyaya_malika_yoga", @@ -16303,7 +17054,7 @@ "expr": "\np_to_h = {p: ctx.house_of(p) for p in ['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] if ctx.house_of(p)}\nif len(p_to_h) < 7: False\nelse:\n start = (1 + 11) % 12\n if start == 0: start = 12\n targets = [((start - 1 + i) % 12) + 1 for i in range(7)]\n all(h in targets for h in p_to_h.values()) and len(set(p_to_h.values())) == 7\n" }, "effects": [ - "Loss, expenditure, waste, spiritual inclination" + "既有规则的传统描述(非个人事实或结果保证):损失、支出、浪费与精神追求" ], "effects_en": [ "Loss, expenditure, waste, spiritual inclination" @@ -16311,16 +17062,39 @@ "strength": "rare", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-42" + "evidence_note": "Source: B.V. Raman, BVR: BVR-42", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_yuddha_marana_yoga", "name": "Yuddha Marana Yoga", "name_cn": "战死瑜伽", "source": "B.V. Raman", - "bvr_id": null, + "bvr_id": "BVR-275", "category": "special", "logic": { + "type": "yuddha_marana_raman", + "description_zh": "分别检查火星六/八宫主合相口径、扩展宫主口径及土星D3定位星在火星星座/D9或受火星相照的独立口径。", + "description_en": "Literal definition: Mars rules sixth/eighth and joins third lord plus Rahu, Saturn or Maandi in cruel amsas. Remarks broaden the lordship reading and add a Saturn-drekkana-dispositor alternative; these are not yet fully implemented." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):战斗、武器或暴力死亡;不能据此预测死亡方式" + ], + "effects_en": [ + "Death in battle or through weapons/violence" + ], + "strength": "rare", + "enabled": true, + "draft": false, + "evidence_note": "Raman275 PDF288-289. Literal Mars ownership, generalized sixth/eighth lord and Saturn-drekkana-dispositor alternatives are distinct; the legacy expression covers only part of the source.", + "unresolved_source_conditions": [ + "Cruel amsa nature and scope in conjunction readings", + "Self-lord association and shared companion roles" + ], + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "implementation_scope": "d3_alternative_wired_conjunction_amsa_partial", + "english_source_reference": "Raman no275 PDF288-289 (one-based), definition, variants and Chart136 illustration.", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16340,16 +17114,14 @@ ], "note": "" }, - "effects": [ - "Death in battle or through weapons/violence" + "source_reference": "Raman, Three Hundred Important Combinations, no275 PDF288-289 (one-based).", + "source_method_notes": [ + "Literal Mars ownership applies to Aries, Gemini, Virgo and Scorpio; the author separately broadens the interpretation.", + "When Saturn is the relevant sixth/eighth lord, the remarks change the companion list to Rahu, Maandi or Mars.", + "Another alternative concerns the dispositor of Saturn's drekkana in a Mars sign/Navamsa or aspected by Mars; it is not Saturn's D1 dispositor.", + "The source's cruel amsa wording must not silently become one universal D60 rule; an author illustration is not an independent outcome test." ], - "effects_en": [ - "Death in battle or through weapons/violence" - ], - "strength": "rare", - "enabled": true, - "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: None" + "combination_en": "Literal definition: Mars rules sixth/eighth and joins third lord plus Rahu, Saturn or Maandi in cruel amsas. Remarks broaden the lordship reading and add a Saturn-drekkana-dispositor alternative; these are not yet fully implemented." }, { "id": "bvr_yuddhatpaschaddrudha_yoga", @@ -16410,7 +17182,7 @@ "combo_template_en": "2nd lord in a Kendra/Trikona with benefics, or the 2nd lord exalted with Jupiter" }, "effects": [ - "Eloquent, skilled in debate, good communicator" + "既有规则的传统描述(非个人事实或结果保证):口才、辩论技能与沟通能力" ], "effects_en": [ "Eloquent, skilled in debate, good communicator" @@ -16418,7 +17190,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "From PyJhora function: yukthi_samanwithavagmi_yoga()" + "evidence_note": "From PyJhora function: yukthi_samanwithavagmi_yoga()", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_103_guru_mangala_yoga", @@ -16434,23 +17207,40 @@ "combo_template_en": "Jupiter and Mars conjoined or in mutual 7th" }, "effects": [ - "Courage, wisdom, leadership, military success" + "既有规则的传统描述(非个人事实或结果保证):勇气、智慧、领导与军事成就" ], "effects_en": [ "Courage, wisdom, leadership, military success" ], "strength": "moderate", "enabled": true, - "evidence_note": "From PyJhora: guru_mangala_yoga()" + "evidence_note": "From PyJhora: guru_mangala_yoga()", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_104_aputhra_yoga", - "name": "Aputhra Yoga", - "name_cn": "绝对无子瑜伽", - "source": "B.V. Raman", - "bvr_id": null, + "name": "Aputra Yoga", + "name_cn": "Aputra(第五宫主困难宫位结构)", + "source": "B.V. Raman, Three Hundred Important Combinations,224, printed213–214", + "bvr_id": "BVR-224", "category": "putra", "logic": { + "type": "aputra_raman", + "description_zh": "第五宫主位于第六、八或十二宫;原作者要求另行综合第五宫,不能直接判断生育结果。", + "description_en": "Fifth lord occupies the sixth, eighth or twelfth house. The author requires a complete fifth-house assessment before interpretation." + }, + "effects": [ + "既有规则的传统描述(非个人事实或结果保证):没有子女或后代;不能据此确定生育结果" + ], + "effects_en": [ + "Complete childlessness, no progeny" + ], + "strength": "strong", + "enabled": true, + "evidence_note": "Raman224, printed213–214/PDF223–224. Original scan confirms6/8/12; OCR misreads6 as5. Chart102 positional replay only, not outcome validation.", + "english_source_reference": "B.V. Raman, Three Hundred Important Combinations,224, printed213–214", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission", + "legacy_logic": { "type": "compound_conditions", "conditions": [ { @@ -16474,15 +17264,14 @@ ], "note": "Strong indicators of childlessness" }, - "effects": [ - "Complete childlessness, no progeny" - ], - "effects_en": [ - "Complete childlessness, no progeny" - ], - "strength": "strong", - "enabled": true, - "evidence_note": "From PyJhora: aputhra_yoga()" + "legacy_name_cn": "绝对无子瑜伽", + "legacy_evidence_note": "From PyJhora: aputhra_yoga()", + "combination_en": "Fifth lord occupies the sixth, eighth or twelfth house. The author requires a complete fifth-house assessment before interpretation.", + "source_verification": { + "status": "definition_and_author_qualification_located", + "packet_id": "raman_224_aputra_definition", + "legacy_identifier_retained": true + } }, { "id": "bvr_105_chandra_mangala_yoga", @@ -16642,7 +17431,7 @@ "combo_template_en": "4th lord and Jupiter in mutual Kendras, with a strong Lagna lord" }, "effects": [ - "Courage, initiative, status and practical drive" + "既有规则的传统描述(非个人事实或结果保证):勇气、主动性、地位与实践动力" ], "effects_en": [ "Courage, initiative, status and practical drive" @@ -16650,7 +17439,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "v6.0.37: split from kahala_yoga; aligned to PyJHora kaahala_yoga() definition." + "evidence_note": "v6.0.37: split from kahala_yoga; aligned to PyJHora kaahala_yoga() definition.", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_kapata_yoga", @@ -16666,7 +17456,7 @@ "combo_template_en": "The 4th house or its lord severely afflicted by malefics, Rahu, Maandi/Mandi, etc." }, "effects": [ - "Deception, distrust, household/family complications" + "既有规则的传统描述(非个人事实或结果保证):欺骗、不信任与家庭或居住事务复杂" ], "effects_en": [ "Deception, distrust, household/family complications" @@ -16675,7 +17465,8 @@ "enabled": true, "draft": false, "evidence_note": "v6.0.37: high-confidence PyJHora Kapata 202-204 implementation.", - "accuracy_note": "v6.1.3-revert: back to MALEFICS (functional_malefics caused 22 FN)" + "accuracy_note": "v6.1.3-revert: back to MALEFICS (functional_malefics caused 22 FN)", + "effect_translation_review": "yoga_effects_zh_review_2026_11_22; translation_only_not_rule_admission" }, { "id": "bvr_durmukha_yoga", @@ -16746,7 +17537,26 @@ "enabled": true, "source_reference": "Observation-only. Natal Moon-Saturn orb <=10. Punarphoo return is not marriage. Holdout not passed.", "bvr_chapter": "" + }, + { + "id": "mridanga_raman_navamsa_chain", + "name": "Mridanga Yoga (Raman Navamsa Chain)", + "name_cn": "鼓格局(Raman九分盘主星链)", + "source": "Hindu Predictive Astrology, B. V. Raman", + "source_reference": "Printed p.109, corpus Page 116, lines 4588-4593; Lagna-lord comprehensive strength remains a separate assessment.", + "category": "auspicious", + "enabled": true, + "logic": { + "type": "mridanga_navamsa_chain" + }, + "effects": [ + "传统主题:个人影响力与吸引力;需另评上升主强度与应期" + ], + "strength": "conditional", + "effects_en": [ + "Traditional theme: personal influence and charisma; the ascendant lord's strength and the timing must be assessed separately." + ] } ], - "total_enabled_rules": 405 + "total_enabled_rules": 404 } diff --git a/scripts/add_high_confidence_yogas_batch1.py b/scripts/add_high_confidence_yogas_batch1.py index d69ae9cf5..6bb4e7857 100644 --- a/scripts/add_high_confidence_yogas_batch1.py +++ b/scripts/add_high_confidence_yogas_batch1.py @@ -204,6 +204,12 @@ BATCH = [ def main(): + import argparse + parser = argparse.ArgumentParser(description='Historical batch, draft output only; not a runtime migration.') + parser.add_argument('--output', required=True) + output = Path(parser.parse_args().output).resolve() + if output == RULES.resolve(): + parser.error('Refusing to overwrite active Yoga rules with a historical batch') data = json.loads(RULES.read_text(encoding="utf-8")) existing = {r["id"] for r in data["rules"]} existing_names = {(r.get("name"), r.get("dedup_key")) for r in data["rules"]} @@ -218,7 +224,9 @@ def main(): added.append(item["id"]) data["total_rules"] = len(data["rules"]) - RULES.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8") + data['runtime_enabled'] = False + output.parent.mkdir(parents=True, exist_ok=True) + output.write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8", newline="\n") print(f"added={len(added)} skipped={len(skipped)} total={len(data['rules'])}") print("added ids:") diff --git a/scripts/report_render/yoga_status_words.py b/scripts/report_render/yoga_status_words.py index 325ab0353..991901bc2 100644 --- a/scripts/report_render/yoga_status_words.py +++ b/scripts/report_render/yoga_status_words.py @@ -326,10 +326,13 @@ def report_yoga_table(packet): # BUG-2089: the other rule names that hit this same fact, each with its own engine row (effects). others = [{**(engine_row(other) or {}), **other} for other in same_fact.get(index, [])] display = {**(old_row or {}), **row} - if not display.get("combination"): + if not display.get("combination") and row.get("condition") != "not_available_yet": display["combination"] = row.get("condition") if old_row is None: condition = _text(row.get("condition")) + # BUG-2301: `not_available_yet` is the layer's status key for a missing condition, not text. + if condition == "not_available_yet": + condition = "" if condition and not HAN.search(condition): display["combination_en"] = condition elif condition: diff --git a/scripts/yoga_engine.py b/scripts/yoga_engine.py index 4fb67ad65..485449060 100644 --- a/scripts/yoga_engine.py +++ b/scripts/yoga_engine.py @@ -964,9 +964,10 @@ def _withhold_effects(entry: Dict) -> None: """Move the traditional effects (both languages) aside; the row states no verdict.""" entry.setdefault('traditional_effects', entry.get('effects') or []) entry['effects'] = [] + # Her rows drop the English twin (`entry.pop('effects_en')`); no empty list is left behind. if entry.get('effects_en'): entry.setdefault('traditional_effects_en', entry['effects_en']) - entry['effects_en'] = [] + entry.pop('effects_en', None) entry['strength'] = 'conditional' entry['strength_en'] = 'Conditional' @@ -977,7 +978,6 @@ def _apply_effect_and_method_gates(entry: Dict, rule: Dict, match: Dict) -> None BUG-2299 (upstream 58f37ee5b `detect`). Was: neither gate existed here; a matched rule always carried its traditional effects. """ - gated = False assessment = match.get('effect_assessment') if isinstance(assessment, dict) and assessment: entry['effect_assessment'] = dict(assessment) @@ -991,7 +991,6 @@ def _apply_effect_and_method_gates(entry: Dict, rule: Dict, match: Dict) -> None if entry.get('combination_en'): entry['combination_en'] = str(entry['combination_en']) + ' ' + en _withhold_effects(entry) - gated = True if rule.get('method_review'): entry['method_review'] = dict(rule['method_review']) if entry['method_review'].get('status') == 'pending': @@ -999,22 +998,21 @@ def _apply_effect_and_method_gates(entry: Dict, rule: Dict, match: Dict) -> None # an unresolved method as adjudicated. _withhold_effects(entry) entry.setdefault('condition_status', 'method_requires_review') - gated = True entry['formation_status'] = entry.get('condition_status', 'conditions_met') entry['evidence_status'] = 'local_rule_match' entry['display_status'] = 'candidate_review' entry['assertion_label'] = 'single_system_inference' entry['claim_boundary'] = ('Named rule conditions only; external validation and real-life ' 'results are not established by detection.') - # Her rows all carry card_eligible=False. Product layer (announced, BUG-2299): the chart - # page reads card_eligible=False as 「暂无法判断」 (BUG-2173), so here it is set only on rows - # a gate restricted; whether every local match should read so is an open question for her. - if gated or entry['formation_status'] != 'conditions_met': - entry['card_eligible'] = False - entry['card_status'] = 'reference_only' - entry['card_block_reason'] = ( - 'Traditional yoga is detected by the local rule library; independent source/case ' - 'verification is still required before it can appear as a conclusion card.') + # A local rule match is useful evidence, but it is not an independently verified + # traditional yoga. Keep this explicit so downstream cards cannot silently promote it + # to a definitive interpretation. (BUG-2301: was set only on restricted rows in + # BUG-2299; the chart page reads `card_status` now, see frontend chart-view-insight.ts.) + entry['card_eligible'] = False + entry['card_status'] = 'reference_only' + entry['card_block_reason'] = ( + 'Traditional yoga is detected by the local rule library; independent source/case ' + 'verification is still required before it can appear as a conclusion card.') def _blocked_rule_row(rule: Dict, exc: BaseException, ctx: "YogaContext") -> Dict: @@ -1064,6 +1062,26 @@ def is_blocked_rule_row(row: Any) -> bool: and row.get('formation_status') in BLOCKED_ROW_STATUSES) +def _upstream_calc_arudha_sign(house_sign_idx: int, lord_sign_idx: int) -> Dict: + """Her scripts/jaimini.py `calc_arudha_sign` (upstream 58f37ee5b), copied unchanged (BUG-2301). + + Shared PVR §9.2 sign-counting rule; lord selection is caller-owned. This repo's + jaimini.py is sealed and does not have the function. + """ + source = house_sign_idx % 12 + lord = lord_sign_idx % 12 + distance = ((lord - source) % 12) + 1 + initial = (lord + distance - 1) % 12 + exception = initial in (source, (source + 6) % 12) + final = (initial + 9) % 12 if exception else initial + return { + 'sign': SIGNS[final % 12], 'sign_idx': final, 'distance': distance, + 'unadjusted_sign': SIGNS[initial % 12], + 'exception_triggered': exception, + 'exception_rule': 'pvr_9_2_tenth_from_unadjusted_pada_v1', + } + + def evaluation_failure_row(rule: Dict, exc: BaseException) -> Dict: """The record of one rule that could not be evaluated on this chart.""" error_class = getattr(exc, "error_class", None) or type(exc).__name__ @@ -1607,6 +1625,8 @@ class YogaEngine: # 2026-11-07 they silently returned "not formed" on every chart; they # are now listed as `not_implemented` and never evaluated. self.unimplemented_rules: List[Dict] = [] + # BUG-2301: (rule, missing types) of the preflight above, for her blocked rows in `detect`. + self._preflight_unimplemented: List[tuple] = [] # Rules found unsupported at evaluation time by the last `detect` call # (e.g. a rule list replaced after loading); same row shape. self.last_unimplemented: List[Dict] = [] @@ -1616,6 +1636,7 @@ class YogaEngine: missing = self.unsupported_conditions(rule.get("logic", {})) if missing: self.unimplemented_rules.append(_not_implemented_row(rule, missing)) + self._preflight_unimplemented.append((rule, missing)) else: kept.append(rule) self.rules = kept @@ -1628,6 +1649,7 @@ class YogaEngine: missing = self.unsupported_conditions(rule.get("logic", {})) if missing: self.unimplemented_rules.append(dict(_not_implemented_row(rule, missing), reference_only=True)) + self._loaded_rules = self.rules def unsupported_conditions(self, node) -> List[str]: """Condition types in any branch of `node` that no evaluator implements. @@ -1795,6 +1817,13 @@ class YogaEngine: self.last_evaluation_failures = failures unimplemented: List[Dict] = [] self.last_unimplemented = unimplemented + # BUG-2301 (upstream 58f37ee5b): her `detect` returns a blocked row for every rule whose + # condition type has no evaluator. Here those rules were set aside when the library was + # loaded (rulings A3); their blocked rows are returned while the loaded rule list is in use + # (a caller that replaced `self.rules` evaluates only its own list, as in her engine). + if self.rules is self._loaded_rules: + for rule, missing in self._preflight_unimplemented: + results.append(_blocked_rule_row(rule, UnsupportedYogaCondition(missing), ctx)) # 规则匹配。一条规则求值失败(异常)记为 evaluation_failed 并带错误类, # 不得静默当成不成立(占星师第三轮审查 2026-11-07)。 @@ -1896,7 +1925,8 @@ class YogaEngine: # BUG-2299 (upstream 58f37ee5b): the English twin moves too. if entry.get('effects_en'): entry['traditional_effects_en'] = entry['effects_en'] - entry['effects_en'] = [] + # BUG-2301 (upstream 58f37ee5b): the key is dropped, as in her rows. + entry.pop('effects_en', None) entry['strength'] = 'conditional' entry['strength_en'] = 'Conditional' entry['combustion_witness'] = { @@ -1916,7 +1946,8 @@ class YogaEngine: # BUG-2222 (upstream b6754475): the English twin moves too. if entry.get('effects_en'): entry['traditional_effects_en'] = entry['effects_en'] - entry['effects_en'] = [] + # BUG-2301 (upstream 58f37ee5b): the key is dropped, as in her rows. + entry.pop('effects_en', None) entry['strength'] = 'conditional' entry['strength_en'] = 'Conditional' _apply_effect_and_method_gates(entry, rule, m) @@ -1941,7 +1972,6 @@ class YogaEngine: # duplicated bvr_002..004 / bvr_016..018 under other spellings; upstream # e628118d removed it. The precise rules count the same five planets # (BUG-1187 / BUG-1206), so nothing they ruled is lost. - # ── 主检测器(同名 JSON 规则为 reference_only) ── # BUG-2299 (upstream 58f37ee5b): rules sharing a lordship fact name each other. for entry in results: dependencies = entry.get('evidence_dependencies', {}) @@ -1951,7 +1981,12 @@ class YogaEngine: other['rule_id'] for other in results if other is not entry and keys.intersection(other.get('evidence_dependencies', {}).get('shared_fact_keys', []))}) dependencies['independent_confirmation_count'] = None - results += main_detector_rows(ctx.planets, ctx.ascendant) + # ── 主检测器(同名 JSON 规则为 reference_only;BUG-1205/1206/1207 产品层) ── + # BUG-2301: they stand in for the reference_only rules of the loaded library, so they run + # with that library only; a caller that replaced `self.rules` evaluates its own list, as in + # her engine. + if self.rules is self._loaded_rules: + results += main_detector_rows(ctx.planets, ctx.ascendant) return results @@ -1967,6 +2002,1585 @@ class YogaEngine: raise UnsupportedYogaCondition(unsupported) return self._eval_condition(logic, ctx, rule, {}) + # ------------------------------------------------------------------------ + # BUG-2301: the astrologer's source evaluators (upstream 58f37ee5b), copied unchanged + # from `_required_pattern_houses` to `_eval_neecha_bhanga`. The Neecha Bhanga JSON rules + # stay reference_only here (main detector, BUG-1205), so `_eval_neecha_bhanga` only + # answers the not-implemented scan until the dual-path question is settled. + # ------------------------------------------------------------------------ + def _required_pattern_houses(self, ctx, planets): + houses = {p: ctx.house_of(p) for p in planets} + missing = [p + '.house' for p, h in houses.items() + if isinstance(h, bool) or not isinstance(h, int) or not 1 <= h <= 12] + if missing: + raise MissingYogaInput(', '.join(missing)) + return houses + + def _eval_all_planets_in_houses(self, cond, ctx, rule, bindings): + """PVR p135 Samudra; exact occupied-house pattern, not a subset.""" + planets = cond.get('planets') or ALL_PLANETS[:7] + offsets = cond.get('house_offsets') + if (not isinstance(offsets, list) or not offsets or + any(type(h) is not int or not 0 <= h < 12 for h in offsets)): + raise MissingYogaInput('condition.house_offsets_0_based') + houses = self._required_pattern_houses(ctx, planets) + if set(houses.values()) != {h + 1 for h in offsets}: + return [] + return [{'combination': '七曜占据全部指定宫位;交点不参与', + 'bindings': {'_participants': list(planets)}, + 'missing_inputs': [], + 'condition_checks': {'planet_houses': houses, 'required_houses': [h+1 for h in offsets]}, + 'condition_status': 'conditions_met'}] + + def _eval_all_7_planets_in_7_consecutive_non_kendra_starting_houses(self, cond, ctx, rule, bindings): + """PVR p134 Ardha Chandra; seven occupied signs, non-angular start.""" + planets = ALL_PLANETS[:7] + houses = self._required_pattern_houses(ctx, planets) + occupied = set(houses.values()) + starts = [start for start in (2, 3, 5, 6, 8, 9, 11, 12) + if occupied == {(start-1+i) % 12+1 for i in range(7)}] + if not starts: + return [] + return [{'combination': '七曜分别占据从非角宫开始的连续七宫;交点不参与', + 'bindings': {'_participants': list(planets)}, + 'missing_inputs': [], + 'condition_checks': {'planet_houses': houses, 'starting_houses': starts}, + 'condition_status': 'conditions_met'}] + + def _eval_planets_in_mutual_trines(self, cond, ctx, rule, bindings): + """PVR p142 Trilochana; distinct trines, not conjunction.""" + planets = cond.get('planets') or [] + if len(planets) != 3 or len(set(planets)) != 3: + raise MissingYogaInput('condition.three_distinct_planets') + houses = self._required_pattern_houses(ctx, planets) + values = list(houses.values()) + if not all((a-b) % 12 in (4, 8) for i,a in enumerate(values) for b in values[i+1:]): + return [] + return [{'combination': '太阳、月亮与火星互为三方宫,非同宫替代', + 'bindings': {'_participants': list(planets)}, + 'missing_inputs': [], + 'condition_checks': {'planet_houses': houses}, + 'condition_status': 'conditions_met'}] + + def _natural_benefics_for_named_pattern(self, ctx): + """Explicit waxing-Moon/unafflicted-Mercury convention, not functional roles.""" + self._required_pattern_houses(ctx, ALL_PLANETS) + benefics = ['Jupiter', 'Venus'] + waning = ctx.panchanga.get('is_waning_moon') + if not isinstance(waning, bool): + raise MissingYogaInput('Moon.phase') + if not waning: + benefics.append('Moon') + malefics = ['Sun', 'Mars', 'Saturn', 'Rahu', 'Ketu'] + (['Moon'] if waning else []) + if not any(ctx.house_of(p) == ctx.house_of('Mercury') for p in malefics): + benefics.append('Mercury') + return benefics + + def _eval_vasumathi_raman(self, cond, ctx, rule, bindings): + """Raman no.9 pp29–31: retain partial occupancy and both references. + + Benefic count is descriptive, not a calibrated wealth score. Do not + require all four houses: the author's example occupies only three. + """ + benefics = self._natural_benefics_for_named_pattern(ctx) + results = [] + for reference, origin in [('Lagna', 1), ('Moon', ctx.house_of('Moon'))]: + relative = {p: (ctx.house_of(p) - origin) % 12 + 1 for p in ALL_PLANETS} + occupied = [p for p in benefics if relative[p] in (3, 6, 10, 11)] + if not occupied: + continue + pressures = [p for p in ALL_PLANETS if p not in benefics + and relative[p] in (3, 6, 10, 11)] + results.append({ + 'combination': reference + ': benefics in upachayas: ' + ', '.join(occupied), + 'bindings': {'_participants': occupied}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'reference': reference, 'benefics': occupied, + 'relative_houses': {p: relative[p] for p in occupied}}, + 'formation_evidence': {'reference': reference, + 'benefic_count': len(occupied), + 'occupied_upachayas': sorted({relative[p] for p in occupied}), + 'malefics_in_upachayas': pressures, + 'full_results_established': False, + 'boundary': 'Partial occupancy retained; strength and competing influences require synthesis. No wealth guarantee or independent vote.'}}) + return results + + def _eval_parvata_pvr(self, cond, ctx, rule, bindings): + """PVR indexed p137: occupants, not angular lords or dusthana lords.""" + benefics = self._natural_benefics_for_named_pattern(ctx) + angular = [p for p in ALL_PLANETS if ctx.house_of(p) in (1, 4, 7, 10)] + guarded = [p for p in ALL_PLANETS if ctx.house_of(p) in (7, 8)] + if not angular or any(p not in benefics for p in angular + guarded): + return [] + return [{'combination': '角宫有吉星且无凶星;第7、8宫空置或仅有吉星', + 'bindings': {'_participants': list(dict.fromkeys(angular + guarded))}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'angular_occupants': angular, 'houses_7_8_occupants': guarded, + 'natural_benefics': benefics}}] + + def _eval_lagna_presence_or_kartari_pvr(self, cond, ctx, rule, bindings): + """PVR p136: occupied lagna OR both flanks; no extra aspect veto. + + Mixed influences may form both geometric patterns. Strength and final + interpretation are separate; this does not assert character traits. + """ + benefics = self._natural_benefics_for_named_pattern(ctx) + kind = cond.get('kind') + if kind not in ('benefic', 'malefic'): + raise UnsupportedYogaCondition(['lagna_presence_or_kartari_pvr.kind']) + selected = benefics if kind == 'benefic' else [p for p in ALL_PLANETS if p not in benefics] + groups = {h: [p for p in selected if ctx.house_of(p) == h] for h in (1, 2, 12)} + if not groups[1] and not (groups[2] and groups[12]): + return [] + witnesses = groups[1] + (groups[2] + groups[12] if groups[2] and groups[12] else []) + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': witnesses}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'lagna_occupants': groups[1], + 'second_occupants': groups[2], 'twelfth_occupants': groups[12], + 'scope': 'geometry_only_not_strength_or_outcome'}}] + + def _eval_chaamara_pvr(self, cond, ctx, rule, bindings): + """PVR indexed p137: two alternatives; each pair shares one house.""" + lord = ctx.lord_of_house(1) + self._required_pattern_houses(ctx, [lord, 'Jupiter']) + if not ctx.sign_of(lord): + raise MissingYogaInput('ascendant_lord.sign') + first = (ctx.is_exalted(lord) and ctx.is_kendra(ctx.house_of(lord)) + and ctx.parashari_aspect('Jupiter', lord)) + if first: + return [{'combination': '上升主入旺且在角宫,受到木星照射', + 'bindings': {'_participants': [lord, 'Jupiter']}}] + benefics = self._natural_benefics_for_named_pattern(ctx) + matches = [] + for house in (7, 9, 10): + witnesses = [p for p in benefics if ctx.house_of(p) == house] + if len(witnesses) >= 2: + matches.append({'combination': f'至少两颗自然吉星同在第{house}宫', + 'bindings': {'_participants': witnesses}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'house': house, 'benefics': witnesses}}) + return matches + + def _eval_kusuma_pvr(self, cond, ctx, rule, bindings): + """PVR indexed p139: four conjunctive requirements, not three-of-four. + + Mercury's benefic role is bounded to the unassociated-with-malefics + convention; conjunction with the Moon does not let Moon witness itself. + """ + required = ('Moon', 'Venus', 'Saturn', 'Jupiter', 'Mercury', + 'Sun', 'Mars', 'Rahu', 'Ketu') + missing = [p for p in required if not ctx.sign_of(p) or ctx.house_of(p) is None] + if missing: + return [{'combination': 'Kusuma four-condition check: missing planetary inputs', + 'condition_status': 'incomplete_conditions', 'missing_inputs': missing, + 'condition_checks': {}, + 'bindings': {'_participants': ['Moon', 'Venus', 'Saturn']}}] + moon_sign = ctx.sign_of('Moon') + witnesses = [p for p in ('Jupiter', 'Venus') if ctx.sign_of(p) == moon_sign] + mercury_clean = not any(ctx.sign_of(p) == ctx.sign_of('Mercury') + for p in ('Sun', 'Mars', 'Saturn', 'Rahu', 'Ketu')) + if ctx.sign_of('Mercury') == moon_sign and mercury_clean: + witnesses.append('Mercury') + checks = {'fixed_lagna': ctx.ascendant in ('Taurus', 'Leo', 'Scorpio', 'Aquarius'), + 'venus_kendra': ctx.house_of('Venus') in (1, 4, 7, 10), + 'moon_trine_with_benefic': ctx.house_of('Moon') in (1, 5, 9) and bool(witnesses), + 'saturn_tenth': ctx.house_of('Saturn') == 10} + if not all(checks.values()): + return [] + return [{'combination': 'Fixed ascendant; Venus in quadrant; Moon in trine with benefic; Saturn in house 10', + 'condition_status': 'conditions_met', 'condition_checks': checks, + 'missing_inputs': [], + 'bindings': {'_participants': list(dict.fromkeys(['Moon', 'Venus', 'Saturn'] + witnesses))}}] + + def _eval_nishturabhashi_raman(self, cond, ctx, rule, bindings): + """No.296: conjunction is structure; Jupiter/Mars qualify expression.""" + houses = self._required_pattern_houses(ctx, ['Moon', 'Saturn']) + if houses['Moon'] != houses['Saturn']: + return [] + missing = [p + '.house' for p in ('Jupiter', 'Mars') if ctx.house_of(p) is None] + for p in ('Jupiter', 'Mars'): + if ctx.house_of(p) is not None: + self._required_pattern_houses(ctx, [p]) + jupiter = None if 'Jupiter.house' in missing else ctx.parashari_aspect('Jupiter', 'Moon') + mars = None if 'Mars.house' in missing else ctx.parashari_aspect('Mars', 'Moon') + status = 'source_neutralized' if jupiter else ('incomplete' if missing else 'traditional_reference_only') + return [{'combination': '月亮与土星同宫;木星缓解与火星加重另行核验', + 'bindings': {'_participants': ['Moon', 'Saturn']}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'moon_saturn_conjunction': True}, + 'formation_evidence': {'jupiter_aspect': jupiter, 'mars_aspect': mars}, + 'effect_assessment': {'status': status, 'missing_inputs': missing, + 'jupiter_neutralizes_source_effect': jupiter, + 'mars_intensifies_source_effect': mars, + 'personal_character_established': False, + 'boundary': 'Conjunction remains visible; source effects are not personality facts. Jupiter neutralization is not overridden by Mars.'}}] + + def _eval_jada_apakeerti_raman(self, cond, ctx, rule, bindings): + """Raman158/244: alternatives and expression qualifiers are separate. + + Benefic/malefic amsa means its sign lord under the explicit native + natural classification, not a friendly/enemy dignity or house proxy. + """ + profile = cond['profile'] + witnesses, branches = {}, {} + l2 = ctx.lord_of_house(2) + + def jada_conjunction(): + self._required_pattern_houses(ctx, [l2]) + if ctx.house_of(l2) != 10: + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + others = [p for p in ALL_PLANETS if p != l2 and p not in benefics + and ctx.house_of(p) == 10] + witnesses['lord_with_malefic'] = [l2, *others] + return bool(others) + + def jada_sun_maandi(): + self._required_pattern_houses(ctx, ['Sun']) + if ctx.house_of('Sun') != 2: + return False + if ctx.upagraha_house('maandi') is None: + raise MissingYogaInput('upagraha.maandi.house') + witnesses['sun_maandi'] = ['Sun'] + return ctx.upagraha_house('maandi') == 2 + + def apakeerti_aspect(): + benefics = self._natural_benefics_for_named_pattern(ctx) + others = [p for p in ALL_PLANETS if p not in ('Sun', 'Saturn') + and p not in benefics and ctx.parashari_aspects_house(p, 10)] + witnesses['external_malefic_aspect'] = ['Sun', 'Saturn', *others] + return bool(others) + + def apakeerti_navamsa(): + signs = [ctx.d9_sign_of(p) for p in ('Sun', 'Saturn')] + if any(s not in SIGNS for s in signs): + raise MissingYogaInput('Sun_and_Saturn.D9.sign') + benefics = self._natural_benefics_for_named_pattern(ctx) + witnesses['both_malefic_navamsas'] = ['Sun', 'Saturn'] + return all(SIGN_LORDS[s] not in benefics for s in signs) + + if profile == 'jada_158': + evaluators = [('lord_with_malefic', jada_conjunction), ('sun_maandi', jada_sun_maandi)] + elif profile == 'apakeerti_244': + self._required_pattern_houses(ctx, ['Sun', 'Saturn']) + if any(ctx.house_of(p) != 10 for p in ('Sun', 'Saturn')): + return [] + evaluators = [('external_malefic_aspect', apakeerti_aspect), + ('both_malefic_navamsas', apakeerti_navamsa)] + else: + raise UnsupportedYogaCondition(['jada_apakeerti_raman.' + str(profile)]) + for name, evaluate in evaluators: + try: + branches[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + branches[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [k for k, v in branches.items() if v['status'] == 'met'] + missing = [v['missing_input'] for v in branches.values() if v['status'] == 'incomplete'] + if not met and not missing: + return [] + assessment = {'status': 'historical_conduct_reference', 'personal_outcome_established': False, + 'summary_zh': '传统结构不等于实际性格、表达能力或名誉结论。', + 'summary_en': 'The traditional structure does not establish character, speaking ability or reputation.'} + if met: + try: + if profile == 'jada_158': + sign = ctx.d9_sign_of(l2) + if sign not in SIGNS: + raise MissingYogaInput('second_lord.D9.sign') + relieved = SIGN_LORDS[sign] in self._natural_benefics_for_named_pattern(ctx) + assessment['benefic_navamsa_neutralizes'] = relieved + if relieved: + assessment.update(status='source_neutralized', + summary_zh='2宫主位于吉星主宰的D9星座,原书的缓解条件满足;不据此判断公众表达能力。', + summary_en='The second lord occupies a benefic-ruled Navamsa: the source mitigation is met; no speaking ability is inferred.') + else: + self._required_pattern_houses(ctx, ['Jupiter']) + assessment['jupiter_mitigation'] = ctx.parashari_aspects_house('Jupiter', 10) + # Raman calls this an antidote, not unconditional cancellation. + except MissingYogaInput as exc: + assessment.update(status='incomplete', missing_inputs=exc.fields, + summary_zh='结构条件已满足,但缓解因素资料未齐,不能据此判断实际表现。', + summary_en='The structure matches, but mitigation inputs are missing; personal expression is not established.') + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for k in met for p in witnesses[k]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'missing_inputs': [] if met else missing, 'condition_checks': branches, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'maandi_house': ctx.upagraha_house('maandi') if profile == 'jada_158' else None, + 'amsa_classification': 'D9 sign lord; native waxing-Moon/unafflicted-Mercury convention', + 'independent_support_count': 1 if met else 0}, + 'effect_assessment': assessment}] + + def _eval_learning_expression_raman(self, cond, ctx, rule, bindings): + """Named Raman definitions and remarks, not psychometric judgments.""" + profile = cond['profile'] + witnesses, evaluators = {}, [] + + def asat_definition(): + lord = ctx.lord_of_house(2) + sign = ctx.sign_of(lord) + if sign not in SIGNS: + raise MissingYogaInput('second_lord.D1.sign') + if SIGN_LORDS[sign] not in ('Mars', 'Saturn'): + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + k = [p for p in ALL_PLANETS if p not in benefics and ctx.house_of(p) in (1, 4, 7, 10)] + t = [p for p in ALL_PLANETS if p not in benefics and ctx.house_of(p) in (1, 5, 9)] + witnesses['definition'] = [lord, *k, *t] + return bool(k and t) + + def asat_navamsa(): + lord = ctx.lord_of_house(2) + sign = ctx.d9_sign_of(lord) + if sign not in SIGNS: + raise MissingYogaInput('second_lord.D9.sign') + dispositor = SIGN_LORDS[sign] + witnesses['navamsa_dispositor_alternative'] = [lord, dispositor] + if dispositor in ('Mars', 'Saturn'): + return True + sign = ctx.sign_of(dispositor) + if sign not in SIGNS: + raise MissingYogaInput('second_lord.D9_dispositor.D1.sign') + return SIGN_LORDS[sign] in ('Mars', 'Saturn') + + def buddhi_definition(): + lord = ctx.lord_of_house(5) + benefics = self._natural_benefics_for_named_pattern(ctx) + if lord not in benefics: + return False + others = [p for p in benefics if p != lord and ctx.parashari_aspect(p, lord)] + witnesses['definition'] = [lord, *others] + if others: + return True + sign = ctx.sign_of(lord) + if sign not in SIGNS: + raise MissingYogaInput('fifth_lord.D1.sign') + return SIGN_LORDS[sign] in benefics + + def buddhi_remarks(): + lord = ctx.lord_of_house(5) + benefics = self._natural_benefics_for_named_pattern(ctx) + occupants = [p for p in benefics if ctx.house_of(p) == 5] + others = [p for p in ('Jupiter', 'Mercury', 'Venus') if p != lord + and ctx.house_of(p) == ctx.house_of(lord)] + witnesses['remarks_distinct_benefic_companion'] = [lord, *occupants, *others] + return bool(occupants and others) + + if profile == 'asatyavadi_157': + evaluators = [('definition', asat_definition), ('navamsa_dispositor_alternative', asat_navamsa)] + convention = 'At least one natural malefic in kendra and trikona sets; Lagna belongs to both. Separate D9-dispositor alternative.' + elif profile == 'buddhimaturya_231': + evaluators = [('definition', buddhi_definition), ('remarks_distinct_benefic_companion', buddhi_remarks)] + convention = 'Remarks interpreted as at least one distinct Jupiter/Mercury/Venus conjunction, consistent with author example104; no self-conjunction or IQ inference.' + elif profile == 'buddhi_jada_233': + lord = ctx.lord_of_house(1) + self._required_pattern_houses(ctx, [lord, 'Saturn']) + if ctx.house_of('Saturn') != 5 or not ctx.parashari_aspect('Saturn', lord): + return [] + # Saturn's actual aspect also supplies the stated malefic contact. + witnesses['definition'] = [lord, 'Saturn'] + evaluators = [('definition', lambda: True)] + convention = 'Definition only; later example107 is not promoted to a general alternate rule. Saturn cannot aspect itself.' + else: + raise UnsupportedYogaCondition(['learning_expression_raman.' + str(profile)]) + states = {} + for name, evaluate in evaluators: + try: + states[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + states[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, state in states.items() if state['status'] == 'met'] + missing = [v['missing_input'] for v in states.values() if v['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': states, 'missing_inputs': [] if met else missing, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'classification_profile': convention, 'independent_support_count': 1 if met else 0}, + 'effect_assessment': {'status': 'historical_conduct_reference', + 'personal_outcome_established': False, + 'summary_zh': '传统结构仅供综合分析,不据此判定个人智力、诚信、品格或心理疾病。', + 'summary_en': 'Traditional structure for synthesis only; it does not establish intelligence, honesty, character or mental illness.'}}] + + def _eval_wealth_house_observation(self, cond, ctx, rule, bindings): + """Legacy placement observations; missing input is not a negative finding.""" + lords = list(dict.fromkeys(ctx.lord_of_house(h) for h in cond['lord_houses'])) + houses = self._required_pattern_houses(ctx, lords) + if not all(h in (6, 8, 12) for h in houses.values()): + return [] + if cond.get('require_debilitation'): + if any(ctx.sign_of(p) not in SIGNS for p in lords): + raise MissingYogaInput('wealth_lord.D1.sign') + if not all(ctx.is_debilitated(p) for p in lords): + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': lords}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'lord_houses': houses}, + 'formation_evidence': {'matched_paths': ['placement_observation'], + 'named_yoga_formation': False, 'independent_support_count': None}}] + + def _eval_vidyut_source_geometry(self, cond, ctx, rule, bindings): + """Raman59/PVR: preserve exact peak and broader unresolved reading.""" + if ctx.ascendant not in SIGNS: + raise MissingYogaInput('ascendant.sign') + l1, l11 = ctx.lord_of_house(1), ctx.lord_of_house(11) + participants = list(dict.fromkeys([l1, l11, 'Venus'])) + signs = {p: ctx.sign_of(p) for p in participants} + for p, sign in signs.items(): + if sign not in SIGNS: + raise MissingYogaInput(p + '.D1.sign') + # This is a rasi relation from the ascendant LORD, not from Lagna. + conjunction = signs[l11] == signs['Venus'] + relative = (SIGNS.index(signs[l11]) - SIGNS.index(signs[l1])) % 12 + 1 + if not conjunction or relative not in (1, 4, 7, 10) or signs[l11] != EXALTATION[l11]: + return [] + try: + from .shadbala import EXALTATION_DEG + except ImportError: + from shadbala import EXALTATION_DEG + peak = EXALTATION_DEG[l11] % 30 + missing, degree, distance = [], None, None + try: + degree = ctx.source_degree_in_sign(l11) + distance = abs(degree - peak) + except MissingYogaInput as exc: + missing.extend(exc.fields) + exact_peak = distance is not None and distance <= 1e-9 + # 1e-9 is coordinate round-off only, not an astrological orb. The + # sources give a peak but no finite width; preserve off-peak geometry + # without asserting either general formation or categorical absence. + if degree is not None and not exact_peak: + missing.append('Vidyut.source_admitted_deep_exaltation_extent') + if l11 == 'Venus': + missing.append('Vidyut.eleventh_lord_Venus_self_association_source_choice') + formed = exact_peak and l11 != 'Venus' + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': participants}, + 'condition_status': 'conditions_met' if formed else 'incomplete_conditions', + 'missing_inputs': missing, + 'condition_checks': {'ascendant_lord': l1, 'eleventh_lord': l11, + 'signs': signs, 'same_sign_as_venus': conjunction, + 'house_from_ascendant_lord': relative, + 'degree_in_sign': degree, 'deep_exaltation_degree': peak, + 'distance_from_peak_degrees': distance, 'exact_peak': exact_peak, + 'distinct_conjunction_participants': l11 != 'Venus'}, + 'formation_evidence': { + 'matched_paths': ['raman59_pvr_exact_peak'] if formed else [], + 'matched_geometry_paths': ['exaltation_sign_venus_conjunction_kendra_from_l1'], + 'unresolved_other_paths': ['finite_deep_exaltation_extent', 'Venus_self_association'], + 'implementation_scope': 'exact_peak_sufficient_branch_and_qualified_off_peak_geometry', + 'independent_support_count': int(formed), + 'numerical_roundoff_degrees': 1e-9, 'astrological_orb_assumed': False}, + 'effect_assessment': {'status': 'incomplete', 'personal_outcome_established': False, + 'summary_zh': '保留财富管理、享受与慷慨的传统候选含义;实际表现仍需结合两位宫主的强弱与全盘,不能据格局名称推断技术职业、权位或必然财富。', + 'summary_en': 'Retain traditional wealth-management, enjoyment and generosity themes conditionally. Expression depends on the lords and whole chart; the name establishes no technology occupation, rank or guaranteed wealth.'}}] + + def _eval_netranasa_raman_geometry(self, cond, ctx, rule, bindings): + """Raman164: literal D1 definition; ambiguous amsa clause stays separate.""" + if ctx.ascendant not in SIGNS: + raise MissingYogaInput('ascendant.sign') + lords = list(dict.fromkeys(ctx.lord_of_house(h) for h in (2, 6, 10))) + houses = {p: ctx.house_of(p) for p in lords} + # A known contrary placement disproves this conjunction even when a + # different planet is missing. Unknowns are not treated as negatives. + missing = [p + '.D1.house' for p, h in houses.items() + if type(h) is not int or not 1 <= h <= 12] + known_false = any(type(h) is int and 1 <= h <= 12 and h != 1 for h in houses.values()) + conjunction = False if known_false else (None if missing else True) + d9 = {p: ctx.d9_sign_of(p) for p in lords} + checks = {p: (None if s not in SIGNS else s == DEBILITATION[p]) for p, s in d9.items()} + # The source's "they" and amsa terminology are not silently replaced + # by D1 debility or a new all-purpose Navamsa rule. Preserve the actual + # D9 observation for review, but do not let it assert formation. + unresolved = ['raman164.neechamsa_scope_and_referents_source_choice'] + if conjunction is None: + unresolved.extend(missing) + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': lords}, + 'condition_status': 'conditions_met' if conjunction is True else 'incomplete_conditions', + 'missing_inputs': [] if conjunction is True else unresolved, + 'condition_checks': {'d1_lords': houses, 'd1_conjunction': conjunction, + 'd9_signs': d9, 'd9_debilitation_observations': checks}, + 'formation_evidence': { + 'matched_paths': ['raman164_lords_2_6_10_in_lagna'] if conjunction is True else [], + 'matched_geometry_paths': ['raman164_lords_2_6_10_in_lagna'] if conjunction is True else [], + 'unresolved_other_paths': unresolved, + 'implementation_scope': 'literal_d1_branch_amsa_alternative_unresolved', + 'independent_support_count': int(conjunction is True)}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'summary_zh': '仅核对原书位置结构,不据此判断视力或疾病。作者另强调日月有力且处境有利时不应断失明;该缓解条件未以任意强度阈值代替。', + 'summary_en': 'Historical structure only, not a vision or disease conclusion. The author cautions against predicting blindness when both luminaries are strong and favourably placed; no arbitrary strength threshold substitutes for that qualification.'}}] + + def _eval_raman_strength_qualified_geometry(self, cond, ctx, rule, bindings): + """Source-specific positional witnesses are not composite strength tests.""" + if ctx.ascendant not in SIGNS: + raise MissingYogaInput('ascendant.sign') + profile = cond['profile'] + paths, participants, checks, missing = [], [], {}, [] + if profile == 'suputra_226': + if ctx.lord_of_house(5) != 'Jupiter': + return [] + paths = ['jupiter_fifth_lord'] + participants = ['Jupiter', 'Sun'] + checks = {'fifth_lord': 'Jupiter', 'ascendant': ctx.ascendant} + missing = ['Sun.source_admitted_favourable_position_profile'] + elif profile == 'pretasapa_219': + participants = ['Sun', 'Saturn', 'Moon', 'Rahu', 'Jupiter'] + houses = self._required_pattern_houses(ctx, participants) + expected = {'Sun': 5, 'Saturn': 5, 'Moon': 7, 'Rahu': 1, 'Jupiter': 12} + if any(houses[p] != target for p, target in expected.items()): + return [] + paths = ['raman219_five_planet_placements'] + checks = {'houses': houses, 'required_houses': expected, + 'moon_phase_observation': ctx.panchanga.get('is_waning_moon'), + 'moon_weakness_assessed': False} + missing = ['Moon.source_admitted_composite_weakness_profile'] + elif profile == 'jarajaputra_237': + lords = {str(h): ctx.lord_of_house(h) for h in (5, 7, 6)} + participants = list(dict.fromkeys(lords.values())) + houses = self._required_pattern_houses(ctx, participants) + if len(set(houses.values())) != 1: + return [] + benefics = self._natural_benefics_for_named_pattern(ctx) + # Joined lords receive the aspect. A lord's outgoing special + # aspect does not turn into an incoming benefic aspect. + witnesses = [p for p in benefics if p not in participants + and ctx.parashari_aspects_house(p, houses[lords['5']])] + if not witnesses: + return [] + paths = ['raman237_lords_joined_and_receiving_benefic_aspect'] + participants.extend(witnesses) + checks = {'lords': lords, 'houses': houses, 'benefic_aspect_witnesses': witnesses, + 'lord_strength_assessed': False} + missing = list(dict.fromkeys(p + '.source_admitted_composite_strength_profile' + for p in (lords['5'], lords['7']))) + else: + benefics = self._natural_benefics_for_named_pattern(ctx) + checks['natural_benefics'] = benefics + if profile == 'bhagya_241': + witnesses = [p for p in benefics if ctx.house_of(p) in (1, 3, 5) + and ctx.parashari_aspects_house(p, 9)] + checks['ninth_house_aspect_witnesses'] = witnesses + for p in witnesses: + paths.append('benefic_placement_and_ninth_aspect:' + p) + participants.append(p) + missing.append(p + '.source_admitted_composite_strength_profile') + elif profile == 'bhratruvriddhi_177': + l3 = ctx.lord_of_house(3) + for label, target in [('third_lord', l3), ('mars', 'Mars'), ('third_house', None)]: + # Association is received by the target. Mars' own special + # aspect onto a benefic is not a benefic aspect onto Mars. + witnesses = [p for p in benefics if p != target and ( + (ctx.house_of(p) == 3 or ctx.parashari_aspects_house(p, 3)) + if target is None else + (ctx.house_of(p) == ctx.house_of(target) or ctx.parashari_aspect(p, target)))] + checks[label] = {'target': target or 'house3', 'benefic_witnesses': witnesses} + if witnesses: + paths.append(label + '_benefic_connection') + participants.extend(([target] if target else []) + witnesses) + missing.append((target or 'Third_house') + '.source_admitted_composite_strength_profile') + else: + raise ValueError('Unknown Raman strength-qualified profile: ' + str(profile)) + if not paths: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(participants))}, + 'condition_status': 'incomplete_conditions', + 'missing_inputs': list(dict.fromkeys(missing)), 'condition_checks': checks, + 'formation_evidence': {'matched_paths': [], 'matched_geometry_paths': paths, + 'implementation_scope': 'geometry_only_qualification_unresolved', + 'independent_support_count': 0, + 'benefic_convention': 'waxing Moon and unafflicted Mercury; Jupiter and Venus', + 'aspect_convention': 'received Parashari graha aspects; no node aspects'}, + 'effect_assessment': {'status': 'incomplete', 'personal_outcome_established': False, + 'summary_zh': cond['summary_zh'], 'summary_en': cond['summary_en']}}] + + def _eval_saarada_pvr_geometry(self, cond, ctx, rule, bindings): + """PVR indexed143: all five clauses; no invented composite strength.""" + lord = ctx.lord_of_house(10) + h = self._required_pattern_houses(ctx, [lord, 'Mercury', 'Jupiter', 'Moon', 'Mars', 'Sun']) + sun_sign = ctx.sign_of('Sun') + if sun_sign not in SIGNS: + raise MissingYogaInput('Sun.D1.sign') + trine = [p for p in ('Mercury', 'Jupiter') if (h[p] - h['Moon']) % 12 in (0, 4, 8)] + checks = {'tenth_lord_fifth': h[lord] == 5, + 'mercury_kendra': h['Mercury'] in (1, 4, 7, 10), + 'sun_in_leo': sun_sign == 'Leo', + 'mercury_or_jupiter_moon_trine': bool(trine), + 'mars_eleventh': h['Mars'] == 11} + if not all(checks.values()): + return [] + # Own-sign placement supports strength, but cannot replace the author's + # separate "strong" qualifier with an unreviewed numeric threshold. + missing = ['Sun.source_admitted_composite_strength_profile'] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys([lord, 'Mercury', 'Sun', 'Moon', 'Mars', *trine]))}, + 'condition_status': 'incomplete_conditions', 'missing_inputs': missing, + 'condition_checks': checks, + 'formation_evidence': {'matched_paths': [], 'matched_geometry_paths': ['five_clause_geometry'], + 'unresolved_other_paths': missing, 'independent_support_count': 0, + 'implementation_scope': 'geometry_only_strength_unresolved', + 'trine_convention': '1/5/9 from Moon, including conjunction'}, + 'effect_assessment': {'status': 'incomplete', + 'personal_outcome_established': False, + 'summary_zh': '五项位置条件吻合,太阳综合有力的判据尚未核定;保留学习与表达的传统候选含义,不判为完整成立。', + 'summary_en': 'Five positional clauses match; the separate solar strength criterion remains unresolved. Retain conditional learning themes, not complete formation.'}}] + + def _eval_satkathadisravana_raman(self, cond, ctx, rule, bindings): + """Raman186: received house/lord aspects, without D1-for-amsa substitution.""" + benefics = self._natural_benefics_for_named_pattern(ctx) + lord = ctx.lord_of_house(3) + house_aspects = [] + for p in benefics: + offsets = (5, 7, 9) if p == 'Jupiter' else (7,) + if (3 - ctx.house_of(p)) % 12 + 1 in offsets: + house_aspects.append(p) + lord_aspects = [p for p in benefics if p != lord and ctx.parashari_aspect(p, lord)] + definition_geometry = lord in benefics and bool(house_aspects) + if not definition_geometry and not lord_aspects: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys([lord, *house_aspects, *lord_aspects]))}, + 'condition_status': 'incomplete_conditions', + 'missing_inputs': ['third_lord.benefic_amsa_source_scope'], + 'condition_checks': {'third_house_lord': lord, + 'natural_benefic_convention': 'waxing_moon_unafflicted_mercury', + 'third_house_benefic_lord': lord in benefics, + 'third_house_received_benefic_aspects': house_aspects, + 'third_lord_received_benefic_aspects': lord_aspects, + 'third_lord_d9_sign_observation': ctx.d9_sign_of(lord)}, + 'formation_evidence': {'matched_paths': [], + 'matched_geometry_paths': (['definition_geometry'] if definition_geometry else []) + + (['remarks_received_aspect'] if lord_aspects else []), + 'independent_support_count': 0, + 'implementation_scope': 'received_aspect_geometry_amsa_scope_unresolved'}, + 'effect_assessment': {'status': 'incomplete', 'personal_outcome_established': False, + 'summary_zh': '保留阅读、听讲与经典学习的传统候选含义;分区条件尚未核定,不能据此断定阅读习惯、学识或信仰。', + 'summary_en': 'Retain conditional reading and study themes; the amsa qualifier is unresolved, so reading habits, scholarship or beliefs are not established.'}}] + + def _eval_yuddha_marana_raman(self, cond, ctx, rule, bindings): + """Raman275: separate literal, expanded and D3-dispositor alternatives.""" + states, witnesses = {}, {} + l3 = ctx.lord_of_house(3) + + def conjunction_path(lord, companions): + self._required_pattern_houses(ctx, [lord, l3]) + if ctx.house_of(lord) != ctx.house_of(l3): + return {'status': 'not_met'} + found, unknown = [], [] + for p in companions: + # One body filling two roles is not an extra companion. + if p in (lord, l3): + continue + house = ctx.upagraha_house('maandi') if p == 'Maandi' else ctx.house_of(p) + if house is None: + unknown.append(p + '.D1.house') + elif house == ctx.house_of(lord): + found.append(p) + if not found and not unknown: + return {'status': 'not_met'} + return {'status': 'incomplete', 'lord': lord, 'third_lord': l3, + 'companions': found, 'missing_inputs': unknown, + 'unresolved_qualifier': 'source_admitted_cruel_amsa_scope_and_nature', + 'self_lord_association': lord == l3} + + for label, lord in [('literal_mars', 'Mars'), ('remarks_sixth', ctx.lord_of_house(6)), + ('remarks_eighth', ctx.lord_of_house(8))]: + if label == 'literal_mars' and 'Mars' not in (ctx.lord_of_house(6), ctx.lord_of_house(8)): + states[label] = {'status': 'not_applicable'} + continue + try: + states[label] = conjunction_path(lord, ('Rahu', 'Maandi', 'Mars') if lord == 'Saturn' else ('Rahu', 'Saturn', 'Maandi')) + except MissingYogaInput as exc: + states[label] = {'status': 'incomplete', 'missing_input': str(exc)} + + sign = ctx.d3.get('planets', {}).get('Saturn', {}).get('sign') + if sign not in SIGNS: + states['saturn_d3_dispositor'] = {'status': 'incomplete', 'missing_input': 'Saturn.D3.sign'} + else: + lord = SIGN_LORDS[sign] + d1, d9 = ctx.sign_of(lord), ctx.d9_sign_of(lord) + aspect = None + if ctx.house_of('Mars') in range(1, 13) and ctx.house_of(lord) in range(1, 13): + aspect = lord != 'Mars' and ctx.parashari_aspect('Mars', lord) + checks = {'dispositor_in_mars_d1_sign': d1 in ('Aries', 'Scorpio') if d1 in SIGNS else None, + 'dispositor_in_mars_d9_sign': d9 in ('Aries', 'Scorpio') if d9 in SIGNS else None, + 'dispositor_receives_mars_d1_aspect': aspect} + met = any(v is True for v in checks.values()) + states['saturn_d3_dispositor'] = {'status': 'met' if met else ('incomplete' if None in checks.values() else 'not_met'), + 'saturn_d3_sign': sign, 'dispositor': lord, 'checks': checks} + witnesses['saturn_d3_dispositor'] = list(dict.fromkeys(['Saturn', lord, 'Mars'])) + met = [k for k, v in states.items() if v['status'] == 'met'] + pending = [k for k, v in states.items() if v['status'] == 'incomplete'] + if not met and not pending: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for k in met for p in witnesses.get(k, [])))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': states, 'missing_inputs': [] if met else pending, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': pending, + 'independent_support_count': int(bool(met)), + 'implementation_scope': 'd3_alternative_wired_conjunction_amsa_partial'}, + 'effect_assessment': {'status': 'historical_injury_reference', 'personal_outcome_established': False, + 'summary_zh': '保留原书的独立分盘条件与合相条件。此历史条目不能据此判断战争、伤害或死亡事件。', + 'summary_en': 'Preserve the separate divisional and conjunction readings. This historical item does not establish war, injury or death.'}}] + + def _eval_sirachcheda_raman_geometry(self, cond, ctx, rule, bindings): + """Raman273: conjunction geometry and two explicitly distinct amsa readings.""" + l6 = ctx.lord_of_house(6) + self._required_pattern_houses(ctx, [l6, 'Venus', 'Sun', 'Saturn', 'Rahu']) + if ctx.house_of(l6) != ctx.house_of('Venus'): + return [] + joined = [p for p in ('Sun', 'Saturn') if ctx.house_of(p) == ctx.house_of('Rahu')] + if not joined: + return [] + missing = ['source_admitted_shashtiamsa_nature_and_scope_profile'] + if l6 == 'Venus': + missing.append('Venus_as_sixth_lord.self_association_source_choice') + alternatives = {} + for planet in joined: + ordinals = {} + comparison = {} + for p in (planet, 'Rahu'): + try: + ordinals[p] = ctx.raman_shashtiamsa_ordinal(p) + comparison[p] = ctx.saravali_shashtiamsa_comparison(p) + except MissingYogaInput as exc: + missing.append(str(exc)) + # Ordinal equality is only the shared-segment clause, not nature. + shared = (ordinals[planet] == ordinals['Rahu'] + if len(ordinals) == 2 else None) + alternatives[planet] = { + 'named_amsa_ordinals': ordinals, + 'saravali_nature_comparison': comparison, + 'shared_amsa_reading': { + 'status': 'not_met' if shared is False else 'incomplete', + 'same_named_segment': shared}, + 'planet_only_amsa_reading': {'status': 'incomplete'}, + } + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys([l6, 'Venus', 'Rahu', *joined]))}, + 'condition_status': 'incomplete_conditions', 'missing_inputs': list(dict.fromkeys(missing)), + 'condition_checks': {'sixth_lord_joins_venus': None if l6 == 'Venus' else True, + 'sun_or_saturn_joins_rahu': joined, + 'source_scope_alternatives': alternatives}, + 'formation_evidence': {'matched_paths': [], + 'matched_geometry_paths': [] if l6 == 'Venus' else ['raman273_conjunctions'], + 'independent_support_count': 0, + 'implementation_scope': 'geometry_only_named_amsa_scope_unresolved'}, + 'effect_assessment': {'status': 'historical_injury_reference', + 'personal_outcome_established': False, + 'summary_zh': '部分位置条件吻合;六十分区的性质及两种原文读法仍须分开核定。此传统条目不能用于断言受伤、死亡或具体灾祸。', + 'summary_en': 'Some positional clauses match; named-amsa nature and the two source readings remain separate unresolved conditions. This historical item does not establish injury, death or disaster.'}}] + + def _eval_galakarna_raman(self, cond, ctx, rule, bindings): + """264: executable conjunction, separate unresolved named-amsa paths.""" + self._required_pattern_houses(ctx, ['Rahu', 'Mars']) + states, witnesses = {}, {} + if ctx.house_of('Rahu') != 3: + states['maandi_rahu'] = {'status': 'not_met'} + elif ctx.upagraha_house('maandi') is None: + states['maandi_rahu'] = {'status': 'incomplete', 'missing_input': 'maandi.D1.house'} + else: + states['maandi_rahu'] = {'status': 'met' if ctx.upagraha_house('maandi') == 3 else 'not_met'} + witnesses['maandi_rahu'] = ['Maandi', 'Rahu'] + # Manual art127 locates Preta Puriha at ordinal12. A D60 sign cannot. + if ctx.house_of('Mars') != 3: + states['mars_named_amsa_definition'] = {'status': 'not_met'} + else: + try: + ordinal = ctx.raman_shashtiamsa_ordinal('Mars') + states['mars_named_amsa_definition'] = { + 'status': 'met' if ordinal == 12 else 'not_met', + 'named_amsa_ordinal': ordinal, 'source_profile': 'Raman_Manual_art127'} + witnesses['mars_named_amsa_definition'] = ['Mars'] + except MissingYogaInput as exc: + states['mars_named_amsa_definition'] = {'status': 'incomplete', 'missing_input': str(exc)} + states['rahu_cruel_amsa_remarks'] = ( + {'status': 'incomplete', 'missing_input': 'Rahu.source_admitted_shashtiamsa_nature'} + if ctx.house_of('Rahu') == 3 else {'status': 'not_met'}) + if ctx.house_of('Rahu') == 3: + try: + states['rahu_cruel_amsa_remarks']['source_comparison'] = ctx.saravali_shashtiamsa_comparison('Rahu') + except MissingYogaInput: + pass # Existing unresolved state remains explicit; no false negative. + met = [name for name, state in states.items() if state['status'] == 'met'] + missing = [state['missing_input'] for state in states.values() if state['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': states, 'missing_inputs': [] if met else missing, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'independent_support_count': int(bool(met)), 'implementation_scope': 'partial_named_amsa_unresolved'}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'summary_zh': '传统结构参考,不据此判断耳部疾病、听力或其他医学结果。罗睺凶性六十分区的补充口径尚未核定。', + 'summary_en': 'Historical structure only, not an ear or hearing diagnosis. The Rahu cruel-shashtiamsa remarks profile remains unresolved.'}}] + + def _eval_gandharva_pvr_geometry(self, cond, ctx, rule, bindings): + """PVR indexed144: retain all positional clauses and unresolved strength.""" + l1, l10 = ctx.lord_of_house(1), ctx.lord_of_house(10) + self._required_pattern_houses(ctx, [l1, l10, 'Jupiter', 'Moon']) + if ctx.sign_of('Sun') not in SIGNS: + raise MissingYogaInput('Sun.D1.sign') + checks = {'tenth_lord_trine_from_seventh': ctx.house_of(l10) in (7, 11, 3), + 'jupiter_contacts_lagna_lord': l1 != 'Jupiter' and ( + ctx.house_of(l1) == ctx.house_of('Jupiter') or ctx.parashari_aspect('Jupiter', l1)), + 'sun_exalted': ctx.sign_of('Sun') == 'Aries', + 'moon_ninth': ctx.house_of('Moon') == 9} + # Self-contact cannot silently fulfill an association clause. + self_contact = l1 == 'Jupiter' + if any(not value for key, value in checks.items() + if key != 'jupiter_contacts_lagna_lord' or not self_contact): + return [] + missing = ['Sun.source_admitted_composite_strength_profile'] + if self_contact: + missing.append('Jupiter_as_lagna_lord.self_association_source_choice') + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys([l1, l10, 'Jupiter', 'Sun', 'Moon']))}, + 'condition_status': 'incomplete_conditions', 'missing_inputs': missing, + 'condition_checks': checks, + 'formation_evidence': {'matched_paths': [], + 'matched_geometry_paths': [] if self_contact else ['pvr_four_clause_geometry'], + 'unresolved_other_paths': missing, 'independent_support_count': 0, + 'implementation_scope': 'geometry_only_strength_unresolved'}, + 'effect_assessment': {'status': 'incomplete', 'personal_outcome_established': False, + 'summary_zh': '保留艺术与表达主题的传统候选结构;太阳入旺不能单独替代综合有力条件,不能据此确定才艺、名望或实际成就。', + 'summary_en': 'Retain the traditional arts/expression candidate structure. Solar exaltation alone does not establish the separate strength condition, talent, fame or achievement.'}}] + + def _eval_matrudeerghayur_raman_geometry(self, cond, ctx, rule, bindings): + """196/197: separate D1 and D9-dispositor paths; neither proves longevity.""" + l4 = ctx.lord_of_house(4) + states, witnesses = {}, {} + + def definition196(): + if ctx.sign_of(l4) not in SIGNS: + raise MissingYogaInput(str(l4) + '.D1.sign') + if not ctx.is_exalted(l4): + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + occupants = [p for p in benefics if ctx.house_of(p) == 4] + witnesses['raman196_geometry'] = list(dict.fromkeys([l4, 'Moon', *occupants])) + return bool(occupants) + + def definition197(): + sign = ctx.d9_sign_of(l4) + if sign not in SIGNS: + raise MissingYogaInput(str(l4) + '.D9.sign') + # Dispositor of the fourth LORD's D9 placement, not D9 fourth lord. + dispositor = SIGN_LORDS[sign] + self._required_pattern_houses(ctx, [dispositor, 'Moon']) + h, moon = ctx.house_of(dispositor), ctx.house_of('Moon') + witnesses['raman197_geometry'] = list(dict.fromkeys([l4, dispositor, 'Moon'])) + return h in (1, 4, 7, 10) and (h - moon) % 12 + 1 in (1, 4, 7, 10) + + for name, evaluate in [('raman196_geometry', definition196), ('raman197_geometry', definition197)]: + try: + geometry = evaluate() + states[name] = {'status': 'incomplete' if geometry else 'not_met', 'geometry_met': geometry} + if geometry: + states[name]['missing_input'] = ('Moon.source_admitted_composite_strength_profile' + if name == 'raman196_geometry' else 'Fourth_lord_navamsa_dispositor.source_admitted_composite_strength_profile') + except MissingYogaInput as exc: + states[name] = {'status': 'incomplete', 'geometry_met': None, 'missing_input': str(exc)} + missing = [s['missing_input'] for s in states.values() if s['status'] == 'incomplete'] + if not missing: + return [] + paths = [name for name, state in states.items() if state['geometry_met'] is True] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for name in paths for p in witnesses[name]))}, + 'condition_status': 'incomplete_conditions', 'condition_checks': states, 'missing_inputs': missing, + 'formation_evidence': {'matched_geometry_paths': paths, 'matched_paths': [], + 'independent_support_count': 0, 'unresolved_other_paths': missing, + 'implementation_scope': 'geometry_only_strength_unresolved'}, + 'effect_assessment': {'status': 'historical_medical_reference', 'personal_outcome_established': False, + 'summary_zh': '两项传统位置路径分别保留,相关行星综合有力及整体制约尚未完成判定;不能据此判断母亲寿命或健康。', + 'summary_en': 'Retain the two positional paths separately; their strength and whole-chart qualifications remain unresolved. No maternal lifespan or health outcome is established.'}}] + + def _eval_raja_bhanga_raman(self, cond, ctx, rule, bindings): + """298/299 named structural screens, never a blanket Raja cancellation.""" + states, witnesses = {}, {} + + def saturn_base(): + if ctx.ascendant != 'Leo': + return False + if ctx.sign_of('Saturn') not in SIGNS: + raise MissingYogaInput('Saturn.D1.sign') + return ctx.sign_of('Saturn') == 'Libra' + + def navamsa(): + if not saturn_base(): + return False + if ctx.d9_sign_of('Saturn') not in SIGNS: + raise MissingYogaInput('Saturn.D9.sign') + witnesses['raman298_debilitated_navamsa'] = ['Saturn'] + return ctx.d9_sign_of('Saturn') == 'Aries' + + def benefic_aspect(): + if not saturn_base(): + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + actual = [p for p in benefics if ctx.parashari_aspect(p, 'Saturn')] + witnesses['raman298_definition_benefic_aspect'] = ['Saturn', *actual] + return bool(actual) + + def deep_sun(): + if ctx.sign_of('Sun') not in SIGNS: + raise MissingYogaInput('Sun.D1.sign') + if ctx.sign_of('Sun') != 'Libra': + return False + # Source299's deep-debilitation point, not an invented degree-wide orb. + degree = ctx.source_degree_in_sign('Sun') + witnesses['raman299_exact_debilitation'] = ['Sun'] + return abs(degree - 10.0) <= 1e-9 + + for name, evaluate in [('raman298_debilitated_navamsa', navamsa), + ('raman298_definition_benefic_aspect', benefic_aspect), + ('raman299_exact_debilitation', deep_sun)]: + try: + states[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + states[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, state in states.items() if state['status'] == 'met'] + missing = [s['missing_input'] for s in states.values() if s['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': states, 'missing_inputs': [] if met else missing, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'independent_support_count': int(bool(met)), + 'source_difference': '298 definition includes benefic-aspect alternative; remarks explain the debilitated-Navamsa path only.', + 'sun_point_tolerance_degrees': 1e-9, + 'raja_yogas_cancelled': False}, + 'effect_assessment': {'status': 'incomplete', + 'personal_outcome_established': False, + 'summary_zh': '保留两条传统位置筛查及各自路径,不自动取消其他吉格;作者明确指出太阳落陷本身不足以否定所有王者格局。实际表现仍需综合支持与制约。', + 'summary_en': 'Retain the two source-specific positional screens without cancelling other Yogas. The author explicitly rejects solar debility alone as enough to destroy every Raja Yoga; expression needs the whole support and constraint assessment.'}}] + + def _eval_aputra_raman(self, cond, ctx, rule, bindings): + """224: fifth lord in6/8/12; the author's qualification is essential. + + The legacy104 identifier is retained for callers, not as a book number. + Neither this screen nor the author's example establishes fertility. + """ + lord = ctx.lord_of_house(5) + self._required_pattern_houses(ctx, [lord]) + house = ctx.house_of(lord) + if house not in (6, 8, 12): + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': [lord]}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'fifth_lord_in_dusthana': { + 'status': 'met', 'planet': lord, 'house': house}}, + 'formation_evidence': {'matched_paths': ['raman224_definition'], + 'independent_support_count': 1, + 'source_qualification': 'Examine the entire fifth house and its strength; do not apply this general combination literally.'}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'summary_zh': '第五宫主位于第六、八或十二宫,命中传统的一项概括性结构;原作者要求结合第五宫整体强弱,不能单凭它判断是否有子女、生育能力或子女数量。', + 'summary_en': 'The fifth lord occupies6/8/12, meeting a general traditional screen. The author requires the whole fifth-house assessment; this alone does not establish parenthood, fertility or number of children.'}}] + + def _eval_durmarana_geometry_raman(self, cond, ctx, rule, bindings): + """Raman274 definition only; geometry is not a mortality prediction.""" + lord = ctx.lord_of_house(1) + self._required_pattern_houses(ctx, ['Moon', lord]) + moon_house = ctx.house_of('Moon') + if moon_house not in (6, 8, 12) or not ctx.parashari_aspect(lord, 'Moon'): + return [] + companions, missing = [], [] + for planet in ('Saturn', 'Rahu'): + house = ctx.house_of(planet) + if house is None: + missing.append(planet + '.D1.house') + elif house == moon_house: + companions.append(planet) + mandi = ctx.upagraha_house('maandi') + if mandi is None: + missing.append('maandi.D1.house') + elif mandi == moon_house: + companions.append('Maandi') + if not companions and not missing: + return [] + met = bool(companions) + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(['Moon', lord, *companions]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': {'companion': {'status': 'met' if met else 'incomplete'}}, + 'missing_inputs': [] if met else missing, + 'formation_evidence': {'matched_paths': ['definition'] if met else [], + 'unresolved_other_paths': missing, 'independent_support_count': int(met)}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'summary_zh': '命中传统结构不等于现实危险,不能据此判断死亡方式、寿命或个人健康结果。', + 'summary_en': 'This historical configuration does not establish danger, manner of death, lifespan or a personal health outcome.'}}] + + def _eval_pisacha_raman(self, cond, ctx, rule, bindings): + """287: separate definition and author's Saturn-contact remarks.""" + self._required_pattern_houses(ctx, ['Moon', 'Rahu']) + if ctx.house_of('Moon') != ctx.house_of('Rahu'): + return [] + witnesses, states = {}, {} + def definition(): + if ctx.house_of('Moon') != 1: + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + # The conjunction in Lagna must not satisfy its own extra trine test. + occupants = {h: [p for p in ALL_PLANETS if p not in benefics and + p not in ('Moon', 'Rahu') and ctx.house_of(p) == h] + for h in (5, 9)} + witnesses['definition_both_non_lagna_trines'] = ['Moon', 'Rahu', + *(p for items in occupants.values() for p in items)] + return all(occupants.values()) + def remarks(): + self._required_pattern_houses(ctx, ['Saturn']) + witnesses['remarks_saturn_contact'] = ['Moon', 'Rahu', 'Saturn'] + return (ctx.house_of('Saturn') == ctx.house_of('Moon') or + ctx.parashari_aspect('Saturn', 'Moon')) + for name, evaluate in [('definition_both_non_lagna_trines', definition), + ('remarks_saturn_contact', remarks)]: + try: + states[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + states[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, state in states.items() if state['status'] == 'met'] + missing = [state['missing_input'] for state in states.values() if state['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'condition_checks': states, 'missing_inputs': [] if met else missing, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'classification_profile': 'Definition: native natural-malefic classification in both5/9, excluding Moon/Rahu already in Lagna. Remarks: Moon/Rahu with Saturn or receiving Saturn aspect, not restricted to Lagna.', + 'independent_support_count': int(bool(met))}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'summary_zh': '仅保留具名传统结构,不能据此认定附灵、心理疾病、非理性行为或个人健康结果。', + 'summary_en': 'Named historical configuration only; it does not establish spirit possession, mental illness, irrational behavior or a personal health outcome.'}}] + + def _eval_family_geometry_raman(self, cond, ctx, rule, bindings): + """281/283 geometry only; the author's outcomes are not personal facts.""" + profile = cond['profile'] + required = ['Moon'] if profile == 'putrakalatraheena_281' else ['Moon', 'Venus'] + self._required_pattern_houses(ctx, required) + if profile == 'putrakalatraheena_281': + if ctx.house_of('Moon') != 5: + return [] + waning = ctx.panchanga.get('is_waning_moon') + if not isinstance(waning, bool): + raise MissingYogaInput('Moon.phase') + if not waning: + return [] + # The remarks explicitly illustrate Sun/Mars/Saturn, not node substitutes. + self._required_pattern_houses(ctx, ['Sun', 'Mars', 'Saturn']) + if {ctx.house_of(p) for p in ('Sun', 'Mars', 'Saturn')} != {1, 7, 12}: + return [] + path = 'remarks_classical_three_malefics' + participants = ['Moon', 'Sun', 'Mars', 'Saturn'] + convention = 'Sun/Mars/Saturn occupy distinct houses1/7/12; named remarks profile, not every interpretation of malefics' + elif profile == 'vamsacheda_283': + if ctx.house_of('Venus') != 7 or ctx.house_of('Moon') not in (7, 10): + return [] + benefics = self._natural_benefics_for_named_pattern(ctx) + houses = [4] if ctx.house_of('Moon') == 10 else [4, 10] + occupants = {h: [p for p in ALL_PLANETS if p not in benefics and ctx.house_of(p) == h] + for h in houses} + if not all(occupants.values()): + return [] + path = 'definition' if houses == [4] else 'author_alternative' + participants = ['Moon', 'Venus', *(p for ps in occupants.values() for p in ps)] + convention = 'At least one natural malefic in each required house; native Moon/Mercury classification' + else: + raise UnsupportedYogaCondition(['family_geometry_raman.' + str(profile)]) + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(participants))}, + 'condition_status': 'conditions_met', + 'missing_inputs': [], 'condition_checks': {path: {'status': 'met'}}, + 'formation_evidence': {'matched_paths': [path], 'classification_profile': convention, + 'independent_support_count': 1}, + 'effect_assessment': {'status': 'historical_conduct_reference', + 'personal_outcome_established': False, + 'summary_zh': '仅核实传统位置组合;不能据此断定无婚姻、无子女、后代性别或家系终止。', + 'summary_en': 'Only the traditional geometry is established; it does not establish marriage, fertility, descendants or family extinction.'}}] + + def _eval_dattaputra_raman(self, cond, ctx, rule, bindings): + """Raman222/223: preserve alternative identity and missing inputs.""" + l1, l5, l7 = [ctx.lord_of_house(h) for h in (1, 5, 7)] + witnesses = {} + + def rule222(): + self._required_pattern_houses(ctx, ['Mars', 'Saturn']) + if ctx.house_of('Mars') != 5 or ctx.house_of('Saturn') != 5: + return False + sign = ctx.sign_of(l1) + if sign not in SIGNS: + raise MissingYogaInput(l1 + '.sign') + if sign not in ('Gemini', 'Virgo'): + return False + if l1 == 'Mercury': + raise MissingYogaInput('Raman222_Mercury_self_association_source_choice') + self._required_pattern_houses(ctx, [l1, 'Mercury']) + witnesses['raman222'] = ['Mars', 'Saturn', l1, 'Mercury'] + return (ctx.house_of(l1) == ctx.house_of('Mercury') + or ctx.parashari_aspect('Mercury', l1)) + + def rule223(): + self._required_pattern_houses(ctx, [l7, 'Mars', 'Saturn']) + occupants = [p for p in ('Mars', 'Saturn') if ctx.house_of(p) == 5] + if ctx.house_of(l7) != 11 or not occupants: + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + companions = [p for p in benefics if p != l5 and ctx.house_of(p) == ctx.house_of(l5)] + witnesses['raman223'] = [l7, l5, *occupants, *companions] + return bool(companions) + + branches = {} + for name, evaluate in [('raman222', rule222), ('raman223', rule223)]: + try: + branches[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + branches[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, value in branches.items() if value['status'] == 'met'] + missing = [v['missing_input'] for v in branches.values() if v['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': 'Dattaputra:分别核对第222、223条;不据格局认定生育或收养事实', + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'missing_inputs': [] if met else missing, 'condition_checks': branches, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'path_participants': {name: list(dict.fromkeys(witnesses[name])) for name in met}, + 'independent_support_count': 1 if met else 0, + 'boundary': 'Named traditional alternatives, not fertility, adoption or child-history facts.'}}] + + def _eval_dhatrutwa_raman(self, cond, ctx, rule, bindings): + """No243 definition and two explicitly named alternatives, not votes.""" + l1, l9, l10, l12 = [ctx.lord_of_house(h) for h in (1, 9, 10, 12)] + witnesses = {} + + def definition(): + if ctx.sign_of(l9) not in SIGNS: + raise MissingYogaInput(l9 + '.sign') + if not ctx.is_exalted(l9): + return False + benefics = self._natural_benefics_for_named_pattern(ctx) + aspecting = [p for p in benefics if ctx.parashari_aspect(p, l9)] + occupying = [p for p in benefics if ctx.house_of(p) == 9] + witnesses['definition'] = [l9, *aspecting, *occupying] + return bool(aspecting and occupying) + + def alternative_a(): + self._required_pattern_houses(ctx, [l9]) + if ctx.house_of(l9) not in (1, 4, 7, 10): + return False + if ctx.parashari_aspects_house(l9, 1): + witnesses['alternative_a'] = [l9] + return True + self._required_pattern_houses(ctx, [l1]) + witnesses['alternative_a'] = [l9, l1] + return ctx.parashari_aspect(l9, l1) + + def alternative_b(): + self._required_pattern_houses(ctx, [l9]) + if ctx.house_of(l9) != 4: + return False + self._required_pattern_houses(ctx, [l10]) + if ctx.house_of(l10) not in (1, 4, 7, 10): + return False + self._required_pattern_houses(ctx, [l12, 'Jupiter']) + witnesses['alternative_b'] = [l9, l10, l12, 'Jupiter'] + return ctx.parashari_aspect('Jupiter', l12) + + branches = {} + for name, evaluate in [('definition', definition), ('alternative_a', alternative_a), + ('alternative_b', alternative_b)]: + try: + branches[name] = {'status': 'met' if evaluate() else 'not_met'} + except MissingYogaInput as exc: + branches[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, value in branches.items() if value['status'] == 'met'] + missing = [v['missing_input'] for v in branches.values() if v['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': 'Dhatrutwa:按定义及两条具名替代路径分别核对', + 'bindings': {'_participants': list(dict.fromkeys(p for name in met for p in witnesses[name]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'missing_inputs': [] if met else missing, + 'condition_checks': branches, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'path_participants': {name: list(dict.fromkeys(witnesses[name])) for name in met}, + 'independent_support_count': 1 if met else 0, + 'boundary': 'Alternative source definitions, not independent votes. No observed generosity, wealth or spiritual authority is established.'}}] + + def _eval_reviewed_raman_geometry(self, cond, ctx, rule, bindings): + """Source-located definitions, with explicit one-based relative houses. + + Detect geometry only. Source outcomes and later qualifications remain + traditional references, never observed life facts. + """ + profile = cond.get('profile') + extra = {} + if profile == 'vatharoga_290': + participants = ['Jupiter', 'Saturn'] + houses = self._required_pattern_houses(ctx, participants) + checks = {'jupiter_first': houses['Jupiter'] == 1, + 'saturn_seventh': houses['Saturn'] == 7} + extra['formation_evidence'] = {'source_definition': 'Raman290', + 'unlocated_legacy_mars_moon_branch_used': False} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'boundary': 'Named source geometry only; no disease risk or diagnosis. The author also notes possible Raja Yoga, not a uniformly adverse overall chart.'} + elif profile == 'pittharoga_279': + self._required_pattern_houses(ctx, ['Sun']) + if ctx.house_of('Sun') != 6: + return [] + benefics = self._natural_benefics_for_named_pattern(ctx) + malefics = [p for p in ALL_PLANETS if p not in benefics and p != 'Sun'] + conjoined = [p for p in malefics if ctx.house_of(p) == 6] + aspecting = [p for p in malefics if ctx.parashari_aspects_house(p, 6)] + pairs = [(a, b) for a in conjoined for b in aspecting if a != b] + participants = list(dict.fromkeys(['Sun', *[p for pair in pairs for p in pair]])) + checks = {'sun_sixth': True, 'distinct_conjunction_and_aspect_witnesses': bool(pairs)} + extra['formation_evidence'] = {'witness_pairs': pairs, + 'aspect_profile': 'classical_planetary_aspects_no_node_aspects'} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'boundary': 'Source geometry includes two distinct malefics; no diagnosis or medical risk is inferred.'} + elif profile == 'kushtaroga_268_269': + groups = {'raman268': list(dict.fromkeys([ctx.lord_of_house(1), 'Mars', 'Mercury'])), + 'raman269': ['Jupiter', 'Saturn', 'Moon']} + states = {} + for name, planets in groups.items(): + try: + houses = self._required_pattern_houses(ctx, planets) + occupied = set(houses.values()) + matched = (len(occupied) == 1 and next(iter(occupied)) in (4, 12) + if name == 'raman268' else occupied == {6}) + states[name] = {'status': 'met' if matched else 'not_met'} + except MissingYogaInput as exc: + states[name] = {'status': 'incomplete', 'missing_input': str(exc)} + met = [name for name, state in states.items() if state['status'] == 'met'] + missing = [v['missing_input'] for v in states.values() if v['status'] == 'incomplete'] + if not met and not missing: + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': list(dict.fromkeys(p for n in met for p in groups[n]))}, + 'condition_status': 'conditions_met' if met else 'incomplete_conditions', + 'missing_inputs': [] if met else missing, 'condition_checks': states, + 'formation_evidence': {'matched_paths': met, 'unresolved_other_paths': missing, + 'unvalidated_age_19_22_claim_used': False}, + 'effect_assessment': {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'boundary': 'Two historical geometries only; no diagnosis, age prediction or disease causation is established.'}}] + elif profile == 'vrana_265': + lord = ctx.lord_of_house(6) + # Author's explicit five-ascendant list uses Sun/Mars/Saturn, + # not a blanket classification of every sixth lord as harmful. + if lord not in ('Sun', 'Mars', 'Saturn'): + return [] + self._required_pattern_houses(ctx, [lord]) + participants = [lord] + checks = {'malefic_sixth_lord_in_1_8_10': ctx.house_of(lord) in (1, 8, 10)} + qualifiers_missing = [] + try: + benefics = self._natural_benefics_for_named_pattern(ctx) + relieving = [p for p in benefics if ctx.parashari_aspect(p, lord)] + except MissingYogaInput as exc: + relieving = None + qualifiers_missing = exc.fields + extra['formation_evidence'] = {'literal_definition_geometry': True, + 'author_suggested_scorpio_exception': ctx.ascendant == 'Scorpio', + 'benefic_aspect_witnesses': relieving, + 'benefic_classification': 'waxing_moon_unafflicted_mercury'} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'missing_inputs': qualifiers_missing, + 'personal_outcome_established': False, + 'boundary': 'Source explicitly cautions against literal outcomes and suggests excluding Scorpio; geometry is not cancer, organ disease or medical risk evidence.'} + elif profile == 'matru_satrutwa_207': + if ctx.lord_of_house(1) != 'Mercury' or ctx.lord_of_house(4) != 'Mercury': + return [] + benefics = self._natural_benefics_for_named_pattern(ctx) + affecting = [p for p in ALL_PLANETS if p != 'Mercury' and p not in benefics + and (ctx.house_of(p) == ctx.house_of('Mercury') + or ctx.parashari_aspect(p, 'Mercury'))] + participants = ['Mercury', *affecting] + checks = {'mercury_rules_first_and_fourth': True, + 'distinct_malefic_conjoins_or_aspects': bool(affecting)} + extra['formation_evidence'] = {'reference': 'D1 Gemini ascendant only', + 'benefic_classification': 'waxing_moon_unafflicted_mercury', + 'aspect_profile': 'classical_planetary_aspects_no_node_aspects', + 'two_person_navamsa_observation_used_as_rule': False, + 'boundary': 'Traditional relationship theme only; no hatred or actual family history is established.'} + elif profile == 'khalwata_295': + if ctx.ascendant not in ('Aries', 'Leo', 'Scorpio', 'Capricorn', 'Aquarius', 'Sagittarius', 'Taurus'): + return [] + benefics = self._natural_benefics_for_named_pattern(ctx) + participants = [p for p in ALL_PLANETS if p not in benefics + and ctx.parashari_aspects_house(p, 1)] + checks = {'listed_ascendant': True, 'malefic_aspects_ascendant': bool(participants)} + extra['formation_evidence'] = {'benefic_classification': 'waxing_moon_unafflicted_mercury', + 'aspect_profile': 'classical_planetary_aspects_no_node_aspects', + 'leo_included': True} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'personal_outcome_established': False, + 'boundary': 'Raman295 explicitly includes Leo and requires aspect in every branch; author does not establish type or timing of baldness.'} + elif profile == 'bharyasahavyabhichara_282': + participants = ['Venus', 'Saturn', 'Mars', 'Moon'] + houses = self._required_pattern_houses(ctx, participants) + checks = {p + '_in_seventh': houses[p] == 7 for p in participants} + extra['formation_evidence'] = {'source_definition': 'Raman282', + 'author_nonmatching_anecdote_used_as_condition': False} + extra['effect_assessment'] = {'status': 'historical_conduct_reference', + 'personal_outcome_established': False, + 'boundary': 'The author explicitly distinguishes the later anecdote from combination282. Neither geometry nor anecdote establishes personal conduct.'} + elif profile == 'rajabhrashta_297_unadjusted': + # BUG-2301: her scripts/jaimini.py calc_arudha_sign (upstream 58f37ee5b); this repo's + # jaimini.py is sealed and has no such function, so her code is copied below. + calc_arudha_sign = _upstream_calc_arudha_sign + asc = SIGNS.index(ctx.ascendant) + pads = {} + for house in (1, 12): + lord = ctx.lord_of_house(house) + sign = ctx.sign_of(lord) + if sign not in SIGNS: + raise MissingYogaInput(lord + '.D1_sign') + pads[house] = calc_arudha_sign((asc + house - 1) % 12, SIGNS.index(sign)) + participants = [SIGN_LORDS[pads[h]['unadjusted_sign']] for h in (1, 12)] + if participants[0] == participants[1]: + raise MissingYogaInput('distinct_arudha_lord_conjunction_source_rule') + houses = self._required_pattern_houses(ctx, participants) + checks = {'unadjusted_arudha_lords_conjoined': len(set(houses.values())) == 1} + extra['formation_evidence'] = {'arudha_profile': 'raman297_literal_unadjusted_count', + 'arudha_lagna': pads[1], 'arudha_twelfth': pads[12], + 'pvr_exception_changes_coordinates': any(p['exception_triggered'] for p in pads.values()), + 'boundary': 'Uses the literal count in Raman297; adjusted PVR coordinates are retained separately, not silently substituted. Same-lord self-conjunction is unresolved.'} + elif profile == 'angaheena_285': + participants = ['Sun', 'Moon', 'Mars', 'Saturn'] + houses = self._required_pattern_houses(ctx, participants) + checks = {p + '_from_sun': (houses[p] - houses['Sun']) % 12 + 1 == h + for p, h in [('Moon', 10), ('Mars', 7), ('Saturn', 2)]} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'personal_outcome_established': False, 'boundary': 'Historical named geometry only; not a diagnosis, disability forecast or injury timing rule.'} + elif profile == 'swetakushta_286': + participants = ['Mars', 'Saturn', 'Moon', 'Sun'] + houses = self._required_pattern_houses(ctx, participants) + checks = {p + '_house': houses[p] == h for p, h in + [('Mars', 2), ('Saturn', 12), ('Moon', 1), ('Sun', 7)]} + jupiter = ctx.house_of('Jupiter') + if jupiter is not None: + self._required_pattern_houses(ctx, ['Jupiter']) + extra['formation_evidence'] = {'jupiter_aspects_mars_or_saturn': None if jupiter is None else + any(ctx.parashari_aspect('Jupiter', p) for p in ('Mars', 'Saturn'))} + extra['effect_assessment'] = {'status': 'historical_medical_reference', + 'missing_inputs': ['Jupiter.house'] if jupiter is None else [], + 'personal_outcome_established': False, + 'boundary': 'Author separately qualifies the outcome and mentions Jupiter; not a medical risk estimate or treatment prediction.'} + elif profile == 'labha_malika_42': + participants = ['Sun', 'Moon', 'Mars', 'Mercury', 'Jupiter', 'Venus', 'Saturn'] + houses = self._required_pattern_houses(ctx, participants) + checks = {'seven_classical_planets_in_seven_consecutive_houses_from_11': + set(houses.values()) == {11, 12, 1, 2, 3, 4, 5}} + elif profile == 'garuda_66': + day = ctx.context.get('birth_is_daytime') + waning = ctx.panchanga.get('is_waning_moon') + if day is False or waning is True: + return [] + if type(day) is not bool or type(waning) is not bool: + raise MissingYogaInput('birth_is_daytime and Moon.phase') + dispositor = ctx.navamsa_dispositor('Moon') + if not dispositor: + raise MissingYogaInput('Moon.D9_sign') + if ctx.sign_of(dispositor) is None: + raise MissingYogaInput(dispositor + '.D1_sign') + participants = list(dict.fromkeys(['Moon', dispositor])) + checks = {'daytime_waxing_moon': True, 'moon_navamsa_dispositor_exalted_in_d1': ctx.is_exalted(dispositor)} + elif profile == 'chandika_57': + if ctx.ascendant not in ('Taurus', 'Leo', 'Scorpio', 'Aquarius'): + return [] + sixth, ninth = ctx.lord_of_house(6), ctx.lord_of_house(9) + self._required_pattern_houses(ctx, [sixth]) + if not ctx.parashari_aspects_house(sixth, 1): + return [] + dispos = [ctx.navamsa_dispositor(p) for p in (sixth, ninth)] + if not all(dispos): + raise MissingYogaInput('sixth_and_ninth_lords.D9_sign') + participants = list(dict.fromkeys(['Sun', sixth, ninth] + dispos)) + houses = self._required_pattern_houses(ctx, ['Sun'] + dispos) + checks = {'fixed_lagna_receives_sixth_lord_aspect': True, + 'both_d9_dispositors_join_sun_in_d1': all(h == houses['Sun'] for h in houses.values())} + elif profile == 'ayatnadhanalabha_143': + first, second = ctx.lord_of_house(1), ctx.lord_of_house(2) + participants = list(dict.fromkeys([first, second])) + houses = self._required_pattern_houses(ctx, participants) + checks = {'first_lord_in_second': houses[first] == 2, + 'second_lord_in_first': houses[second] == 1, + 'distinct_lords': first != second} + elif profile == 'jara_236': + participants = list(dict.fromkeys(ctx.lord_of_house(h) for h in (10, 2, 7))) + houses = self._required_pattern_houses(ctx, participants) + checks = {'all_three_lord_roles_in_tenth': all(h == 10 for h in houses.values())} + elif profile == 'mooka_163': + participants = list(dict.fromkeys([ctx.lord_of_house(2), 'Jupiter'])) + houses = self._required_pattern_houses(ctx, participants) + if any(h != 8 for h in houses.values()): + return [] + if ctx.sign_of('Jupiter') is None: + raise MissingYogaInput('Jupiter.sign') + checks = {'second_lord_and_jupiter_in_eighth': True, + 'own_or_exalted_jupiter_exception_absent': not (ctx.is_own_sign('Jupiter') or ctx.is_exalted('Jupiter'))} + elif profile == 'duryoga_103': + participants = [ctx.lord_of_house(10)] + houses = self._required_pattern_houses(ctx, participants) + checks = {'tenth_lord_in_6_8_12': houses[participants[0]] in (6, 8, 12)} + elif profile == 'sarpaganda_174': + participants = ['Rahu'] + houses = self._required_pattern_houses(ctx, participants) + if houses['Rahu'] != 2: + return [] + mandi = ctx.upagraha_house('maandi') + if type(mandi) is not int or not 1 <= mandi <= 12: + raise MissingYogaInput('upagraha.maandi.house') + checks = {'rahu_second': True, 'maandi_second': mandi == 2} + elif profile == 'ekabhagini_179': + lord = ctx.lord_of_house(3) + participants = list(dict.fromkeys(['Mercury', lord, 'Moon', 'Mars', 'Saturn'])) + houses = self._required_pattern_houses(ctx, participants) + checks = {'mercury_third': houses['Mercury'] == 3, + 'third_lord_with_moon': houses[lord] == houses['Moon'], + 'mars_with_saturn': houses['Mars'] == houses['Saturn']} + elif profile == 'vichitra_188': + # Raman explicitly allows role overlap (e.g. L4 is Mars/Saturn). + participants = list(dict.fromkeys([ctx.lord_of_house(4), ctx.lord_of_house(10), 'Saturn', 'Mars'])) + houses = self._required_pattern_houses(ctx, participants) + checks = {'all_required_roles_conjoined': len(set(houses.values())) == 1} + elif profile == 'marud_160': + participants = ['Jupiter', 'Venus', 'Moon', 'Sun'] + houses = self._required_pattern_houses(ctx, participants) + relative = lambda target, origin: (houses[target] - houses[origin]) % 12 + 1 + checks = {'jupiter_5_or_9_from_venus': relative('Jupiter', 'Venus') in (5, 9), + 'moon_5_from_jupiter': relative('Moon', 'Jupiter') == 5, + 'sun_angular_from_moon': relative('Sun', 'Moon') in (1, 4, 7, 10)} + else: + raise UnsupportedYogaCondition(['reviewed_raman_geometry.' + str(profile)]) + if not all(checks.values()): + return [] + return [{'combination': cond['description_zh'], + 'bindings': {'_participants': participants}, + 'condition_status': 'conditions_met', 'missing_inputs': [], + 'condition_checks': {'profile': profile, **checks}, **extra}] + + def _eval_mridanga_navamsa_chain(self, cond, ctx, rule, bindings): + """Raman's dispositor chain, without replacing 'powerful' by a house proxy. + + The existing strength layer does not establish comprehensive Lagna-lord + strength. Keep that requirement explicitly open, including when exalted. + """ + matches = [] + lagna_lord = ctx.lord_of_house(1) + for planet in EXALTATION: + if not ctx.is_exalted(planet): + continue + missing = ['Lagna_lord_comprehensive_strength'] + sign = ctx.d9_sign_of(planet) + dispositor = SIGN_LORDS.get(sign) + if not dispositor: + missing.append(f'{planet}.D9.sign') + elif ctx.sign_of(dispositor) not in SIGNS or ctx.house_of(dispositor) is None: + missing.append(f'{dispositor}.D1.position') + else: + dignity_ok = (ctx.is_exalted(dispositor) or ctx.is_own_sign(dispositor) + or SIGN_LORDS[ctx.sign_of(dispositor)] in FRIENDLY_PLANETS[dispositor]) + if ctx.house_of(dispositor) not in (1, 4, 7, 10) or not dignity_ok: + continue + participants = [p for p in (planet, dispositor, lagna_lord) if p in ctx.planets] + matches.append({ + 'combination': f'{planet} exalted; D9 {sign or "unknown"}; dispositor {dispositor or "unknown"}; Lagna lord {lagna_lord}', + 'condition_status': 'incomplete_conditions', + 'missing_inputs': missing, + 'condition_checks': {'exalted_planet': planet, 'navamsa_sign': sign, + 'navamsa_dispositor': dispositor, 'lagna_lord_strength': None}, + 'formation_evidence': {'exalted_planet': planet, 'navamsa_sign': sign, + 'navamsa_dispositor': dispositor, + 'dispositor_d1_house': ctx.house_of(dispositor), + 'dispositor_d1_sign': ctx.sign_of(dispositor), + 'lagna_lord': lagna_lord}, + 'bindings': {'planets': participants}, + }) + return matches + + @staticmethod + def _eval_neecha_bhanga(cond, ctx, rule, bindings): + """Light on Life p.295: four cancellation tests, then a separate Raja gate. + + Exchange is retained as an explicitly separate traditional variant. + A missing position never supplies a positive witness. + """ + results = [] + for planet, deb_sign in DEBILITATION.items(): + if ctx.sign_of(planet) != deb_sign: + continue + dispositor = SIGN_LORDS[deb_sign] + exaltation_lord = SIGN_LORDS[EXALTATION[planet]] + exalted_here = next((p for p, sign in EXALTATION.items() if sign == deb_sign), None) + reasons = [] + if cond.get('variant') == 'exchange': + if dispositor != planet and SIGN_LORDS.get(ctx.sign_of(dispositor)) == planet: + reasons.append({'condition': 'dispositor_exchange', 'planet': dispositor}) + else: + for label, other in (('dispositor', dispositor), + ('exaltation_sign_lord', exaltation_lord), + ('planet_exalted_in_debility_sign', exalted_here)): + if other not in ctx.planets: + continue + if ctx.house_of(other) in (1, 4, 7, 10): + reasons.append({'condition': label + '_kendra_from_lagna', 'planet': other}) + moon_sign, other_sign = ctx.sign_of('Moon'), ctx.sign_of(other) + if moon_sign in SIGNS and other_sign in SIGNS: + relative = (SIGNS.index(other_sign) - SIGNS.index(moon_sign)) % 12 + 1 + if relative in (1, 4, 7, 10): + witness = {'condition': label + '_kendra_from_moon', 'planet': other, + 'reference': 'Moon', 'relative_house': relative, + 'self_reference': other == 'Moon'} + if other == 'Moon': + # Preserve the literal source branch, but it cannot + # corroborate itself or add an independent vote. + witness['independent_confirmation_allowed'] = False + reasons.append(witness) + other_sign = ctx.sign_of(dispositor) + if other_sign in SIGNS: + distance = (SIGNS.index(deb_sign) - SIGNS.index(other_sign)) % 12 + 1 + aspects = {'Mars': (4, 7, 8), 'Jupiter': (5, 7, 9), 'Saturn': (3, 7, 10)} + if distance in aspects.get(dispositor, (7,)): + reasons.append({'condition': 'dispositor_aspect', 'planet': dispositor}) + royal = bool(reasons) and ctx.house_of(planet) in (1, 4, 5, 7, 9, 10) + if not reasons or (cond.get('require_royal_placement') and not royal): + continue + participants = list(dict.fromkeys([planet] + [r['planet'] for r in reasons])) + detail = '; '.join(f'{p}: {ctx.sign_of(p)}, H{ctx.house_of(p) or "?"}' for p in participants) + results.append({ + 'combination': f'{planet} debilitated in {deb_sign}; ' + + '; '.join(r['condition'] + '=' + r['planet'] for r in reasons) + '; ' + detail, + 'strength': 'conditional', 'bindings': {'planets': participants}, + 'formation_evidence': { + 'planet': planet, 'cancellation_reasons': reasons, + 'self_reference_only': all(r.get('self_reference', False) for r in reasons), + 'royal_yoga_candidate': royal, + 'profile': 'exchange_variant' if cond.get('variant') == 'exchange' else 'light_on_life_p295', + 'claim_boundary': 'Cancellation is not exaltation; a Raja candidate is not a guaranteed result.', + }, + }) + return results + def _eval_lagna_lord_chain_dispositor_in_kendra_trine_or_exaltation(self, cond, ctx, rule, bindings): """Raman combination47, pp70–71: alternatives, not PVR's all-four test. @@ -2800,12 +4414,16 @@ class YogaEngine: # 产品 2026-11-07 同步占星师 Yoga 规则批次(上游 733a931b): a rule # may name its matching witnesses with `participants_expr` # (never every planet the failed branches queried). + witnesses = None if not (isinstance(participants, (list, tuple)) and participants) and cond.get("participants_expr"): - participants = [p for p in _flatten_planets( - _run_custom_expr(cond["participants_expr"], exec_globals), ctx)] + witnesses = _run_custom_expr(cond["participants_expr"], exec_globals) + participants = [p for p in _flatten_planets(witnesses, ctx)] if not (isinstance(participants, (list, tuple)) and participants): participants = _static_custom_participants(expr, ctx) extra = {"participants": list(participants)} if participants else {} + # BUG-2301 (upstream 58f37ee5b): her `bindings.planets` is the participants_expr value as returned. + if witnesses is not None: + extra["bindings"] = {"planets": list(witnesses) if isinstance(witnesses, (list, tuple)) else [witnesses]} triggers = exec_globals.get("triggers") if isinstance(triggers, list) and triggers: pairs = [(item[0], item[1]) if isinstance(item, (list, tuple)) and len(item) == 2 else (item, item) for item in triggers] @@ -3174,9 +4792,11 @@ class YogaEngine: def _eval_semantic_condition(self, ctype, cond, ctx, rule, bindings): """兼容批量抽取规则中的语义型条件。返回保守布尔匹配。""" - def success(combo=None): + def success(combo=None, planets=()): + # BUG-2301 (upstream 58f37ee5b): the bound planets are recorded; the Chinese text stays ours. text = combo or _semantic_text(cond, ctype) - return [{"combination": text, "strength": rule.get("strength", "中")}] + return [{"combination": text, "strength": rule.get("strength", "中"), + "bindings": {"planets": list(planets)}}] def house(ref): if isinstance(ref, int): @@ -3252,7 +4872,7 @@ class YogaEngine: ps = planet_list(['Sun', 'Moon', 'Mars', 'Mercury', 'Jupiter', 'Venus', 'Saturn']) n = cond.get("n") # Upstream e628118d: every listed planet must be placed. - return success() if n and ps and all(p in ctx.planets and ctx.sign_of(p) for p in ps) and len({ctx.sign_of(p) for p in ps}) == n else [] + return success(planets=ps) if n and ps and all(p in ctx.planets and ctx.sign_of(p) for p in ps) and len({ctx.sign_of(p) for p in ps}) == n else [] if ctype == "planets_in_kendras": ps = planet_list() return success() if ps and all(ctx.is_kendra(ctx.house_of(p)) for p in ps) else [] @@ -3263,7 +4883,8 @@ class YogaEngine: ps = [p for p in MALEFICS if p in ctx.planets] return success() if any(ctx.is_kendra(ctx.house_of(p)) for p in ps) and any(ctx.is_trikona(ctx.house_of(p)) for p in ps) else [] if ctype == "malefics_in_lagna": - return success() if any(ctx.house_of(p) == 1 for p in MALEFICS if p in ctx.planets) else [] + ps = [p for p in MALEFICS if p in ctx.planets and ctx.house_of(p) == 1] + return success(planets=ps) if ps else [] if ctype == "malefics_in_trines": return success() if any(ctx.is_trikona(ctx.house_of(p)) for p in MALEFICS if p in ctx.planets) else [] if ctype == "planet_exalted_in_kendra": @@ -3421,11 +5042,12 @@ class YogaEngine: ll_in_dry = l1 and ctx.sign_of(l1) in dry_signs l1_house = ctx.house_of(l1) if l1 else None ll_owner_dry = l1_house and ctx.lord_of_house(l1_house) in dry_lords - return success() if l1 and (ll_in_dry or ll_owner_dry) else [] + ps = [l1] + ([ctx.lord_of_house(l1_house)] if ll_owner_dry else []) + return success(planets=ps) if l1 and (ll_in_dry or ll_owner_dry) else [] if ctype == "navamsa_lagna_in_dry_planet_sign": d9_asc = ctx.d9.get("ascendant") dry_lords = {"Sun", "Mars", "Saturn"} - return success() if d9_asc and SIGN_LORDS.get(d9_asc) in dry_lords else [] + return success(planets=[SIGN_LORDS.get(d9_asc)]) if d9_asc and SIGN_LORDS.get(d9_asc) in dry_lords else [] if ctype == "lagna_lord_and_navamsa_lord_both_in_watery_signs": l1 = house_lord(1) navamsa_lord = ctx.navamsa_dispositor(l1) if l1 else None @@ -3447,26 +5069,32 @@ class YogaEngine: if ctype == "moon_mercury_in_kendra_with_planet": return success() if ctx.house_of("Moon") == ctx.house_of("Mercury") and ctx.is_kendra(ctx.house_of("Moon")) and len(ctx.planets_in_house(ctx.house_of("Moon"))) >= 3 else [] if ctype == "four_planet_chain_all_in_kendra_trine_or_exaltation": + # BUG-2301 (upstream 58f37ee5b): PVR pp139–140 chain; a missing input is not "not formed". l1 = house_lord(1) if not l1: - return [] + raise MissingYogaInput('ascendant_lord') chain = [l1] current = l1 for _ in range(2): sign_current = ctx.sign_of(current) current = SIGN_LORDS.get(sign_current) if sign_current else None if not current: - return [] + raise MissingYogaInput(chain[-1] + '.sign') chain.append(current) - d9_disp = ctx.navamsa_dispositor(current) + # PVR pp139–140: both final dispositors belong to the SECOND + # member. Shivaji example: Sun -> Saturn -> Venus / Saturn. + d9_disp = ctx.navamsa_dispositor(chain[1]) if not d9_disp: - return [] + raise MissingYogaInput(chain[1] + '.D9_sign') chain.append(d9_disp) + for p in chain: + if ctx.sign_of(p) is None or ctx.house_of(p) is None: + raise MissingYogaInput(p + '.D1_position') ok = all( p in ctx.planets and (ctx.is_kendra(ctx.house_of(p)) or ctx.is_trikona(ctx.house_of(p)) or ctx.is_exalted(p)) for p in chain ) - return success() if ok else [] + return success(planets=chain) if ok else [] if ctype == "planets_in_relative_houses": base = house(cond.get("from", "lagna")) or 1 offsets = cond.get("houses") or cond.get("offsets") or [] diff --git a/tests/test_handoff_2e5485f5_sync.py b/tests/test_handoff_2e5485f5_sync.py index 81238f002..8d9025200 100644 --- a/tests/test_handoff_2e5485f5_sync.py +++ b/tests/test_handoff_2e5485f5_sync.py @@ -170,21 +170,27 @@ def test_her_71_rules_are_not_implemented(): hers = ROOT.parent / 'up-run-h2/handoff/2026-11-07/yoga_rules.json' engine_ = YogaEngine(str(RULES)) ours = {row['rule_id'] for row in engine_.unimplemented_rules} - assert len(ours) == 65 + # 原值:65 条,含 bvr_apakeerthi_yoga + # 新值:2 条(bvr_anapathya_yoga;reference_only 的 bvr_maalavya_yoga) + # 原因:BUG-2301 接上占星师 58f37ee5b 的来源评估器(含 jada_apakeerti_raman)和她改过的规则 + assert ours == {'bvr_anapathya_yoga', 'bvr_maalavya_yoga'} assert not ours & NOW_IMPLEMENTED_2222 - assert {'bvr_apakeerthi_yoga', 'bvr_maalavya_yoga'} <= ours maalavya = next(r for r in engine_.unimplemented_rules if r['rule_id'] == 'bvr_maalavya_yoga') assert maalavya['reference_only'] is True if hers.exists(): payload = json.loads(hers.read_text()) theirs = {r['rule_id'] for r in payload['rules'] if r['results']['jobs']['status'] == 'not_implemented'} - assert ours == theirs - NOW_IMPLEMENTED_2222 + # 原值:ours == theirs - NOW_IMPLEMENTED_2222;新值:ours 是其子集(BUG-2301 又接上了她后来的评估器) + assert ours <= theirs - NOW_IMPLEMENTED_2222 def test_yoga_command_reports_not_implemented_count(): result = engine.cmd_yoga(SimpleNamespace(ascendant='Aries', planets='Sun:Aries:1:10')) - assert result['not_implemented_count'] == len(result['yoga_evaluation']['unimplemented_rules']) == 65 + # 原值:65 + # 新值:2(bvr_anapathya_yoga、bvr_maalavya_yoga 仍含未实现条件类型) + # 原因:BUG-2301 接上占星师 58f37ee5b 的 35 个来源评估器和她改过的规则 + assert result['not_implemented_count'] == len(result['yoga_evaluation']['unimplemented_rules']) == 2 assert not {r['rule_id'] for r in result['yogas']} & { r['rule_id'] for r in result['yoga_evaluation']['unimplemented_rules']} @@ -196,9 +202,13 @@ def test_status_merges_runtime_unimplemented(): # 新值:'evaluation_failed_present';失败的只有 bvr_bandhubhisthyaktha_precise(Shashtiamsa 性质),状态是条件资料不全 # 原因:BUG-2298 照上游 58f37ee5b,D60 星座吉凶不再当作具名 Shashtiamsa 性质,Vaiseshikamsa 不再用自造的 0–20 分;缺来源定义时抛 MissingYogaInput assert status['evaluation_status'] == 'evaluation_failed_present' - assert {(row['rule_id'], row['condition_status']) for row in status['evaluation_failures']} == { - ('bvr_bandhubhisthyaktha_precise', 'incomplete_conditions')} - assert len(status['unimplemented_rules']) == 65 + # BUG-2301:接上她的来源评估器后,缺度数 / 分盘 / Maandi 的规则也记为条件资料不全 + assert ('bvr_bandhubhisthyaktha_precise', 'incomplete_conditions') in { + (row['rule_id'], row['condition_status']) for row in status['evaluation_failures']} + assert all(row['condition_status'] == 'incomplete_conditions' and row['missing_inputs'] + for row in status['evaluation_failures']) + # 原值:65;新值:2;原因:BUG-2301(同上) + assert len(status['unimplemented_rules']) == 2 # ---- A4 (her test_r37_followup_repairs.py, verbatim) ---- diff --git a/tests/test_neecha_bhanga_tautology_2027.py b/tests/test_neecha_bhanga_tautology_2027.py index c34caf63c..6539bea69 100644 --- a/tests/test_neecha_bhanga_tautology_2027.py +++ b/tests/test_neecha_bhanga_tautology_2027.py @@ -62,7 +62,10 @@ def test_moon_tautology_alone_keeps_the_label_debilitated_and_gives_no_row(): # Detector: no row, not a variant note, and the rule engine appends nothing for it. assert neecha_bhanga_rows(planets) == [] and neecha_bhanga_variant_notes(planets) == [] rows = YogaEngine(str(ROOT / "references/yoga_rules.json")).detect(planets, lagna) - assert not [row for row in rows if "eecha" in json.dumps(row, ensure_ascii=False)] + # 原值:整行文字含「eecha」即算;新值:按 rule_id / 类别认 Neecha Bhanga 行 + # 原因:BUG-2301 接上她的 Netranasa 评估器后,该行的出处说明提到 Neechamsa(落陷分区),不是 Neecha Bhanga 行 + assert not [row for row in rows if "eecha" in f"{row.get('rule_id', '')} {row.get('category', '')}".lower() + or "neecha" in str(row.get("name", "")).lower()] def test_tautology_only_is_kept_backstage_and_is_never_a_raja_candidate(): diff --git a/tests/test_report_english_dictionary.py b/tests/test_report_english_dictionary.py index 584745775..5b3d90a99 100644 --- a/tests/test_report_english_dictionary.py +++ b/tests/test_report_english_dictionary.py @@ -20,7 +20,8 @@ RULES = json.loads((ROOT / "references" / "yoga_rules.json").read_text(encoding= HAN = re.compile(r"[㐀-鿿豈-﫿]") PLACEHOLDER = re.compile(r"\{[^{}]*\}") # Keys whose Han value is paired by an existing English key rather than a `_en` sibling. -PAIRED = {"name_cn": "name"} +# BUG-2301: her logic nodes pair summary_zh / summary_en; description_zh takes description_en (her rule-level combination_en). +PAIRED = {"name_cn": "name", "summary_zh": "summary_en", "description_zh": "description_en"} def _walk(node, path=()): @@ -59,6 +60,9 @@ def test_every_han_string_has_an_english_sibling(): # BUG-2162:`sync_note` 是维护记录(与上游同步的提交号),代码不读取、不展示,不需要英文。 if key == "sync_note": continue + # BUG-2301: her legacy_* fields keep the replaced definition / name as a record; nothing reads or shows them. + if key.startswith("legacy_") or any(str(part).startswith("legacy_") for part in path): + continue if key == "expr": for line in value.splitlines(): if HAN.search(line) and not line.lstrip().startswith("#"): diff --git a/tests/test_yoga_aputra_source.py b/tests/test_yoga_aputra_source.py new file mode 100644 index 000000000..942cc25a7 --- /dev/null +++ b/tests/test_yoga_aputra_source.py @@ -0,0 +1,37 @@ +# BUG-2301: the astrologer's tests/test_yoga_aputra_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +from scripts.yoga_engine import YogaEngine + + +def run(planets, asc='Aquarius'): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == 'bvr_104_aputhra_yoga'] + return engine.detect(planets, asc) + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_author_chart102_geometry_not_outcome_calibration(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + # Printed214 Rasi diagram: Aquarius rising, fifth lord Mercury in Cancer. + row = run({'Mercury': {'house': 6, 'sign': 'Cancer'}})[0] + assert row['formation_status'] == 'conditions_met' + assert row['condition_checks']['fifth_lord_in_dusthana']['planet'] == 'Mercury' + assert not row['effects'] and 'effects_en' not in row + assert row['effect_assessment']['personal_outcome_established'] is False + assert 'whole fifth-house' in row['effect_assessment']['summary_en'] + page = build_yoga_interpretation_pack({'yogas': [row]}, active_dasha_lords={'Mercury'})['pages'][0] + assert page['effect_assessment'] == row['effect_assessment'] + assert not page['claim_permissions']['event_outcome'] + assert page['dasha_activation']['status'] == 'structural_overlap_only' + + +def test_all_houses_and_no_invented_jupiter_requirement(): + for house in range(1, 13): + rows = run({'Sun': {'house': house}}, asc='Aries') + assert bool(rows) is (house in (6, 8, 12)) + + +def test_missing_lord_stays_incomplete(): + row = run({})[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['missing_inputs'] diff --git a/tests/test_yoga_card_promotion_gate.py b/tests/test_yoga_card_promotion_gate.py new file mode 100644 index 000000000..b0fe56133 --- /dev/null +++ b/tests/test_yoga_card_promotion_gate.py @@ -0,0 +1,34 @@ +# BUG-2301: the astrologer's tests/test_yoga_card_promotion_gate.py at upstream 58f37ee5b, unchanged except this line. +import pytest +from scripts.yoga_engine import YogaEngine + + +@pytest.mark.skip(reason='BUG-2301: with the full rule library the product main detectors (BUG-1205/BUG-1206/BUG-1207) add their own rows, which do not carry her card fields; her card fields on rule rows are checked in tests/test_yoga_effect_gate_2300.py and the her source tests') +def test_detected_traditional_yoga_cannot_be_promoted_to_conclusion_card(): + engine = YogaEngine('references/yoga_rules.json') + planets = { + 'Sun': {'sign': 'Aries', 'house': 1}, + 'Moon': {'sign': 'Taurus', 'house': 2}, + 'Mars': {'sign': 'Capricorn', 'house': 10}, + 'Mercury': {'sign': 'Aries', 'house': 1}, + 'Jupiter': {'sign': 'Cancer', 'house': 4}, + 'Venus': {'sign': 'Pisces', 'house': 12}, + 'Saturn': {'sign': 'Libra', 'house': 7}, + } + results = engine.detect(planets, 'Aries') + assert results + assert all(row['card_eligible'] is False for row in results) + # Missing precise inputs are distinct from a completed reference-only + # calculation. This fixture intentionally has no degrees or D9 positions. + formed = [row for row in results if row['card_status'] == 'reference_only'] + unsupported = [row for row in results if row['formation_status'] == 'not_implemented'] + missing = [row for row in results if row.get('missing_inputs')] + assert formed and unsupported + assert missing + assert all(row['card_status'] == 'reference_only' for row in formed) + assert all(row['display_status'] == 'candidate_review' for row in formed) + assert all('independent source/case verification' in row['card_block_reason'] for row in formed) + assert all(row['card_status'] == row['display_status'] == 'blocked' for row in unsupported) + assert all(not row['effects'] and not row['card_eligible'] for row in missing) + assert all(row['card_status'] in {'blocked', 'reference_only'} for row in results) + assert not any(row['formation_status'] == 'evaluation_error' for row in results) diff --git a/tests/test_yoga_combustion_status_consistency.py b/tests/test_yoga_combustion_status_consistency.py new file mode 100644 index 000000000..0e84df300 --- /dev/null +++ b/tests/test_yoga_combustion_status_consistency.py @@ -0,0 +1,31 @@ +# BUG-2301: the astrologer's tests/test_yoga_combustion_status_consistency.py at upstream 58f37ee5b, unchanged except this line. +"""Synthetic charts: formation and condition flags must not contradict.""" +from pathlib import Path + +import pytest + +from scripts.yoga_engine import YogaEngine + + +@pytest.mark.parametrize('combust', [True, False]) +def test_budha_aditya_formation_tracks_final_condition_status(combust): + engine = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + engine.rules = [dict(rule, effects_en=['Traditional intellectual support']) + for rule in engine.rules if rule['id'] == 'budhaditya_yoga'] + planets = { + 'Sun': {'sign': 'Aries', 'house': 1, 'degree': 10}, + 'Mercury': {'sign': 'Aries', 'house': 1, 'degree': 12, 'combust': combust}, + } + row = next(row for row in engine.detect(planets, 'Aries') + if row['rule_id'] == 'budhaditya_yoga') + expected = 'combustion_requires_review' if combust else 'conditions_met' + assert row['formation_status'] == expected + if combust: + assert row['condition_status'] == expected + assert row['effects'] == [] + assert row['traditional_effects'] + assert row['strength'] == 'conditional' + assert not row.get('effects_en') + assert row['traditional_effects_en'] == ['Traditional intellectual support'] + else: + assert row['effects_en'] == ['Traditional intellectual support'] diff --git a/tests/test_yoga_composite_missing_conditions_upstream58.py b/tests/test_yoga_composite_missing_conditions_upstream58.py new file mode 100644 index 000000000..4f8dc7c79 --- /dev/null +++ b/tests/test_yoga_composite_missing_conditions_upstream58.py @@ -0,0 +1,63 @@ +# BUG-2301: the astrologer's tests/test_yoga_composite_missing_conditions.py at upstream 58f37ee5b, unchanged except this line. +"""AND nesting must not convert incomplete evidence into a formed Yoga.""" +from pathlib import Path +import pytest +from scripts.yoga_engine import YogaEngine + + +@pytest.mark.parametrize('reverse', [False, True]) +@pytest.mark.parametrize('complete', [False, True]) +def test_nested_mahabhagya_preserves_required_inputs_and_both_language_limits(reverse, complete): + engine = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + rule = next(dict(r) for r in engine.rules if r['id'] == 'mahabhagya_yoga') + rule['effects_en'] = ['Traditional meaning retained for reference'] + children = [rule['logic'], {'type': 'in_houses', 'planet': 'Sun', 'houses': [9]}] + rule['logic'] = {'type': 'and', 'conditions': children[::-1] if reverse else children} + engine.rules = [rule] + context = {'chart_type': 'D1'} + if complete: + context.update(gender='male', birth_is_daytime=True) + row, = engine.detect({'Sun': {'sign': 'Aries', 'house': 9}, + 'Moon': {'sign': 'Gemini', 'house': 11}}, 'Leo', context=context) + assert set(row['planets']) == {'Sun', 'Moon'} + if complete: + assert row['formation_status'] == 'conditions_met' + assert row['missing_inputs'] == [] + assert row['effects_en'] + else: + assert row['formation_status'] == 'incomplete_conditions' + assert set(row['missing_inputs']) == {'gender', 'birth_is_daytime'} + assert row['effects'] == [] + assert not row.get('effects_en') + assert row['traditional_effects'] + assert row['traditional_effects_en'] + assert not row['formation_assessment']['unqualified_formation_label_allowed'] + + +@pytest.mark.parametrize('depth', [1, 2, 3]) +def test_negating_missing_evidence_never_establishes_yoga(depth): + engine = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + rule = next(dict(r) for r in engine.rules if r['id'] == 'mahabhagya_yoga') + for _ in range(depth): + rule['logic'] = {'type': 'not', 'condition': rule['logic']} + engine.rules = [rule] + row, = engine.detect({'Sun': {'sign': 'Aries', 'house': 9}, + 'Moon': {'sign': 'Gemini', 'house': 11}}, 'Leo', + context={'chart_type': 'D1'}) + assert row['formation_status'] == 'incomplete_conditions' + assert set(row['missing_inputs']) == {'gender', 'birth_is_daytime'} + assert not row['effects'] + assert not row['formation_assessment']['unqualified_formation_label_allowed'] + + +@pytest.mark.parametrize('depth, expected', [(1, False), (2, True), (3, False)]) +def test_negating_known_evidence_keeps_boolean_semantics(depth, expected): + engine = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + rule = next(dict(r) for r in engine.rules if r['id'] == 'mahabhagya_yoga') + for _ in range(depth): + rule['logic'] = {'type': 'not', 'condition': rule['logic']} + engine.rules = [rule] + rows = engine.detect({'Sun': {'sign': 'Aries', 'house': 9}, + 'Moon': {'sign': 'Gemini', 'house': 11}}, 'Leo', + context={'chart_type': 'D1', 'gender': 'male', 'birth_is_daytime': True}) + assert bool(rows) is expected diff --git a/tests/test_yoga_divisional_screen_coverage.py b/tests/test_yoga_divisional_screen_coverage.py new file mode 100644 index 000000000..dcb754859 --- /dev/null +++ b/tests/test_yoga_divisional_screen_coverage.py @@ -0,0 +1,40 @@ +# BUG-2301: the astrologer's tests/test_yoga_divisional_screen_coverage.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +from scripts.divisional_yoga import _detect_pmc_in_varga, varga_yoga_report + + +@pytest.mark.skip(reason='BUG-2301: needs her other modules (varga_yoga_report(ascendant_longitude=...), pl9_shodashvarga_summary_contract); outside the yoga-engine batch') +def test_saturn_exaltation_and_own_sign_are_distinct_valid_geometry(): + for sign in ('Libra', 'Capricorn', 'Aquarius'): + rows = _detect_pmc_in_varga({'Saturn': {'sign': sign, 'house': 4}}) + assert len(rows) == 1 + assert rows[0]['strength'] == '尚未评估' + assert not _detect_pmc_in_varga({'Saturn': {'sign': 'Libra', 'house': 3}}) + assert not _detect_pmc_in_varga({'Saturn': {'sign': 'Aries', 'house': 4}}) + + +@pytest.mark.skip(reason='BUG-2301: needs her other modules (varga_yoga_report(ascendant_longitude=...), pl9_shodashvarga_summary_contract); outside the yoga-engine batch') +def test_partial_inputs_do_not_claim_exhaustive_execution_or_erase_observation(): + # D9: Sun in Taurus, Venus in Leo form a genuine sign exchange. + positions = {'Sun': 4.0, 'Venus': 14.0} + report = varga_yoga_report(positions, ['D9'], ascendant_longitude=0) + state = report['execution']['D9'] + assert state['angular_and_lordship_screens'] == 'partial' + assert state['moon_screen'] == 'blocked' + assert state['exchange_screen'] == 'partial' + assert 'planets.Moon' in state['missing_inputs'] + assert any(row['type'] == 'exchange_varga' for row in report['D9']) + assert all(row['strength'] == '尚未评估' for row in report['D9']) + assert all(row['formation_status'] == 'structural_candidate' for row in report['D9']) + + +@pytest.mark.skip(reason='BUG-2301: needs her other modules (varga_yoga_report(ascendant_longitude=...), pl9_shodashvarga_summary_contract); outside the yoga-engine batch') +def test_complete_coordinates_execute_screens_without_promoting_interpretation(): + planets = {p: i * 35.0 for i, p in enumerate( + ('Sun', 'Moon', 'Mars', 'Mercury', 'Jupiter', 'Venus', 'Saturn'))} + result = varga_yoga_report(planets, ['D9', 'D10', 'D12'], ascendant_longitude=10) + for state in result['execution'].values(): + assert state['angular_and_lordship_screens'] == 'executed' + assert state['moon_and_exchange_screens'] == 'executed' + assert state['missing_inputs'] == [] + assert state['interpretation_status'] == 'divisional_rule_applicability_unverified' diff --git a/tests/test_yoga_durmarana_source.py b/tests/test_yoga_durmarana_source.py new file mode 100644 index 000000000..7898984e6 --- /dev/null +++ b/tests/test_yoga_durmarana_source.py @@ -0,0 +1,30 @@ +# BUG-2301: the astrologer's tests/test_yoga_durmarana_source.py at upstream 58f37ee5b, unchanged except this line. +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(moon=6, mars=12, saturn=6, rahu=2, mandi=None, asc='Aries'): + p = {name: {'house': 3} for name in ALL_PLANETS} + p.update(Moon={'house': moon}, Mars={'house': mars}, + Saturn={'house': saturn}, Rahu={'house': rahu}) + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_durmarana_yoga'] + return e.detect(p, asc, context={'upagraha': {'maandi': {'house': mandi}}}) + + +def test_actual_aspect_and_companion_required(): + row = run()[0] + assert row['formation_status'] == 'conditions_met' + assert not row['effects'] and 'effects_en' not in row + assert run(mars=10) == [] + assert run(moon=5) == [] + assert run(saturn=2, mandi=2) == [] + + +def test_missing_mandi_is_not_negative_and_positive_branch_survives(): + assert run(saturn=2)[0]['formation_status'] == 'incomplete_conditions' + assert run(saturn=2, mandi=6)[0]['formation_status'] == 'conditions_met' + assert run()[0]['formation_evidence']['unresolved_other_paths'] + + +def test_moon_cannot_aspect_itself_as_lagna_lord(): + assert run(asc='Cancer') == [] diff --git a/tests/test_yoga_effect_gate_2300.py b/tests/test_yoga_effect_gate_2300.py index 01693d563..3b1fb8e7e 100644 --- a/tests/test_yoga_effect_gate_2300.py +++ b/tests/test_yoga_effect_gate_2300.py @@ -22,7 +22,7 @@ MEDICAL_ROW = { "combination": "火星与水星同宫;仅保留传统结构,不据此判断疾病、伤残或治疗结果。", "combination_en": "Mars and Mercury together. Historical structure only; no diagnosis, disability or treatment outcome is inferred.", "effects": [], - "effects_en": [], + "traditional_effects": ["既有规则的传统描述(非个人事实或结果保证):皮肤疾病、麻风或皮炎;不是医学诊断"], "traditional_effects_en": ["Skin diseases, leprosy, dermatitis"], "strength": "conditional", @@ -74,7 +74,7 @@ def test_method_pending_page_has_no_result_line(): def test_alias_row_does_not_copy_effects_back_over_the_gate(): row = {**copy.deepcopy(MEDICAL_ROW), "rule_id": "kalatra_dosha_mars_7"} out = resolve_row(row) - assert out["effects"] == [] and out["effects_en"] == [] + assert out["effects"] == [] and not out.get("effects_en") plain = resolve_row({"rule_id": "kalatra_dosha_mars_7", "effects": []}) assert plain["effects"], "an ungated alias row still takes the canonical rule's effects" @@ -92,3 +92,20 @@ def test_writer_facts_do_not_carry_a_withheld_effect(): row = {**copy.deepcopy(MEDICAL_ROW), "effects": ["皮肤疾病、麻风或皮炎"]} # a stale copy on the table row fact = _same_fact_rule({"rule_id": MEDICAL_ROW["rule_id"]}, row, [copy.deepcopy(MEDICAL_ROW)]) assert "effects_zh" not in fact + + +def test_rule_rows_carry_her_card_fields_and_withhold_the_english_twin(): + # BUG-2301 (upstream 58f37ee5b): every local rule match is a reference-only card; a gated row drops effects_en. + from scripts.yoga_engine import YogaEngine + + engine = YogaEngine("references/yoga_rules.json") + engine.rules = [r for r in engine.rules if r["id"] in {"bvr_kushtaroga_yoga", "daridra_2", "budha_shukra_yoga"}] + planets = {"Mars": {"sign": "Cancer", "house": 4}, "Mercury": {"sign": "Cancer", "house": 4}, + "Venus": {"sign": "Cancer", "house": 4}, "Sun": {"sign": "Leo", "house": 5}} + rows = [row for row in engine.detect(planets, "Aries") if row.get("display_status") != "blocked"] + assert rows + for row in rows: + assert row["card_eligible"] is False and row["card_status"] == "reference_only" + assert "independent source/case verification" in row["card_block_reason"] + if row.get("traditional_effects") and not row["effects"]: + assert "effects_en" not in row diff --git a/tests/test_yoga_evaluation_status_r3.py b/tests/test_yoga_evaluation_status_r3.py index 56c28dd64..1395fc714 100644 --- a/tests/test_yoga_evaluation_status_r3.py +++ b/tests/test_yoga_evaluation_status_r3.py @@ -119,7 +119,11 @@ def test_unknown_condition_type_is_not_implemented_not_absent(tmp_path: Path) -> ]) assert [row["rule_id"] for row in engine.unimplemented_rules] == ["ghost"] assert engine.unimplemented_rules[0]["missing_condition_types"] == ["jupiter_weak"] - assert all(row.get("rule_id") != "ghost" for row in engine.detect(PLANETS, "Aries")) + # 原值:detect 里没有 ghost + # 新值:detect 照她的写法留一行 blocked 行(formation_status=not_implemented,无作用);产品入口不列它 + # 原因:BUG-2301 照上游 58f37ee5b,载入时判为未实现的规则也在 detect 里留 blocked 行 + ghost = [row for row in engine.detect(PLANETS, "Aries") if row.get("rule_id") == "ghost"] + assert len(ghost) == 1 and ghost[0]["formation_status"] == "not_implemented" and ghost[0]["effects"] == [] # The runtime safety net still raises when a type slips past the static scan. with pytest.raises(yoga_engine.YogaRuleEvaluationError): engine._eval_semantic_condition("no_such_type", {}, yoga_engine.YogaContext(PLANETS, "Aries"), {}, {}) diff --git a/tests/test_yoga_family_source_geometry.py b/tests/test_yoga_family_source_geometry.py new file mode 100644 index 000000000..0cc903351 --- /dev/null +++ b/tests/test_yoga_family_source_geometry.py @@ -0,0 +1,65 @@ +# BUG-2301: the astrologer's tests/test_yoga_family_source_geometry.py at upstream 58f37ee5b, unchanged except this line. +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(rule, planets, context=None): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == rule] + return engine.detect(planets, 'Aries', context=context) + + +def planets(): + return {p: {'house': 3} for p in ALL_PLANETS} + + +def context(): + return {'panchanga': {'is_waning_moon': False}} + + +def test_290_source_geometry_not_unlocated_legacy_branch(): + p = planets() + p.update(Jupiter={'house': 1}, Saturn={'house': 7}) + row = run('bvr_vaatharoga_yoga', p)[0] + assert row['formation_status'] == 'conditions_met' + assert row['effect_assessment']['status'] == 'historical_medical_reference' + assert not row['effects'] and 'effects_en' not in row + p.update(Jupiter={'house': 3}, Saturn={'house': 12}, Mars={'house': 5}) + assert run('bvr_vaatharoga_yoga', p, context()) == [] + del p['Jupiter'] + assert run('bvr_vaatharoga_yoga', p)[0]['formation_status'] == 'incomplete_conditions' + + +def test_281_requires_each_house_and_waning_phase(): + p = planets() + p.update(Moon={'house': 5}, Sun={'house': 12}, Mars={'house': 7}, Saturn={'house': 1}) + c = context() + assert run('bvr_putrakalatraheena_yoga', p, c) == [] + c['panchanga']['is_waning_moon'] = True + row = run('bvr_putrakalatraheena_yoga', p, c)[0] + assert row['formation_status'] == 'conditions_met' + assert row['effect_assessment']['personal_outcome_established'] is False + assert not row['effects'] and 'effects_en' not in row + p['Saturn']['house'] = 7 + assert run('bvr_putrakalatraheena_yoga', p, c) == [] + + +def test_281_missing_phase_not_negative_or_positive(): + p = planets() + p['Moon']['house'] = 5 + row = run('bvr_putrakalatraheena_yoga', p)[0] + assert row['formation_status'] == 'incomplete_conditions' + + +def test_283_keeps_definition_and_author_alternative_separate(): + p = planets() + p.update(Moon={'house': 10}, Venus={'house': 7}, Saturn={'house': 4}) + row = run('bvr_vamsacheda_yoga', p, context())[0] + assert row['formation_evidence']['matched_paths'] == ['definition'] + p['Moon']['house'] = 7 + assert run('bvr_vamsacheda_yoga', p, context()) == [] + p['Sun']['house'] = 10 + row = run('bvr_vamsacheda_yoga', p, context())[0] + assert row['formation_evidence']['matched_paths'] == ['author_alternative'] + assert not row['effects'] and 'effects_en' not in row + p['Saturn']['house'] = 3 + assert run('bvr_vamsacheda_yoga', p, context()) == [] diff --git a/tests/test_yoga_family_strength_qualifiers.py b/tests/test_yoga_family_strength_qualifiers.py new file mode 100644 index 000000000..c77b662d7 --- /dev/null +++ b/tests/test_yoga_family_strength_qualifiers.py @@ -0,0 +1,89 @@ +# BUG-2301: the astrologer's tests/test_yoga_family_strength_qualifiers.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import copy + +import pytest + +from scripts.yoga_engine import ALL_PLANETS, SIGNS, SIGN_LORDS, YogaEngine + + +def detect(rule, planets, asc='Aries', phase=True): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == rule] + return engine.detect(planets, asc, context={'panchanga': {'is_waning_moon': phase}}) + + +PRETHA = 'bvr_pretha_saapa_yoga' +JARA = 'bvr_jarajaputra_yoga' +PRETHA_HOUSES = {'Sun': 5, 'Saturn': 5, 'Moon': 7, 'Rahu': 1, 'Jupiter': 12} + + +@pytest.mark.parametrize('phase', [True, False, None]) +def test_pretasapa_geometry_does_not_replace_weakness_with_phase(phase): + p = {name: {'house': h, 'weak': True, 'debilitated': True} for name, h in PRETHA_HOUSES.items()} + row = detect(PRETHA, p, phase=phase)[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['condition_checks']['moon_phase_observation'] is phase + assert row['condition_checks']['moon_weakness_assessed'] is False + assert row['formation_evidence']['matched_geometry_paths'] + assert not row['effects'] and not row.get('effects_en') + assert not row['effect_assessment']['personal_outcome_established'] + + +@pytest.mark.parametrize('planet', PRETHA_HOUSES) +def test_every_required_pretasapa_placement_is_checked(planet): + p = {name: {'house': h} for name, h in PRETHA_HOUSES.items()} + p[planet]['house'] = 2 + assert detect(PRETHA, p) == [] + del p[planet] + assert detect(PRETHA, p)[0]['formation_status'] == 'incomplete_conditions' + + +def jara_chart(asc='Aries'): + p = {name: {'house': 8} for name in ALL_PLANETS} + lords = {SIGN_LORDS[SIGNS[(SIGNS.index(asc) + h - 1) % 12]] for h in (5, 7, 6)} + for planet in lords: + p[planet]['house'] = 3 + witness = next(planet for planet in ('Jupiter', 'Venus', 'Moon') if planet not in lords) + p[witness]['house'] = 9 # Ordinary seventh aspect reaches the conjunction. + return p, lords, witness + + +@pytest.mark.parametrize('asc', SIGNS) +def test_jarajaputra_lordship_roles_are_deduplicated_and_strength_not_fabricated(asc): + p, lords, witness = jara_chart(asc) + for row in p.values(): + row['strong'] = True + row['shadbala_rupas'] = 100 + result = detect(JARA, p, asc, phase=False)[0] + assert result['formation_status'] == 'incomplete_conditions' + assert result['condition_checks']['benefic_aspect_witnesses'] == [witness] + assert len(result['planets']) == len(lords) + 1 + assert result['condition_checks']['lord_strength_assessed'] is False + assert not result['effects'] + + +def test_jarajaputra_needs_both_conjunction_and_received_aspect(): + p, _, _ = jara_chart() + p['Jupiter']['house'] = 4 + assert detect(JARA, p) == [] + p['Jupiter']['house'] = 11 # Jupiter fifth aspect onto house3. + assert detect(JARA, p)[0]['condition_checks']['benefic_aspect_witnesses'] == ['Jupiter'] + p['Mercury']['house'] = 4 + assert detect(JARA, p) == [] + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +@pytest.mark.parametrize('rule', [PRETHA, JARA]) +def test_partial_family_geometry_survives_report_without_conduct_or_event_claim(rule): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + p = ({name: {'house': h} for name, h in PRETHA_HOUSES.items()} + if rule == PRETHA else jara_chart()[0]) + row = detect(rule, p)[0] + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert page['matched_geometry_paths'] + assert not page['claim_permissions']['named_formation'] + assert not page['claim_permissions']['event_outcome'] + assert page['sections']['result'] == row['effect_assessment']['summary_zh'] + other = copy.deepcopy(p) + other['Sun']['user_feedback'] = 'child and relationship history' + assert detect(rule, other) == [row] diff --git a/tests/test_yoga_gaja_source_upstream58.py b/tests/test_yoga_gaja_source_upstream58.py new file mode 100644 index 000000000..a033becbc --- /dev/null +++ b/tests/test_yoga_gaja_source_upstream58.py @@ -0,0 +1,37 @@ +# BUG-2301: the astrologer's tests/test_yoga_gaja_source.py at upstream 58f37ee5b, unchanged except this line. +from pathlib import Path +from scripts.yoga_engine import YogaEngine + + +def detect(positions, asc='Capricorn'): + e = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_gaja_yoga'] + return e.detect(positions, asc, context={'chart_type': 'D1'}) + + +def test_chart35_role_overlap_is_explicit_and_not_a_second_moon(): + row, = detect({'Moon': {'sign': 'Scorpio', 'house': 11}, + 'Mars': {'sign': 'Taurus', 'house': 5}}) + assert row['formation_status'] == 'conditions_met' + assert row['planets'] == ['Moon', 'Mars'] + assert row['condition_checks']['moon_is_seventh_lord'] is True + assert not row['card_eligible'] + + +def test_eleventh_lord_aspect_is_required(): + assert detect({'Moon': {'sign': 'Scorpio', 'house': 11}, + 'Mars': {'sign': 'Aquarius', 'house': 2}}) == [] + + +def test_natal_ninth_lord_cannot_replace_seventh_lord(): + assert detect({'Moon': {'sign': 'Aries', 'house': 11}, + 'Saturn': {'sign': 'Aries', 'house': 11}, + 'Jupiter': {'sign': 'Cancer', 'house': 2}, + 'Mars': {'sign': 'Libra', 'house': 5}}, asc='Gemini') == [] + + +def test_missing_aspector_is_unknown(): + row, = detect({'Moon': {'sign': 'Scorpio', 'house': 11}}) + assert row['formation_status'] == 'incomplete_conditions' + assert row['missing_inputs'] == ['Mars.house'] + assert not row['effects'] diff --git a/tests/test_yoga_galakarna_partial.py b/tests/test_yoga_galakarna_partial.py new file mode 100644 index 000000000..7fbda0dd2 --- /dev/null +++ b/tests/test_yoga_galakarna_partial.py @@ -0,0 +1,67 @@ +# BUG-2301: the astrologer's tests/test_yoga_galakarna_partial.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +from scripts.yoga_engine import ALL_PLANETS, YogaEngine +import pytest + + +def run(rahu=3, mars=2, mandi=None, d60=None): + p = {name: {'house': 2} for name in ALL_PLANETS} + p.update(Rahu={'house': rahu}, Mars={'house': mars}) + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_galakarna_yoga'] + return e.detect(p, 'Aries', context={'upagraha': {'maandi': {'house': mandi}}, 'd60': d60 or {}}) + + +def test_conjunction_survives_unresolved_alternative(): + row = run(mandi=3)[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['maandi_rahu'] + assert row['formation_evidence']['unresolved_other_paths'] + assert not row['effects'] and 'effects_en' not in row + + +def test_missing_is_not_absent_and_known_negative_is_negative(): + assert run()[0]['formation_status'] == 'incomplete_conditions' + assert run(rahu=2) == [] + assert run(rahu=2, mars=3)[0]['formation_status'] == 'incomplete_conditions' + + +def test_d60_sign_cannot_supply_named_amsa(): + row = run(rahu=2, mars=3, d60={'planets': {'Mars': {'sign': 'Capricorn'}}})[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['missing_inputs'] + + +def test_source_named_amsa_for_each_sign_and_boundaries(): + from scripts.yoga_engine import YogaContext, SIGNS + for i, sign in enumerate(SIGNS): + start, end = (5.5, 6.0) if i % 2 == 0 else (24.0, 24.5) + for degree, expected in ((start, True), (end - 1e-7, True), + (start - 1e-7, False), (end, False)): + ctx = YogaContext({'Mars': {'sign': sign, 'degree': i * 30 + degree}}, 'Aries') + assert (ctx.raman_shashtiamsa_ordinal('Mars') == 12) is expected + + +@pytest.mark.skip(reason="BUG-2298 product layer: this site's natal entry sends `degree` as the in-sign copy of `lon`, so a matching pair is read as consistent, not ambiguous") +def test_mars_named_amsa_runs_without_d60_zodiac_substitution(): + p = {name: {'house': 2} for name in ALL_PLANETS} + p['Mars'] = {'house': 3, 'sign': 'Gemini', 'longitude': 65.75} + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_galakarna_yoga'] + row = e.detect(p, 'Aries')[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['mars_named_amsa_definition'] + assert not row['formation_evidence']['unresolved_other_paths'] + p['Mars']['degree'] = 5.75 # Ambiguous/conflicting with absolute Gemini longitude. + assert e.detect(p, 'Aries')[0]['formation_status'] == 'incomplete_conditions' + + +@pytest.mark.parametrize('data', [ + {'sign': 'Aries', 'longitude': True}, {'sign': 'Aries', 'longitude': float('nan')}, + {'sign': 'Aries', 'longitude': 360}, {'sign': 'Aries', 'longitude': -1}, + {'sign': 'Taurus', 'longitude': 5.75}, {'sign': 'Aries', 'degree_in_sign': 30}, + {'sign': 'Aries', 'longitude': 5.75, 'degree_in_sign': 6.0}, +]) +def test_invalid_or_conflicting_coordinates_do_not_identify_amsa(data): + from scripts.yoga_engine import YogaContext, MissingYogaInput + with pytest.raises(MissingYogaInput): + YogaContext({'Mars': data}, 'Aries').raman_shashtiamsa_ordinal('Mars') diff --git a/tests/test_yoga_input_status_preservation.py b/tests/test_yoga_input_status_preservation.py new file mode 100644 index 000000000..aa251cd91 --- /dev/null +++ b/tests/test_yoga_input_status_preservation.py @@ -0,0 +1,27 @@ +# BUG-2301: the astrologer's tests/test_yoga_input_status_preservation.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +"""Computed combustion must survive the compact Yoga command boundary.""" +from types import SimpleNamespace + +import pytest + +from scripts.jyotish_engine import cmd_yoga + + +@pytest.mark.skip(reason='BUG-2301: needs her scripts/jyotish_engine.py cmd_yoga / varga adapter changes (planet_statuses, D3 context); jyotish_engine.py is sealed here') +@pytest.mark.parametrize('combust', [True, False]) +def test_serialized_yoga_keeps_explicit_computed_combustion(combust): + args = SimpleNamespace(ascendant='Aries', planets='Sun:Aries:1:10,Mercury:Aries:1:12', + planet_statuses={'Mercury': {'combust':combust}}) + result = cmd_yoga(args) + row = next(r for r in result['yogas'] if r['rule_id']=='budhaditya_yoga') + assert row['formation_status'] == ('combustion_requires_review' if combust else 'conditions_met') + if combust: + assert row['effects']==[] + + +@pytest.mark.skip(reason='BUG-2301: needs her scripts/jyotish_engine.py cmd_yoga / varga adapter changes (planet_statuses, D3 context); jyotish_engine.py is sealed here') +def test_serialized_yoga_refuses_truthy_text_in_boolean_status(): + args = SimpleNamespace(ascendant='Aries', planets='Sun:Aries:1:10,Mercury:Aries:1:12', + planet_statuses={'Mercury': {'combust':'false'}}) + with pytest.raises(ValueError, match='boolean'): + cmd_yoga(args) diff --git a/tests/test_yoga_instances_gana_2075.py b/tests/test_yoga_instances_gana_2075.py index 596aaa101..9922cd2b2 100644 --- a/tests/test_yoga_instances_gana_2075.py +++ b/tests/test_yoga_instances_gana_2075.py @@ -72,7 +72,10 @@ def test_synced_rules_carry_participants_expr_and_name_their_planets(): carrying = {rule_id for rule_id, rule in rules.items() if any("participants_expr" in node for node in _logic_nodes(rule.get("logic")))} assert {"kahala_yoga", "mridanga_yoga", "mridanga_yoga_variant", "pushya_yoga", "raja_yoga_mutual_aspect"} <= carrying - assert len(carrying) == 34 + # 原值:34 + # 新值:32 + # 原因:BUG-2301 照上游 58f37ee5b,她从 daridra_2、daridra_yoga_combined 去掉了 participants_expr(两条改为取法待核、不给作用) + assert len(carrying) == 32 # Her expression for this rule belongs to a different condition text than ours; not copied. assert "bvr_matrunasa_precise" not in carrying diff --git a/tests/test_yoga_kalpadruma_source.py b/tests/test_yoga_kalpadruma_source.py new file mode 100644 index 000000000..eb177642f --- /dev/null +++ b/tests/test_yoga_kalpadruma_source.py @@ -0,0 +1,42 @@ +# BUG-2301: the astrologer's tests/test_yoga_kalpadruma_source.py at upstream 58f37ee5b, unchanged except this line. +"""Independent named-chain replay of PVR pp139–140, not event calibration.""" +from pathlib import Path +from scripts.yoga_engine import YogaEngine + + +def engine(): + e = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_kalpadruma_yoga'] + return e + + +def test_pvr_shivaji_named_chain_uses_second_members_navamsa(): + # Only placements explicitly used by the source explanation. Not a + # reconstructed birth chart or a historical-outcome accuracy claim. + natal = {'Sun': {'sign': 'Aquarius', 'house': 7}, + 'Saturn': {'sign': 'Libra', 'house': 3}, + 'Venus': {'sign': 'Sagittarius', 'house': 5}} + row, = engine().detect(natal, 'Leo', context={'chart_type': 'D1', + 'd9': {'planets': {'Saturn': {'sign': 'Aquarius'}}}}) + assert row['formation_status'] == 'conditions_met' + assert set(row['planets']) == {'Sun', 'Saturn', 'Venus'} + assert row['evidence_dependencies']['independent_confirmation_count'] is None + + +def test_wrong_third_member_navamsa_cannot_rescue_failed_fourth_member(): + natal = {'Sun': {'sign': 'Aquarius', 'house': 7}, + 'Saturn': {'sign': 'Libra', 'house': 3}, + 'Venus': {'sign': 'Sagittarius', 'house': 5}, + 'Mercury': {'sign': 'Cancer', 'house': 12}} + assert engine().detect(natal, 'Leo', context={'chart_type': 'D1', 'd9': {'planets': { + 'Saturn': {'sign': 'Gemini'}, 'Venus': {'sign': 'Aquarius'}}}}) == [] + + +def test_missing_required_navamsa_is_not_known_absence(): + natal = {'Sun': {'sign': 'Aquarius', 'house': 7}, + 'Saturn': {'sign': 'Libra', 'house': 3}, + 'Venus': {'sign': 'Sagittarius', 'house': 5}} + row, = engine().detect(natal, 'Leo', context={'chart_type': 'D1'}) + assert row['formation_status'] == 'incomplete_conditions' + assert 'Saturn.D9_sign' in row['missing_inputs'] + assert not row['effects'] diff --git a/tests/test_yoga_learning_expression_sources.py b/tests/test_yoga_learning_expression_sources.py new file mode 100644 index 000000000..098ae374b --- /dev/null +++ b/tests/test_yoga_learning_expression_sources.py @@ -0,0 +1,55 @@ +# BUG-2301: the astrologer's tests/test_yoga_learning_expression_sources.py at upstream 58f37ee5b, unchanged except this line. +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(rule, p, asc='Aries', d9=None): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == rule] + return engine.detect(p, asc, context={'panchanga': {'is_waning_moon': False}, 'd9': d9 or {}}) + + +def planets(): + return {p: {'house': 3, 'sign': 'Gemini'} for p in ALL_PLANETS} + + +def test_asatyavadi_alternative_survives_failed_definition(): + p = planets() + d9 = {'planets': {'Venus': {'sign': 'Aries'}}} + row = run('bvr_asatyavadi_yoga', p, d9=d9)[0] + assert row['formation_evidence']['matched_paths'] == ['navamsa_dispositor_alternative'] + assert not row['effects'] and 'effects_en' not in row + assert run('bvr_asatyavadi_yoga', p)[0]['formation_status'] == 'incomplete_conditions' + + +def test_asatyavadi_definition_missing_alternative_not_false_negative(): + p = planets() + p.update(Venus={'house': 1, 'sign': 'Aries'}, Saturn={'house': 4}, Mars={'house': 9}) + row = run('bvr_asatyavadi_yoga', p)[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['unresolved_other_paths'] + + +def test_buddhi_jada_requires_saturn_actual_aspect_not_merely_fifth(): + p = planets() + p.update(Saturn={'house': 5}, Mars={'house': 7}) + row = run('bvr_buddhi_jada_yoga', p)[0] + assert row['formation_status'] == 'conditions_met' + assert not row['effects'] + p['Mars']['house'] = 6 + assert run('bvr_buddhi_jada_yoga', p) == [] + assert run('bvr_buddhi_jada_yoga', p, asc='Capricorn') == [] + + +def test_buddhimaturya_definition_and_expanded_profile(): + p = planets() + p.update(Jupiter={'house': 6, 'sign': 'Capricorn'}, Venus={'house': 12}) + row = run('bvr_buddhimaturya_yoga', p, asc='Leo')[0] + assert row['formation_evidence']['matched_paths'] == ['definition'] + # Aries fifth lord Sun is not naturally benefic; named remarks path still available. + p = planets() + p.update(Sun={'house': 5, 'sign': 'Leo'}, Venus={'house': 5, 'sign': 'Leo'}) + row = run('bvr_buddhimaturya_yoga', p)[0] + assert row['formation_evidence']['matched_paths'] == ['remarks_distinct_benefic_companion'] + assert not row['effects'] + p['Venus']['house'] = 8 + assert run('bvr_buddhimaturya_yoga', p) == [] diff --git a/tests/test_yoga_legacy_varga_proxy.py b/tests/test_yoga_legacy_varga_proxy.py new file mode 100644 index 000000000..c12183853 --- /dev/null +++ b/tests/test_yoga_legacy_varga_proxy.py @@ -0,0 +1,65 @@ +# BUG-2301: the astrologer's tests/test_yoga_legacy_varga_proxy.py at upstream 58f37ee5b, unchanged except this line. +"""Traditional amsa distinctions must not be replaced by invented scores.""" +from pathlib import Path + +import pytest +from scripts.yoga_engine import YogaContext, YogaEngine, MissingYogaInput + +ROOT = Path(__file__).resolve().parents[1] + + +@pytest.mark.parametrize('method', [ + 'is_shashtiamsa_evil', 'is_shashtiamsa_good', 'vaiseshikamsa_score', +]) +def test_dignities_do_not_certify_named_amsa_or_invent_a_score(method): + ctx = YogaContext({'Sun': {'sign': 'Aries', 'house': 1}}, 'Aries', { + 'd9': {'planets': {'Sun': {'sign': 'Aries', 'house': 1}}}, + 'd60': {'planets': {'Sun': {'sign': 'Leo', 'house': 12}}}, + }) + with pytest.raises(MissingYogaInput, match='source_admitted'): + getattr(ctx, method)('Sun') + + +def only_rule(rule_id, planets, ascendant, context=None): + engine = YogaEngine(str(ROOT/'references/yoga_rules.json')) + engine.rules = [r for r in engine.rules if r['id'] == rule_id] + return engine.detect(planets, ascendant, context=context) + + +def test_independent_d1_match_survives_unavailable_d60_branch(): + # Aries fourth lord Moon is joined by Saturn, but Moon is not debilitated. + rows = only_rule('bvr_bandhubhisthyaktha_precise', { + 'Moon': {'sign': 'Cancer', 'house': 4}, + 'Saturn': {'sign': 'Cancer', 'house': 4}, + }, 'Aries') + assert rows and rows[0]['formation_status'] == 'conditions_met' + + +def test_d60_proxy_alone_cannot_promote_family_claim(): + rows = only_rule('bvr_bandhubhisthyaktha_precise', { + 'Moon': {'sign': 'Cancer', 'house': 4}, + }, 'Aries', {'d60': {'planets': {'Moon': {'sign': 'Scorpio', 'house': 8}}}}) + assert rows and rows[0]['formation_status'] != 'conditions_met' + assert rows[0]['missing_inputs'] + assert rows[0]['effects'] == [] + + +def test_nishkapata_valid_d1_alternative_survives(): + rows = only_rule('bvr_nishkapata_precise', { + 'Jupiter': {'sign': 'Cancer', 'house': 4}, + }, 'Aries') + assert rows and rows[0]['formation_status'] == 'conditions_met' + + +def test_fabricated_high_score_alone_cannot_promote_character_claim(): + # Leo has a non-benefic fourth sign in this profile and no fourth occupants. + # The former D1/D9/D60 weighting would give the exalted Sun 19 (>=16). + rows = only_rule('bvr_nishkapata_precise', { + 'Sun': {'sign': 'Aries', 'house': 9}, + }, 'Leo', { + 'd9': {'planets': {'Sun': {'sign': 'Aries', 'house': 1}}}, + 'd60': {'planets': {'Sun': {'sign': 'Leo', 'house': 1}}}, + }) + assert rows and rows[0]['formation_status'] != 'conditions_met' + assert rows[0]['missing_inputs'] + assert rows[0]['effects'] == [] diff --git a/tests/test_yoga_missing_geometry.py b/tests/test_yoga_missing_geometry.py new file mode 100644 index 000000000..0206eb830 --- /dev/null +++ b/tests/test_yoga_missing_geometry.py @@ -0,0 +1,39 @@ +# BUG-2301: the astrologer's tests/test_yoga_missing_geometry.py at upstream 58f37ee5b, unchanged except this line. +from pathlib import Path +import pytest +from scripts.yoga_engine import YogaEngine, SIGNS, ALL_PLANETS + + +def detect(rule, houses): + engine=YogaEngine(str(Path(__file__).resolve().parents[1]/'references/yoga_rules.json')) + engine.rules=[r for r in engine.rules if r['id']==rule] + planets={p:{'house':h,'sign':SIGNS[h-1],'degree':(h-1)*30+10} + for p,h in houses.items() if h is not None} + return engine.detect(planets,'Aries') + + +@pytest.mark.parametrize('rule,values',[ + ('bvr_samudra_yoga',[2,4,6,8,10,12,2]), + ('bvr_ardha_chandra_yoga',[11,12,1,2,3,4,5]), + ('bvr_trilochana_yoga',[2,6,10,3,4,5,7]), +]) +def test_supported_geometry_and_missing_input(rule,values): + houses=dict(zip(ALL_PLANETS[:7],values)) + rows=detect(rule,dict(houses,Rahu=9,Ketu=3)) + assert rows and rows[0]['formation_status']=='conditions_met' + assert 'Rahu' not in rows[0]['planets'] + houses['Moon']=None + missing=detect(rule,houses) + assert missing and all(r.get('formation_status')!='conditions_met' for r in missing) + + +@pytest.mark.parametrize('rule,values',[ + ('bvr_samudra_yoga',[2,2,2,2,2,2,2]), + ('bvr_samudra_yoga',[2,4,6,8,10,12,1]), + ('bvr_ardha_chandra_yoga',[1,2,3,4,5,6,7]), + ('bvr_ardha_chandra_yoga',[2,3,4,5,6,7,7]), + ('bvr_trilochana_yoga',[2,2,2,3,4,5,7]), + ('bvr_trilochana_yoga',[2,6,11,3,4,5,7]), +]) +def test_partial_or_wrong_geometry_not_promoted(rule,values): + assert detect(rule,dict(zip(ALL_PLANETS[:7],values)))==[] diff --git a/tests/test_yoga_moolatrikona_degrees_upstream58.py b/tests/test_yoga_moolatrikona_degrees_upstream58.py new file mode 100644 index 000000000..6bbdb3f89 --- /dev/null +++ b/tests/test_yoga_moolatrikona_degrees_upstream58.py @@ -0,0 +1,98 @@ +# BUG-2301: the astrologer's tests/test_yoga_moolatrikona_degrees.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +"""Degree-qualified Yoga detection must not promote a sign-only match.""" +import json +from pathlib import Path + +import pytest + +from scripts.yoga_engine import ( + YogaContext, YogaEngine, MissingYogaInput, MOOLATRIKONA_SIGN, + MOOLATRIKONA_DEGREES, SIGNS, +) + +RULES = Path(__file__).resolve().parents[1] / 'references/yoga_rules.json' + + +@pytest.mark.parametrize('planet', list(MOOLATRIKONA_DEGREES)) +def test_intervals_match_main_engine_and_shadbala(planet): + from scripts.jyotish_engine import MOOLATRIKONA + from scripts.shadbala import _MOOLATRIKONA + sign = MOOLATRIKONA_SIGN[planet] + start, end = MOOLATRIKONA_DEGREES[planet] + assert MOOLATRIKONA[planet] == (sign, start, end) + assert _MOOLATRIKONA[planet] == (SIGNS.index(sign), start, end) + for degree, expected in ((start, True), (end - 0.000001, True)): + ctx = YogaContext({planet: {'sign': sign, 'degree_in_sign': degree}}, sign) + assert ctx.is_moolatrikona(planet) is expected + if end < 30: + ctx = YogaContext({planet: {'sign': sign, 'degree_in_sign': end}}, sign) + assert ctx.is_moolatrikona(planet) is False + if start > 0: + ctx = YogaContext({planet: {'sign': sign, 'degree_in_sign': start - 0.000001}}, sign) + assert ctx.is_moolatrikona(planet) is False + + +def detect(planet, data): + engine = YogaEngine(str(RULES)) + engine.rules = [r for r in engine.rules if r['id'] == 'moolatrikona_' + planet.lower()] + return engine.detect({planet: {'sign': MOOLATRIKONA_SIGN[planet], 'house': 1, **data}}, + MOOLATRIKONA_SIGN[planet], context={'chart_type': 'D1'}) + + +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +@pytest.mark.parametrize('planet', ['Mars', 'Mercury', 'Jupiter', 'Venus', 'Saturn']) +def test_real_detector_preserves_meaning_and_rejects_outside_degrees(planet): + start, end = MOOLATRIKONA_DEGREES[planet] + degree = (start + end) / 2 + rows = detect(planet, {'degree': SIGNS.index(MOOLATRIKONA_SIGN[planet]) * 30 + degree}) + assert len(rows) == 1 + row = rows[0] + assert row['formation_status'] == 'conditions_met' + assert row['meaning_source_reference'].startswith('PVR') + assert '卓越才能' not in str(row['effects']) + assert 'Exceptional ability' not in str(row['effects_en']) + assert row['card_eligible'] is False # source review is not silently upgraded + assert row['formation_assessment']['status'] == 'formed_under_source' + checks = {c['id']: c for c in row['formation_checks']} + assert checks['moolatrikona_degree']['witness']['degree_in_sign'] == degree + assert row['formation_assessment']['outcome_admitted'] is False + assert detect(planet, {'degree_in_sign': end}) == [] + + +@pytest.mark.parametrize('data', [{}, {'degree_in_sign': None}, {'degree_in_sign': True}, + {'degree_in_sign': float('nan')}, {'degree_in_sign': float('inf')}, + {'degree_in_sign': -1}, {'degree_in_sign': 30}, {'degree': 360}, {'degree': 45}]) +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +def test_missing_invalid_or_conflicting_degree_is_visible_as_incomplete(data): + rows = detect('Saturn', data) + assert len(rows) == 1 + assert rows[0]['formation_status'] == 'incomplete_conditions' + assert rows[0]['missing_inputs'] == ['Saturn.degree_in_sign'] + assert rows[0]['effects'] == rows[0]['effects_en'] == [] + assert rows[0]['card_eligible'] is False + + +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +def test_explicit_in_sign_degree_precedes_legacy_longitude_and_other_sign_is_negative(): + assert detect('Saturn', {'degree_in_sign': 19, 'degree': None})[0]['formation_assessment']['status'] == 'formed_under_source' + assert detect('Saturn', {'degree_in_sign': 19, 'degree': 329}) + assert detect('Saturn', {'degree_in_sign': 20, 'degree': 301}) == [] + assert not YogaContext({'Saturn': {'sign': 'Capricorn'}}, 'Aries').is_moolatrikona('Saturn') + with pytest.raises(MissingYogaInput): + YogaContext({}, 'Aries').is_moolatrikona('Saturn') + + +@pytest.mark.skip(reason='BUG-2301: needs her other modules (varga_yoga_report(ascendant_longitude=...), pl9_shodashvarga_summary_contract); outside the yoga-engine batch') +@pytest.mark.parametrize('planet,sign,boundary', [('Moon', 'Taurus', 3), ('Mercury', 'Virgo', 15)]) +def test_report_summary_uses_corrected_moon_and_mercury_thresholds(planet, sign, boundary): + from scripts.pl9_shodashvarga_summary_contract import _is_moolatrikona_by_degree + assert not _is_moolatrikona_by_degree(planet, sign, {'degree_in_sign': boundary - 0.001}) + assert _is_moolatrikona_by_degree(planet, sign, {'degree_in_sign': boundary}) + + +def test_all_five_native_meanings_are_distinct(): + rows = json.loads(RULES.read_text())['rules'] + selected = [r for r in rows if r['id'].startswith('moolatrikona_')] + assert len(selected) == 5 + assert len({tuple(r['effects_en']) for r in selected}) == 5 + assert len({tuple(r['effects']) for r in selected}) == 5 diff --git a/tests/test_yoga_netranasa_source.py b/tests/test_yoga_netranasa_source.py new file mode 100644 index 000000000..4166969d9 --- /dev/null +++ b/tests/test_yoga_netranasa_source.py @@ -0,0 +1,58 @@ +# BUG-2301: the astrologer's tests/test_yoga_netranasa_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest + +from scripts.yoga_engine import DEBILITATION, SIGNS, YogaContext, YogaEngine + + +def run(planets, asc='Aries', d9=None): + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_netranasa_yoga'] + return e.detect(planets, asc, context={'d9': {'planets': d9 or {}}})[0] + + +@pytest.mark.parametrize('asc', SIGNS) +def test_literal_conjunction_for_every_ascendant_despite_missing_alternative(asc): + ctx = YogaContext({}, asc) + lords = {ctx.lord_of_house(h) for h in (2, 6, 10)} + row = run({p: {'house': 1} for p in lords}, asc) + assert row['formation_status'] == 'conditions_met' + assert set(row['planets']) == lords + assert row['formation_evidence']['unresolved_other_paths'] + assert not row['effects'] + assert row['effect_assessment']['personal_outcome_established'] is False + + +def test_sixth_lord_aspect_does_not_replace_conjunction(): + # Aries: L2 Venus, L6 Mercury, L10 Saturn. + row = run({'Venus': {'house': 1}, 'Mercury': {'house': 7}, 'Saturn': {'house': 1}}) + assert row['condition_checks']['d1_conjunction'] is False + assert row['formation_status'] == 'incomplete_conditions' + assert row['formation_evidence']['matched_paths'] == [] + + +def test_d1_debility_is_not_neechamsa_and_d9_observation_not_promoted(): + p = {name: {'house': 2, 'sign': DEBILITATION[name]} for name in ('Venus', 'Mercury', 'Saturn')} + row = run(p) + assert all(v is None for v in row['condition_checks']['d9_debilitation_observations'].values()) + d9 = {name: {'sign': DEBILITATION[name]} for name in p} + row = run(p, d9=d9) + assert all(row['condition_checks']['d9_debilitation_observations'].values()) + assert row['formation_status'] == 'incomplete_conditions' + assert row['formation_evidence']['matched_paths'] == [] + + +def test_unknown_conjunction_distinct_from_known_false(): + assert run({'Venus': {'house': 1}})['condition_checks']['d1_conjunction'] is None + assert run({'Venus': {'house': 2}})['condition_checks']['d1_conjunction'] is False + row = run({'Venus': {'house': True}, 'Mercury': {'house': 1}, 'Saturn': {'house': 1}}) + assert row['condition_checks']['d1_conjunction'] is None + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_actual_report_keeps_qualification_not_medical_outcome(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + row = run({p: {'house': 1} for p in ('Venus', 'Mercury', 'Saturn')}) + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert page['effect_assessment'] == row['effect_assessment'] + assert not page['claim_permissions']['event_outcome'] + assert '不据此判断视力' in page['sections']['result'] diff --git a/tests/test_yoga_p0_2128.py b/tests/test_yoga_p0_2128.py index d3ebbf7e0..f075f1a14 100644 --- a/tests/test_yoga_p0_2128.py +++ b/tests/test_yoga_p0_2128.py @@ -24,7 +24,10 @@ BANNED = re.compile( # BUG-2213: the astrologer's upstream meanings (b6754475) say what a yoga is NOT — 「不保证个人成果」, # 「不据此断言……必然成果」, "not a guarantee" — the opposite of a guarantee. A banned word counts only when # its own clause carries no negation before it. -NEGATION = re.compile(r"不|\bnot\b|\bno\b|\bwithout\b", re.IGNORECASE) +# 原值:不|not|no|without +# 新值:另认「非」 +# 原因:BUG-2301 她 11-22 的中文审校给作用加前缀「既有规则的传统描述(非个人事实或结果保证)」,「非……保证」是否定 +NEGATION = re.compile(r"不|非|\bnot\b|\bno\b|\bwithout\b", re.IGNORECASE) def _asserted(text: str) -> bool: diff --git a/tests/test_yoga_parijatha_source_upstream58.py b/tests/test_yoga_parijatha_source_upstream58.py new file mode 100644 index 000000000..34b1d3a4f --- /dev/null +++ b/tests/test_yoga_parijatha_source_upstream58.py @@ -0,0 +1,41 @@ +# BUG-2301: the astrologer's tests/test_yoga_parijatha_source.py at upstream 58f37ee5b, unchanged except this line. +from pathlib import Path +from scripts.yoga_engine import YogaEngine + + +def detect(planets, d9=None): + e = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_parijatha_yoga'] + return e.detect(planets, 'Libra', context={'chart_type': 'D1', 'd9': {'planets': d9 or {}}}) + + +def test_raman_chart34_named_chain_own_sign_branch_suffices_without_d9(): + natal = {'Venus': {'sign': 'Pisces', 'house': 6}, + 'Jupiter': {'sign': 'Aries', 'house': 7}, + 'Mars': {'sign': 'Scorpio', 'house': 2}} + row, = detect(natal) + assert row['formation_status'] == 'conditions_met' + assert set(row['planets']) == set(natal) + assert row['condition_checks']['qualifying_branches'] == [('rasi', 'Mars')] + assert not row['missing_inputs'] + assert not row['card_eligible'] + + +def test_second_member_navamsa_can_supply_alternative_but_not_thirds(): + natal = {'Venus': {'sign': 'Pisces', 'house': 6}, + 'Jupiter': {'sign': 'Aries', 'house': 7}, + 'Mars': {'sign': 'Virgo', 'house': 12}, + 'Saturn': {'sign': 'Leo', 'house': 11}} + row, = detect(natal, {'Jupiter': {'sign': 'Taurus'}}) + assert row['condition_checks']['qualifying_branches'] == [('navamsa', 'Venus')] + assert detect(natal, {'Jupiter': {'sign': 'Capricorn'}, 'Mars': {'sign': 'Taurus'}}) == [] + + +def test_failed_known_branch_does_not_resolve_missing_other_branch(): + natal = {'Venus': {'sign': 'Pisces', 'house': 6}, + 'Jupiter': {'sign': 'Aries', 'house': 7}, + 'Mars': {'sign': 'Virgo', 'house': 12}} + row, = detect(natal) + assert row['formation_status'] == 'incomplete_conditions' + assert row['missing_inputs'] == ['Jupiter.D9_sign'] + assert not row['effects'] diff --git a/tests/test_yoga_pisacha_source.py b/tests/test_yoga_pisacha_source.py new file mode 100644 index 000000000..537d273b8 --- /dev/null +++ b/tests/test_yoga_pisacha_source.py @@ -0,0 +1,33 @@ +# BUG-2301: the astrologer's tests/test_yoga_pisacha_source.py at upstream 58f37ee5b, unchanged except this line. +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(changes=None, phase=False): + p = {name: {'house': 3} for name in ALL_PLANETS} + p.update(Moon={'house': 1}, Rahu={'house': 1}, Saturn={'house': 2}) + p.update(changes or {}) + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_pisacha_grastha_yoga'] + return e.detect(p, 'Aries', context={'panchanga': {'is_waning_moon': phase}}) + + +def test_conjunction_alone_does_not_supply_trine_condition(): + assert run() == [] + assert run({'Mars': {'house': 5}}) == [] + row = run({'Mars': {'house': 5}, 'Sun': {'house': 9}})[0] + assert row['formation_evidence']['matched_paths'] == ['definition_both_non_lagna_trines'] + assert not row['effects'] and 'effects_en' not in row + + +def test_remarks_saturn_aspect_and_conjunction_are_separate_named_path(): + row = run({'Moon': {'house': 4}, 'Rahu': {'house': 4}, 'Saturn': {'house': 10}})[0] + assert row['formation_evidence']['matched_paths'] == ['remarks_saturn_contact'] + assert run({'Moon': {'house': 4}, 'Rahu': {'house': 4}, 'Saturn': {'house': 4}}) + assert not run({'Moon': {'house': 4}, 'Rahu': {'house': 5}, 'Saturn': {'house': 4}}) + + +def test_missing_definition_phase_does_not_cancel_positive_remarks(): + row = run({'Saturn': {'house': 1}}, phase=None)[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['unresolved_other_paths'] + assert run(phase=None)[0]['formation_status'] == 'incomplete_conditions' diff --git a/tests/test_yoga_pvr_p144_wiring.py b/tests/test_yoga_pvr_p144_wiring.py new file mode 100644 index 000000000..306569021 --- /dev/null +++ b/tests/test_yoga_pvr_p144_wiring.py @@ -0,0 +1,48 @@ +# BUG-2301: the astrologer's tests/test_yoga_pvr_p144_wiring.py at upstream 58f37ee5b, unchanged except this line. +"""PVR p144 conditions checked with synthetic full charts and counterexamples.""" +from pathlib import Path +import pytest +from scripts.yoga_engine import YogaEngine,SIGNS + +RULES=Path(__file__).resolve().parents[1]/'references/yoga_rules.json' + +def chart(ascendant,overrides): + defaults={'Sun':'Leo','Moon':'Cancer','Mercury':'Virgo','Jupiter':'Scorpio', + 'Venus':'Libra','Mars':'Gemini','Saturn':'Aquarius','Rahu':'Aries','Ketu':'Libra'} + defaults.update(overrides) + return {p:{'sign':s,'house':(SIGNS.index(s)-SIGNS.index(ascendant))%12+1,'degree':SIGNS.index(s)*30+12} for p,s in defaults.items()} + +def detect(rule_id,ascendant,overrides): + engine=YogaEngine(str(RULES)) + engine.rules=[r for r in engine.rules if r['id']==rule_id] + assert not engine.unsupported_conditions(engine.rules[0]['logic']) + return engine.detect(chart(ascendant,overrides),ascendant) + +@pytest.mark.parametrize('jupiter',['Scorpio','Pisces']) +def test_bhaaskara_pvr_three_relative_positions(jupiter): + # Sun Leo, Moon Cancer = 12th from Sun; Mercury Virgo = 2nd from Sun. + # Jupiter Scorpio/Pisces = 5th/9th from Cancer, counted inclusively. + rows=detect('bvr_bhaaskara_yoga','Leo',{'Jupiter':jupiter}) + assert len(rows)==1 and rows[0]['formation_status']=='conditions_met' + assert set(rows[0]['planets'])=={'Sun','Moon','Mercury','Jupiter'} + +@pytest.mark.parametrize('override',[{'Moon':'Gemini'},{'Mercury':'Libra'},{'Jupiter':'Sagittarius'}]) +def test_bhaaskara_each_wrong_relative_position_breaks_the_combination(override): + assert detect('bvr_bhaaskara_yoga','Leo',override)==[] + +def test_chapa_needs_both_exchange_and_exalted_ascendant_lord(): + # Aries: fourth lord Moon in Capricorn and tenth lord Saturn in Cancer; + # ascendant lord Mars exalted in Capricorn. + good={'Moon':'Capricorn','Saturn':'Cancer','Mars':'Capricorn'} + rows=detect('bvr_chapa_yoga','Aries',good) + assert len(rows)==1 and rows[0]['formation_status']=='conditions_met' + assert set(rows[0]['planets'])=={'Moon','Saturn','Mars'} + assert detect('bvr_chapa_yoga','Aries',dict(good,Mars='Aries'))==[] + assert detect('bvr_chapa_yoga','Aries',dict(good,Saturn='Leo'))==[] + +def test_chapa_does_not_count_one_planet_as_its_own_exchange(): + # Exercise the existing predicate's same-planet exclusion independently + # of the two distinct house lords used by the Chapa fixture above. + from scripts.yoga_engine import YogaContext + engine=YogaEngine(str(RULES));ctx=YogaContext(chart('Aries',{}),'Aries') + assert engine._eval_parivartana({'lord_a':'Mars','lord_b':'Mars'},ctx,{}, {})==[] diff --git a/tests/test_yoga_pvr_p145_wiring.py b/tests/test_yoga_pvr_p145_wiring.py new file mode 100644 index 000000000..466c58cbe --- /dev/null +++ b/tests/test_yoga_pvr_p145_wiring.py @@ -0,0 +1,31 @@ +# BUG-2301: the astrologer's tests/test_yoga_pvr_p145_wiring.py at upstream 58f37ee5b, unchanged except this line. +"""Same-house definitions must not widen to any dusthana placement.""" +from pathlib import Path + +import pytest + +from scripts.yoga_engine import YogaContext, YogaEngine, SIGNS + +RULES = Path(__file__).resolve().parents[1] / 'references/yoga_rules.json' + + +@pytest.mark.parametrize('name,house', [('harsha', 6), ('sarala', 8), ('vimala', 12)]) +@pytest.mark.parametrize('ascendant', SIGNS) +def test_named_same_house_condition_all_ascendants(name, house, ascendant): + engine = YogaEngine(str(RULES)) + engine.rules = [r for r in engine.rules if r['id'] == f'bvr_{name}_yoga'] + assert not engine.unsupported_conditions(engine.rules[0]['logic']) + lord = YogaContext({}, ascendant).lord_of_house(house) + def run(target): + sign = SIGNS[(SIGNS.index(ascendant) + target - 1) % 12] + return engine.detect({lord: {'sign': sign, 'house': target}}, ascendant, + context={'chart_type': 'D1'}) + row, = run(house) + assert row['formation_status'] == 'conditions_met' + assert row['planets'] == [lord] + assert row['effects_en'] and 'p.145' in row['meaning_source_reference'] + assert row['card_eligible'] is False + for other in (6, 8, 12): + if other != house: + assert run(other) == [] + assert run(1) == [] diff --git a/tests/test_yoga_pvr_popular_wiring.py b/tests/test_yoga_pvr_popular_wiring.py new file mode 100644 index 000000000..19a66cfda --- /dev/null +++ b/tests/test_yoga_pvr_popular_wiring.py @@ -0,0 +1,59 @@ +# BUG-2301: the astrologer's tests/test_yoga_pvr_popular_wiring.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +"""Source-defined named placements, with missing-condition counterexamples.""" +from pathlib import Path +import pytest +from scripts.yoga_engine import YogaEngine, SIGNS + +RULES = Path(__file__).resolve().parents[1] / 'references/yoga_rules.json' + + +def detect(rule, asc, positions): + engine = YogaEngine(str(RULES)) + engine.rules = [r for r in engine.rules if r['id'] == rule] + assert not engine.unsupported_conditions(engine.rules[0]['logic']) + planets = {p: {'sign': s, 'house': (SIGNS.index(s)-SIGNS.index(asc)) % 12+1} + for p, s in positions.items()} + return engine.detect(planets, asc, context={'chart_type': 'D1'}) + + +def test_devendra_requires_both_named_house_exchanges(): + good = {'Mercury': 'Aquarius', 'Saturn': 'Gemini', 'Venus': 'Pisces', 'Jupiter': 'Taurus'} + row, = detect('bvr_devendra_yoga', 'Taurus', good) + assert set(row['planets']) == set(good) + for p in good: + assert detect('bvr_devendra_yoga', 'Taurus', {**good, p: 'Cancer'}) == [] + # Saturn Capricorn still owns Mercury's sign and Mercury still owns Gemini, + # but this is NOT the second/tenth house exchange required by PVR footnote35. + assert detect('bvr_devendra_yoga', 'Taurus', {**good, 'Mercury': 'Capricorn'}) == [] + + +def test_ravi_requires_sun_tenth_and_distinct_saturn_companion_in_third(): + good = {'Sun': 'Taurus', 'Venus': 'Libra', 'Saturn': 'Libra'} + row, = detect('bvr_ravi_yoga', 'Leo', good) + assert set(row['planets']) == set(good) + for p in good: + assert detect('bvr_ravi_yoga', 'Leo', {**good, p: 'Cancer'}) == [] + assert detect('bvr_ravi_yoga', 'Aries', {'Sun': 'Capricorn', 'Saturn': 'Gemini'}) == [] + + +def test_sreenaatha_both_conditions_and_sagittarius_restriction(): + row, = detect('bvr_sreenaatha_yoga', 'Sagittarius', {'Mercury': 'Virgo', 'Sun': 'Virgo'}) + assert set(row['planets']) == {'Mercury', 'Sun'} + assert detect('bvr_sreenaatha_yoga', 'Sagittarius', {'Mercury': 'Virgo', 'Sun': 'Leo'}) == [] + assert detect('bvr_sreenaatha_yoga', 'Sagittarius', {'Mercury': 'Gemini', 'Sun': 'Gemini'}) == [] + from scripts.yoga_engine import YogaContext, EXALTATION + for asc in SIGNS: + lord = YogaContext({}, asc).lord_of_house(7) + tenth = SIGNS[(SIGNS.index(asc)+9) % 12] + assert (EXALTATION.get(lord) == tenth) is (asc == 'Sagittarius') + + +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +@pytest.mark.parametrize('sign', ['Taurus', 'Libra', 'Pisces']) +def test_maalavya_dignity_and_kendra_are_both_required(sign): + row, = detect('bvr_maalavya_yoga', sign, {'Venus': sign}) + assert row['formation_status'] == 'conditions_met' + assert row['effects_en'] + assert row['card_eligible'] is False + assert detect('bvr_maalavya_yoga', SIGNS[(SIGNS.index(sign)-1) % 12], {'Venus': sign}) == [] + assert detect('bvr_maalavya_yoga', 'Cancer', {'Venus': 'Cancer'}) == [] diff --git a/tests/test_yoga_raja_bhanga_source.py b/tests/test_yoga_raja_bhanga_source.py new file mode 100644 index 000000000..3a07a9fc3 --- /dev/null +++ b/tests/test_yoga_raja_bhanga_source.py @@ -0,0 +1,46 @@ +# BUG-2301: the astrologer's tests/test_yoga_raja_bhanga_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(planets, asc='Leo', d9=None, phase=False): + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_raja_bhanga_yoga'] + return e.detect(planets, asc, context={ + 'd9': {'planets': {'Saturn': {'sign': d9}}}, + 'panchanga': {'is_waning_moon': phase}}) + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test298_native_d9_branch_survives_incomplete_other_paths(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + row = run({'Saturn': {'sign': 'Libra'}}, d9='Aries')[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['raman298_debilitated_navamsa'] + assert row['formation_evidence']['unresolved_other_paths'] + assert not row['formation_evidence']['raja_yogas_cancelled'] + assert not row['effects'] + assert 'No personal downfall' in row['traditional_effects_en'][0] + page = build_yoga_interpretation_pack({'yogas': [row]}, active_dasha_lords={'Saturn'})['pages'][0] + assert page['effect_assessment'] == row['effect_assessment'] + assert not page['claim_permissions']['event_outcome'] + assert '不自动取消' in page['sections']['result'] + assert run({'Saturn': {'sign': 'Libra'}, 'Sun': {'sign': 'Aries'}}, asc='Cancer') == [] + + +def test299_exact_point_not_all_of_libra_or_one_degree_orb(): + for degree in (9, 9.999, 10, 10.001, 11): + rows = run({'Sun': {'sign': 'Libra', 'longitude': 180 + degree}}, asc='Aries') + assert bool(rows) is (degree == 10) + row = run({'Sun': {'sign': 'Libra', 'longitude': 190, 'degree_in_sign': 9}}, asc='Aries')[0] + assert row['formation_status'] == 'incomplete_conditions' + + +def test_definition_aspect_alternative_is_not_silently_dropped(): + p = {name: {'house': 2, 'sign': 'Virgo'} for name in ALL_PLANETS} + p['Saturn'] = {'house': 3, 'sign': 'Libra'} + p['Jupiter'] = {'house': 9, 'sign': 'Aries'} + row = run(p, d9='Taurus')[0] + assert row['formation_evidence']['matched_paths'] == ['raman298_definition_benefic_aspect'] + p['Jupiter'] = {'house': 8, 'sign': 'Pisces'} + assert run(p, d9='Taurus') == [] diff --git a/tests/test_yoga_raman_strength_qualified.py b/tests/test_yoga_raman_strength_qualified.py new file mode 100644 index 000000000..f41e91f35 --- /dev/null +++ b/tests/test_yoga_raman_strength_qualified.py @@ -0,0 +1,97 @@ +# BUG-2301: the astrologer's tests/test_yoga_raman_strength_qualified.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import copy + +import pytest + +from scripts.yoga_engine import ALL_PLANETS, SIGNS, YogaEngine + + +def chart(): + return {p: {'house': 8} for p in ALL_PLANETS} + + +def detect(rule, planets, asc='Aries', phase=True): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == rule] + return engine.detect(planets, asc, context={'panchanga': {'is_waning_moon': phase}}) + + +def test_received_aspect_not_mars_outgoing_special_aspect(): + p = chart() + p['Mars']['house'] = 1 + p['Jupiter']['house'] = 4 # Mars -> Jupiter fourth; not Jupiter -> Mars. + p['Mercury']['house'] = p['Sun']['house'] = 2 + row = detect('bvr_bhratruvriddhi_precise', p)[0] + assert 'Jupiter' not in row['condition_checks']['mars']['benefic_witnesses'] + p['Jupiter']['house'] = 9 # Jupiter's fifth aspect now reaches Mars. + row = detect('bvr_bhratruvriddhi_precise', p)[0] + assert 'Jupiter' in row['condition_checks']['mars']['benefic_witnesses'] + assert row['formation_status'] == 'incomplete_conditions' + assert not row['effects'] + + +def test_third_house_connection_does_not_skip_strength_or_count_self_contact(): + p = chart() + p['Jupiter']['house'] = 3 + row = detect('bvr_bhratruvriddhi_precise', p, asc='Aquarius')[0] + assert 'Jupiter' not in row['condition_checks']['third_lord']['benefic_witnesses'] + assert row['condition_checks']['third_house']['benefic_witnesses'] == ['Jupiter'] + assert 'Third_house.source_admitted_composite_strength_profile' in row['missing_inputs'] + assert row['formation_evidence']['matched_paths'] == [] + + +@pytest.mark.parametrize('house', range(1, 13)) +def test_bhagya_jupiter_positions_require_actual_ninth_aspect(house): + p = chart() + p['Jupiter']['house'] = house + rows = detect('bvr_bhaagya_yoga', p) + assert bool(rows) == (house in (1, 3, 5)) + if rows: + assert rows[0]['formation_status'] == 'incomplete_conditions' + + +def test_bhagya_venus_cannot_copy_jupiter_special_aspects_or_fake_strength(): + p = chart() + p['Venus'] = {'house': 1, 'sign': 'Pisces', 'strong': True} + assert detect('bvr_bhaagya_yoga', p) == [] + p['Venus']['house'] = 3 + row = detect('bvr_bhaagya_yoga', p)[0] + assert row['condition_checks']['ninth_house_aspect_witnesses'] == ['Venus'] + assert row['formation_status'] == 'incomplete_conditions' + + +@pytest.mark.parametrize('asc', SIGNS) +def test_suputra_all_ascendants_and_no_dignity_substitution(asc): + p = {'Sun': {'sign': 'Aries', 'strong': True}, 'Jupiter': {'sign': 'Cancer'}} + rows = detect('bvr_suputhra_yoga', p, asc=asc) + assert bool(rows) == (asc in ('Leo', 'Scorpio')) + if rows: + assert rows[0]['formation_status'] == 'incomplete_conditions' + assert not rows[0]['effects'] + + +@pytest.mark.parametrize('rule', ['bvr_bhratruvriddhi_precise', 'bvr_bhaagya_yoga']) +def test_missing_phase_or_planet_not_negative(rule): + p = chart() + p['Jupiter']['house'] = 3 + for data, phase in [(p, None), ({k: v for k, v in p.items() if k != 'Mercury'}, True)]: + row = detect(rule, data, phase=phase)[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['missing_inputs'] + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_geometry_survives_interpretation_without_personal_outcomes(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + p = chart() + p['Jupiter']['house'] = 3 + row = detect('bvr_bhaagya_yoga', p)[0] + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert page['matched_geometry_paths'] + assert not page['claim_permissions']['named_formation'] + assert not page['claim_permissions']['event_outcome'] + assert page['sections']['result'] == row['effect_assessment']['summary_zh'] + # Irrelevant personal experiences cannot affect the geometry. + other = copy.deepcopy(p) + other['Jupiter']['user_feedback'] = 'wealthy and happy siblings' + assert detect('bvr_bhaagya_yoga', other) == [row] diff --git a/tests/test_yoga_remaining_strength_geometry.py b/tests/test_yoga_remaining_strength_geometry.py new file mode 100644 index 000000000..2b1583eb1 --- /dev/null +++ b/tests/test_yoga_remaining_strength_geometry.py @@ -0,0 +1,74 @@ +# BUG-2301: the astrologer's tests/test_yoga_remaining_strength_geometry.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(rule, planets, asc='Aries', context=None): + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == rule] + return e.detect(planets, asc, context=context) + + +def test_gandharva_geometry_never_substitutes_exaltation_for_strength(): + p = {'Mars': {'house': 7}, 'Saturn': {'house': 3}, + 'Jupiter': {'house': 1}, 'Sun': {'sign': 'Aries'}, 'Moon': {'house': 9}} + row = run('bvr_gandharva_yoga', p)[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['formation_evidence']['matched_paths'] == [] + assert row['formation_evidence']['matched_geometry_paths'] == ['pvr_four_clause_geometry'] + assert not row['effects'] + for planet, field, wrong in [('Mars', 'house', 6), ('Saturn', 'house', 5), + ('Sun', 'sign', 'Taurus'), ('Moon', 'house', 8)]: + bad = {name: dict(data) for name, data in p.items()} + bad[planet][field] = wrong + assert run('bvr_gandharva_yoga', bad) == [] + + +def test_gandharva_jupiter_self_reference_is_explicitly_unresolved(): + p = {'Jupiter': {'house': 1}, 'Mercury': {'house': 3}, + 'Sun': {'sign': 'Aries'}, 'Moon': {'house': 9}} + row = run('bvr_gandharva_yoga', p, asc='Sagittarius')[0] + assert any('self_association' in x for x in row['missing_inputs']) + assert row['formation_evidence']['matched_paths'] == [] + + +def test_maternal197_uses_d1_position_of_d9_dispositor_not_d9_house(): + # Aries L4 Moon D9 Taurus -> Venus in D1 fourth, angular from Moon tenth. + p = {'Moon': {'house': 10, 'sign': 'Capricorn'}, 'Venus': {'house': 4}} + ctx = {'d9': {'planets': {'Moon': {'sign': 'Taurus'}, 'Venus': {'house': 8}}}} + row = run('bvr_matrudeerghayur_yoga', p, context=ctx)[0] + assert row['formation_evidence']['matched_geometry_paths'] == ['raman197_geometry'] + assert row['formation_status'] == 'incomplete_conditions' + assert not row['effects'] + p['Venus']['house'] = 5 + assert run('bvr_matrudeerghayur_yoga', p, context=ctx) == [] + + +def test_maternal196_geometry_survives_missing_alternate_d9(): + p = {name: {'house': 2} for name in ALL_PLANETS} + p['Moon'] = {'house': 2, 'sign': 'Taurus'} + p['Jupiter']['house'] = 4 + row = run('bvr_matrudeerghayur_yoga', p, + context={'panchanga': {'is_waning_moon': False}})[0] + assert row['formation_evidence']['matched_geometry_paths'] == ['raman196_geometry'] + assert any('.D9.sign' in x for x in row['missing_inputs']) + assert any('composite_strength' in x for x in row['missing_inputs']) + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_partial_geometry_survives_report_without_becoming_formation_or_outcome(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + p = {'Mars': {'house': 7}, 'Saturn': {'house': 3}, + 'Jupiter': {'house': 1}, 'Sun': {'sign': 'Aries'}, 'Moon': {'house': 9}} + row = run('bvr_gandharva_yoga', p)[0] + page = build_yoga_interpretation_pack({'yogas': [row]}, active_dasha_lords={'Sun'})['pages'][0] + assert page['matched_geometry_paths'] == ['pvr_four_clause_geometry'] + assert page['evidence_label'] == 'parameter_sensitive' + assert page['sections']['result'] == row['effect_assessment']['summary_zh'] + assert not page['claim_permissions']['named_formation'] + assert not page['claim_permissions']['event_outcome'] + assert page['formation_facts']['raw_row']['missing_inputs'] + blocked = dict(row, formation_status='evaluation_error', condition_status='evaluation_error') + failed = build_yoga_interpretation_pack({'yogas': [blocked]})['pages'][0] + assert failed['evidence_label'] == 'blocked' + assert failed['sections']['result'] == '' diff --git a/tests/test_yoga_retirement_and_witnesses.py b/tests/test_yoga_retirement_and_witnesses.py new file mode 100644 index 000000000..801bf7912 --- /dev/null +++ b/tests/test_yoga_retirement_and_witnesses.py @@ -0,0 +1,76 @@ +# BUG-2301: the astrologer's tests/test_yoga_retirement_and_witnesses.py at upstream 58f37ee5b, unchanged except this line. +"""Retired rules cannot revive; predicate witnesses survive without guesswork.""" +import json +import subprocess +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / 'scripts')) +from yoga_engine import YogaEngine, YogaContext + +def test_retired_rule_and_algorithm_do_not_revive_with_empty_registry(tmp_path): + path=tmp_path/'rules.json' + path.write_text(json.dumps({'rules':[{'id':'veshi_yoga','enabled':True,'name':'Veshi Yoga', + 'name_cn':'old','logic':{'type':'custom','expr':'True'}}]})) + e=YogaEngine(str(path)) + rows=e.detect({'Sun':{'house':1},'Moon':{'house':2},'Rahu':{'house':12}},'Aries') + assert not any(r.get('rule_id')=='veshi_yoga' or r['name'] in {'Veshi Yoga','Voshi Yoga','Ubhayachari Yoga'} for r in rows) + +def test_custom_witness_does_not_include_failed_candidates(): + e=YogaEngine(str(ROOT/'references/yoga_rules.json')) + c=YogaContext({'Venus':{'house':2},'Jupiter':{'house':5}},'Aries') + rule={'logic':{'type':'custom','expr':"matches=[p for p in ['Venus','Jupiter'] if house_of(p)==2]\nbool(matches)", + 'participants_expr':'matches'}} + assert e._eval_rule(rule,c)[0]['bindings']['planets']==['Venus'] + +def test_lunar_kartari_requires_both_adjacent_houses(): + e=YogaEngine(str(ROOT/'references/yoga_rules.json')) + r=next(r for r in e.rules if r['id']=='shubha_kartari_moon') + p={'Moon':{'house':1},'Venus':{'house':1},'Jupiter':{'house':1}} + assert not e._eval_rule(r,YogaContext(p,'Aries')) + p['Jupiter']['house']=2 + assert not e._eval_rule(r,YogaContext(p,'Aries')) + p['Venus']['house']=12;p['Jupiter']['house']=2 + assert e._eval_rule(r,YogaContext(p,'Aries')) + +def test_historical_generators_refuse_live_target(): + target=ROOT/'references/yoga_rules.json' + before=target.read_bytes() + for script in ('generate_yoga_rules.py','add_high_confidence_yogas_batch1.py'): + result=subprocess.run([sys.executable,str(ROOT/'scripts'/script),'--output',str(target)],capture_output=True,text=True) + assert result.returncode!=0 + assert target.read_bytes()==before + +def test_archive_is_recoverable_but_cannot_execute(): + import pytest + archive=ROOT/'references/archive/yoga_rules_retired_2026_09_24.json' + data=json.loads(archive.read_text()) + assert len(data['rules'])==10 and data['retired_fallback_source'] + with pytest.raises(ValueError,match='Archived'): + YogaEngine(str(archive)) + +def test_compound_witnesses_retain_both_successful_conditions(): + e=YogaEngine(str(ROOT/'references/yoga_rules.json')) + c=YogaContext({'Venus':{'house':2},'Jupiter':{'house':5}},'Aries') + rule={'id':'fixture','name':'Fixture','name_cn':'测试','logic':{'type':'and','conditions':[ + {'type':'custom','expr':'True','participants_expr':"['Venus']"}, + {'type':'custom','expr':'True','participants_expr':"['Jupiter']"}]}} + e.rules=[rule] + assert set(e.detect(c.planets,'Aries')[0]['planets'])=={'Venus','Jupiter'} + +def test_mutual_aspect_is_two_directional_not_merely_quadrants(): + e=YogaEngine(str(ROOT/'references/yoga_rules.json')) + r=next(r for r in e.rules if r['id']=='raja_yoga_mutual_aspect') + p={'Mars':{'house':1},'Jupiter':{'house':4}} + assert not e._eval_rule(r,YogaContext(p,'Aries')) + p['Jupiter']['house']=7 + assert e._eval_rule(r,YogaContext(p,'Aries')) + +def test_benefic_influence_uses_the_incoming_aspect_and_distinct_planets(): + e=YogaEngine(str(ROOT/'references/yoga_rules.json')) + r=next(r for r in e.rules if r['id']=='bvr_satkalatra_precise') + assert not e._eval_rule(r,YogaContext({'Jupiter':{'house':1}},'Gemini')) + p={'Jupiter':{'house':1},'Venus':{'house':5}} + result=e._eval_rule(r,YogaContext(p,'Aries')) + assert result and result[0]['bindings']['planets']==[('Venus','Jupiter'),('Venus','Jupiter')] diff --git a/tests/test_yoga_reused_family_sources.py b/tests/test_yoga_reused_family_sources.py new file mode 100644 index 000000000..1eaf0335c --- /dev/null +++ b/tests/test_yoga_reused_family_sources.py @@ -0,0 +1,100 @@ +# BUG-2301: the astrologer's tests/test_yoga_reused_family_sources.py at upstream 58f37ee5b, unchanged except this line. +"""Source-specific positives plus previously stored negative fixtures.""" +import json +from pathlib import Path + +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + +ROOT = Path(__file__).resolve().parents[1] + + +def engine(): + e = YogaEngine(str(ROOT / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_dattha_puthra_yoga'] + return e + + +def test_dattaputra_reuses_existing_negative_without_treating_unknown_as_false(): + fixture = next(r for r in json.loads((ROOT / 'tests/yoga_test_suite.json').read_text()) + if r['rule_id'] == 'bvr_dattha_puthra_yoga')['false'] + assert engine().detect(fixture['planets'], fixture['asc']) == [] + + +def test_222_includes_mercury_aspect_not_just_conjunction(): + p = {planet: {'house': 2} for planet in ALL_PLANETS} + p.update(Mars={'house': 5}, Saturn={'house': 5}, Venus={'house': 2, 'sign': 'Gemini'}, + Mercury={'house': 8}) + row = engine().detect(p, 'Taurus')[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['raman222'] + p['Mercury']['house'] = 9 + assert engine().detect(p, 'Taurus') == [] + del p['Mercury'] + assert engine().detect(p, 'Taurus')[0]['formation_status'] == 'incomplete_conditions' + + +def test_223_needs_distinct_companion_not_merely_a_benefic_fifth_lord(): + p = {planet: {'house': 2} for planet in ALL_PLANETS} + p.update(Moon={'house': 11}, Saturn={'house': 5}, Venus={'house': 3}, Jupiter={'house': 3}) + context = {'panchanga': {'is_waning_moon': True}} + row = engine().detect(p, 'Capricorn', context=context)[0] + assert row['formation_evidence']['matched_paths'] == ['raman223'] + p['Jupiter']['house'] = 2 + assert engine().detect(p, 'Capricorn', context=context) == [] + + +def test_222_self_association_remains_explicit_not_a_free_match(): + p = {planet: {'house': 2} for planet in ALL_PLANETS} + p.update(Mars={'house': 5}, Saturn={'house': 5}, Mercury={'house': 1, 'sign': 'Gemini'}) + row = engine().detect(p, 'Gemini')[0] + assert row['formation_status'] == 'incomplete_conditions' + assert any('self_association' in field for field in row['missing_inputs']) + + +def test_vrana_retains_author_exception_and_qualifiers_without_diagnosis(): + e = YogaEngine(str(ROOT / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_vrana_yoga'] + planets = {p: {'house': 2} for p in ALL_PLANETS} + planets['Mars']['house'] = 10 + planets['Jupiter']['house'] = 6 + row = e.detect(planets, 'Scorpio', context={'panchanga': {'is_waning_moon': True}})[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['author_suggested_scorpio_exception'] + assert 'Jupiter' in row['formation_evidence']['benefic_aspect_witnesses'] + assert not row['effects'] and 'effects_en' not in row + assert row['effect_assessment']['status'] == 'historical_medical_reference' + assert e.detect(planets, 'Libra') == [] # L6 Jupiter not in author's list + planets['Mars']['house'] = 3 + assert e.detect(planets, 'Scorpio') == [] + + +def test_kushtaroga_independent_branches_retain_missing_alternative(): + e = YogaEngine(str(ROOT / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_kushtaroga_yoga'] + row = e.detect({'Mars': {'house': 4}, 'Mercury': {'house': 4}}, 'Aries')[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['raman268'] + assert row['formation_evidence']['unresolved_other_paths'] + assert not row['effects'] + planets = {'Mars': {'house': 2}, 'Mercury': {'house': 4}, + 'Jupiter': {'house': 6}, 'Saturn': {'house': 6}, 'Moon': {'house': 6}} + row = e.detect(planets, 'Aries')[0] + assert row['formation_evidence']['matched_paths'] == ['raman269'] + planets['Moon']['house'] = 7 + assert e.detect(planets, 'Aries') == [] + + +def test_pitta_requires_both_distinct_afflictions_and_no_node_aspect(): + e = YogaEngine(str(ROOT / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == 'bvr_pittharoga_yoga'] + planets = {p: {'house': 2} for p in ALL_PLANETS} + planets.update(Sun={'house': 6}, Mars={'house': 6}, Saturn={'house': 4}) + context = {'panchanga': {'is_waning_moon': False}} + row = e.detect(planets, 'Aries', context=context)[0] + assert row['formation_evidence']['witness_pairs'] == [('Mars', 'Saturn')] + assert not row['effects'] + planets['Saturn']['house'] = 2 + planets['Rahu']['house'] = 12 + assert e.detect(planets, 'Aries', context=context) == [] + del planets['Moon'] + assert e.detect(planets, 'Aries', context=context)[0]['formation_status'] == 'incomplete_conditions' diff --git a/tests/test_yoga_rule_batch_20261107.py b/tests/test_yoga_rule_batch_20261107.py index 4051a9221..b0dfc86ea 100644 --- a/tests/test_yoga_rule_batch_20261107.py +++ b/tests/test_yoga_rule_batch_20261107.py @@ -58,10 +58,18 @@ def test_one_planet_ruling_both_houses_is_not_a_two_lord_yoga() -> None: def test_twenty_three_observation_rules() -> None: observations = [rule for rule in RULES["rules"] if rule.get("claim_kind") == "structural_observation"] - assert len(observations) == 23 + # 原值:23 + # 新值:28 + # 原因:BUG-2301 照上游 58f37ee5b,她把 5 条贫困格局(daridra_2、daridra_yoga_6、daridra_yoga_combined、 + # daridra_yoga_2_lord_6_8_12、daridra_yoga_11_lord_6_8_12)改为结构观察(wealth_house_observation) + assert len(observations) == 28 for rule in observations: - assert rule["name"].endswith("(Observation)") and rule["name_cn"].endswith("(结构观察)") - assert rule["category"] == "observation" and rule["strength"] == "observation" + # BUG-2301: her five wealth-house observations end with "(structural observation)". + assert rule["name"].endswith(("(Observation)", "(structural observation)")) and rule["name_cn"].endswith("(结构观察)") + # BUG-2301: her five wealth-house observations keep their rule grade in `strength`; the engine still + # prints `observation` for every structural observation row (detect sets it from claim_kind). + assert rule["category"] == "observation" + assert rule["strength"] == "observation" or rule["id"].startswith("daridra") assert rule["traditional_effects"] and rule["legacy_name"] diff --git a/tests/test_yoga_rule_semantics_regressions.py b/tests/test_yoga_rule_semantics_regressions.py new file mode 100644 index 000000000..69f7e2972 --- /dev/null +++ b/tests/test_yoga_rule_semantics_regressions.py @@ -0,0 +1,186 @@ +# BUG-2301: the astrologer's tests/test_yoga_rule_semantics_regressions.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +"""Source-definition regressions; synthetic fixtures are not outcome cases.""" +from pathlib import Path +import sys +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts')) +from yoga_engine import YogaEngine, YogaContext + +RULES = Path(__file__).resolve().parents[1] / 'references/yoga_rules.json' + +@pytest.mark.skip(reason='BUG-2299 product note: rule id gajakesari is the strict PVR definition here (BUG-1596/BUG-1624); her pending review is on gajakesari_strong_jupiter_variant; awaits the astrologer') +def test_unadjudicated_yoga_keeps_match_but_not_unqualified_effects(): + fixtures = [ + ('gajakesari', {'Moon': {'house': 1, 'sign': 'Aries'}, + 'Jupiter': {'house': 4, 'sign': 'Cancer'}}), + ('bvr_matrunasa_precise', {'Moon': {'house': 1, 'sign': 'Aries'}, + 'Saturn': {'house': 1, 'sign': 'Aries'}}), + ] + for rule_id, planets in fixtures: + rows = YogaEngine(str(RULES)).detect(planets, 'Aries') + row = next(r for r in rows if r['rule_id'] == rule_id) + assert row['formation_status'] == 'method_requires_review' + assert row['effects'] == [] + assert row['traditional_effects'] + assert row['method_review']['status'] == 'pending' + assert row['condition_evidence']['definition'] + +def evaluate(rule_id, planets, ascendant='Aries', context=None): + engine = YogaEngine(str(RULES)) + rule = next(r for r in engine.rules if r['id'] == rule_id) + return engine._eval_rule(rule, YogaContext(planets, ascendant, context)) + +def test_nodes_do_not_create_solar_or_lunar_flanking_yogas(): + for rule_id, anchor in [('bvr_016_vesi_precise','Sun'), ('bvr_002_sunapha_precise','Moon')]: + assert not evaluate(rule_id, {anchor:{'house':1}, 'Ketu':{'house':2}, 'Rahu':{'house':12}}) + rows = evaluate(rule_id, {anchor:{'house':1}, 'Mercury':{'house':2}, 'Ketu':{'house':2}}) + assert rows and 'Mercury' in rows[0]['combination'] + assert 'Ketu' not in rows[0]['combination'] + assert '{planets}' not in rows[0]['combination'] + +def test_sun_does_not_disqualify_another_qualifying_lunar_flanker(): + assert evaluate('bvr_002_sunapha_precise', {'Moon':{'house':1},'Sun':{'house':2},'Venus':{'house':2}}) + +def test_legacy_nabhasa_detectors_do_not_resurrect_rejected_exact_rules(): + planets = {p:{'house':h,'sign':s} for p,h,s in [ + ('Sun',9,'Sagittarius'),('Moon',7,'Libra'),('Mars',12,'Pisces'), + ('Mercury',8,'Scorpio'),('Jupiter',2,'Taurus'),('Venus',8,'Scorpio'), + ('Saturn',7,'Libra'),('Rahu',4,'Cancer'),('Ketu',10,'Capricorn')]} + ids = {r['rule_id'] for r in YogaEngine(str(RULES)).detect(planets,'Aries')} + assert not ids.intersection({'chakra_nabhasa','vajra_nabhasa','bvr_chakra_yoga','bvr_084_vajra'}) + +def test_varga_same_sign_requires_actual_d9_and_matching_sign(): + planets={'Mars':{'house':1,'sign':'Aries'}} + assert not evaluate('varga_yoga_d1_d9_lord_same',planets) + assert not evaluate('varga_yoga_d1_d9_lord_same',planets,context={'d9':{'planets':{'Mars':{'sign':'Cancer'}}}}) + assert evaluate('varga_yoga_d1_d9_lord_same',planets,context={'d9':{'planets':{'Mars':{'sign':'Aries'}}}}) + +def test_posthumous_rule_requires_every_source_condition(): + # Raman no.242: Sun in 6/8/12, lord8 in9, lord12 in1, lord6 in5. + planets={'Sun':{'house':8},'Mars':{'house':9},'Jupiter':{'house':1},'Mercury':{'house':5}} + assert evaluate('bvr_jananatpurvam_pitru_marana_yog',planets) + for planet in planets: + changed={p:dict(row) for p,row in planets.items()} + changed[planet]['house']=3 + assert not evaluate('bvr_jananatpurvam_pitru_marana_yog',changed) + +def test_lord_conjunction_requires_two_distinct_planets(): + # Gemini and Virgo share Mercury for Leo: no self-conjunction. + assert not evaluate('dhana_yoga_2_11_lord',{'Mercury':{'house':8,'sign':'Pisces'}},'Leo') + +def test_all_in_houses_does_not_accept_missing_positions(): + engine=YogaEngine(str(RULES)) + ctx=YogaContext({'Sun':{'house':1},'Moon':{}},'Aries') + assert not engine._eval_rule({'logic':{'type':'all_in_houses','planets':{'role':'set','planets':['Sun','Moon']},'houses':[1,5,9]}},ctx) + +def test_parihasaka_uses_navamsa_dispositor_and_explicit_distinction(): + p={'Sun':{'house':9,'sign':'Aries'},'Venus':{'house':2,'sign':'Taurus'}} + context={'d9':{'planets':{'Sun':{'sign':'Libra'}}}} + rows=evaluate('bvr_parihasaka_yoga',p,context=context) + assert rows[0]['condition_status']=='incomplete_conditions' + context['vaiseshikamsa_confirmed']={'Venus':True} + assert evaluate('bvr_parihasaka_yoga',p,context=context)[0]['condition_status']=='conditions_met' + p['Venus']['house']=8 + assert not evaluate('bvr_parihasaka_yoga',p,context=context) + +def test_bp_hs_yoga_lords_do_not_inherit_jaimini_node_ownership(): + p={'Saturn':{'house':7,'sign':'Aquarius','degree':10}, + 'Rahu':{'house':4,'sign':'Scorpio','degree':20}, + 'Mars':{'house':12,'sign':'Cancer','degree':5},'Ketu':{'house':10,'sign':'Taurus','degree':20}} + ctx=YogaContext(p,'Leo') + assert ctx.lord_of_house(7)=='Saturn' + assert ctx.lord_of_house(4)=='Mars' + explicit=YogaContext(p,'Leo',{'lordship_profile':'jaimini_dynamic'}) + assert explicit.lord_of_house(7)==explicit._stronger_co_lord('Saturn','Rahu') + +def test_chakra_needs_all_seven_visible_planets_in_six_odd_houses(): + ps=['Sun','Moon','Mars','Mercury','Jupiter','Venus','Saturn'] + p={name:{'house':house} for name,house in zip(ps,[1,3,5,7,9,11,1])} + assert evaluate('bvr_chakra_yoga',p) + p['Sun']['house']=2 + assert not evaluate('bvr_chakra_yoga',p) + p['Sun']['house']=1 + p.pop('Saturn') + assert not evaluate('bvr_chakra_yoga',p) + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_missing_participants_are_not_reported_as_no_dasha_overlap(): + from professional_parity_closure import build_yoga_interpretation_pack + pack=build_yoga_interpretation_pack({'yogas':[{'name':'Test Yoga','combination':'custom condition satisfied'}]},active_dasha_lords={'Venus'}) + assert pack['pages'][0]['dasha_activation']['status']=='participants_unavailable' + assert pack['pages'][0]['evidence_label']=='parameter_sensitive' + +@pytest.mark.skip(reason='BUG-2301: this site lists participants in fixed planet order (BUG-1657 _PARTICIPANT_ORDER), not binding order') +def test_structured_match_keeps_participants_for_interpretation(): + p={'Sun':{'house':1,'sign':'Aries'},'Moon':{'house':5,'sign':'Leo'},'Venus':{'house':2,'sign':'Taurus'}} + rows=YogaEngine(str(RULES)).detect(p,'Aries') + row=next(r for r in rows if r['rule_id']=='bvr_016_vesi_precise') + assert row['planets']==['Venus','Sun'] + + +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +def test_source_native_english_fields_are_emitted_with_mahapurusha_match(): + rows = YogaEngine(str(RULES)).detect( + {'Mars': {'house': 1, 'sign': 'Aries'}}, 'Aries') + row = next(row for row in rows if row['rule_id'] == 'mahapurusha_mars_own') + assert row['combination_en'] == 'Mars is in a kendra (house 1, 4, 7, or 10) in its own sign.' + assert row['effects_en'] == ['Traditional indication: initiative, leadership, and success in contests'] + assert row['english_source_reference'].startswith('PVR Integrated Approach, p.129') + + +@pytest.mark.skip(reason='BUG-2301: these JSON rules are reference_only here; Pancha Mahapurusha / Moolatrikona / Maalavya run on the main detector (BUG-1205/BUG-1207); the dual path waits for the astrologer') +def test_sasa_meaning_retains_source_and_mixed_traits_in_both_languages(): + rows = YogaEngine(str(RULES)).detect({'Saturn': {'house': 1, 'sign': 'Aquarius'}}, 'Aquarius') + row = next(row for row in rows if row['rule_id'] == 'mahapurusha_saturn_own') + assert row['meaning_source_reference'] == row['english_source_reference'] + assert '摇摆不定' in ' '.join(row['effects']) + assert 'vacillation' in ' '.join(row['effects_en']) + assert '领域领军' not in ' '.join(row['effects']) + # The registry's meaning is tied to the preserved paragraph, not to a + # generic leadership template or a synthetic successful-life outcome. + import os + # Frozen runtime tests use the read-only source corpus as a test fixture; + # the customer runtime does not need to bundle entire copyrighted books. + book_root = Path(os.environ.get('JYOTISH_BOOK_TEST_ROOT', str(RULES.parent))) + book = (book_root / 'book_corpus/books/PVR_Integrated_Approach.md').read_text() + paragraph = book.split('###### **11.4.3** **_Sasa Yoga_**', 1)[1].split('###### **11.4.4**', 1)[0] + assert 'some vacillation' in paragraph and 'He is charitable' in paragraph + + +@pytest.mark.skip(reason="BUG-2301: this site's English twins (BUG-1418, E2/E3) render the chart's own combination; her registry English (english_delivery) only fills gaps; English effects wait for the owner's sample (plan step 7)") +def test_source_native_english_fields_are_emitted_with_pvr_solar_yoga_match(): + rows = YogaEngine(str(RULES)).detect( + {'Sun': {'house': 1, 'sign': 'Aries'}, 'Mercury': {'house': 2, 'sign': 'Taurus'}}, 'Aries') + row = next(row for row in rows if row['rule_id'] == 'bvr_016_vesi_precise') + assert row['combination_en'] == 'One or more qualifying planets are in the second house from the Sun.' + assert row['effects_en'] == [ + 'Traditional meaning: balance, truthfulness and contentment with modest means; the text also mentions tallness and sluggishness, not established personal traits or outcomes' + ] + assert row['english_source_reference'].startswith('PVR Integrated Approach, p.125') + + +@pytest.mark.skip(reason="BUG-2301: this site's English twins (BUG-1418, E2/E3) render the chart's own combination; her registry English (english_delivery) only fills gaps; English effects wait for the owner's sample (plan step 7)") +def test_source_native_english_fields_are_emitted_with_pvr_lunar_yoga_match(): + rows = YogaEngine(str(RULES)).detect( + {'Moon': {'house': 1, 'sign': 'Aries'}, 'Venus': {'house': 2, 'sign': 'Taurus'}}, 'Aries') + row = next(row for row in rows if row['rule_id'] == 'bvr_002_sunapha_precise') + assert row['combination_en'] == 'One or more qualifying planets are in the second house from the Moon.' + assert row['effects_en'] == [ + 'Traditional meaning: intelligence, self-earned wealth, recognition, and elevated standing; the text uses king or equal, not a specific modern occupation or guaranteed achievement' + ] + assert row['english_source_reference'].startswith('PVR Integrated Approach, p.127') + + +@pytest.mark.skip(reason="BUG-2301: this site's English twins (BUG-1418, E2/E3) render the chart's own combination; her registry English (english_delivery) only fills gaps; English effects wait for the owner's sample (plan step 7)") +def test_unregistered_english_fields_are_omitted_from_legacy_matches(): + rows = YogaEngine(str(RULES)).detect( + {'Sun': {'house': 1, 'sign': 'Aries'}, 'Mercury': {'house': 1, 'sign': 'Aries'}}, 'Aries') + row = next(row for row in rows if row['rule_id'] == 'budhaditya_yoga') + assert 'combination_en' not in row + assert 'effects_en' not in row + assert 'english_source_reference' not in row + +def test_ascendant_lord_alone_is_not_two_distinct_house_lordships(): + from yogas_doshas import calc_raj_yogas + rows=calc_raj_yogas({'Sun':{'sign':'Aries','house':9}},{'H1_Lord':'Sun'})['yogas'] + assert not any(r.get('subtype')=='dual_lordship' and 'Sun' in r['combination'] for r in rows) diff --git a/tests/test_yoga_saarada_source.py b/tests/test_yoga_saarada_source.py new file mode 100644 index 000000000..d14408033 --- /dev/null +++ b/tests/test_yoga_saarada_source.py @@ -0,0 +1,30 @@ +# BUG-2301: the astrologer's tests/test_yoga_saarada_source.py at upstream 58f37ee5b, unchanged except this line. +import pytest +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(change=None): + p = {name: {'house': 2, 'sign': 'Taurus'} for name in ALL_PLANETS} + p.update(Saturn={'house': 5}, Mercury={'house': 4}, Sun={'house': 5, 'sign': 'Leo'}, + Moon={'house': 12}, Mars={'house': 11}, Jupiter={'house': 8}) + if change: + planet, data = change + p[planet] = data + e = YogaEngine('references/yoga_rules.json') + e.rules = [r for r in e.rules if r['id'] == 'bvr_saarada_yoga'] + return e.detect(p, 'Aries') + + +def test_geometry_retained_but_strength_not_invented(): + row = run()[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['formation_evidence']['matched_paths'] == [] + assert row['formation_evidence']['matched_geometry_paths'] == ['five_clause_geometry'] + assert not row['effects'] + + +@pytest.mark.parametrize('change', [('Saturn', {'house': 6}), ('Mercury', {'house': 3}), + ('Sun', {'house': 5, 'sign': 'Cancer'}), + ('Moon', {'house': 11}), ('Mars', {'house': 10})]) +def test_each_clause_required(change): + assert run(change) == [] diff --git a/tests/test_yoga_saraswathi_source_upstream58.py b/tests/test_yoga_saraswathi_source_upstream58.py new file mode 100644 index 000000000..4f5781077 --- /dev/null +++ b/tests/test_yoga_saraswathi_source_upstream58.py @@ -0,0 +1,43 @@ +# BUG-2301: the astrologer's tests/test_yoga_saraswathi_source.py at upstream 58f37ee5b, unchanged except this line. +"""PVR p143 positive, counterexample and missing-input source checks.""" +from pathlib import Path +import pytest +from scripts.yoga_engine import YogaEngine, SIGNS + + +@pytest.fixture(params=['saraswati_yoga', 'bvr_saraswathi_yoga']) +def engine(request): + e = YogaEngine(str(Path(__file__).resolve().parents[1] / 'references/yoga_rules.json')) + e.rules = [r for r in e.rules if r['id'] == request.param] + return e + + +def run(engine, placements): + return engine.detect({p: {'sign': SIGNS[h-1], 'house': h} + for p, h in placements.items()}, 'Aries', context={'chart_type': 'D1'}) + + +@pytest.mark.parametrize('house', [1, 2, 4, 5, 7, 9, 10]) +def test_each_allowed_house_includes_first_and_fifth(engine, house): + row, = run(engine, {'Jupiter': 9, 'Mercury': house, 'Venus': 2}) + assert row['formation_status'] == 'conditions_met' + assert row['formation_assessment']['status'] == 'formed_under_source' + assert not row['formation_assessment']['outcome_admitted'] + assert set(row['planets']) == {'Mercury', 'Jupiter', 'Venus'} + + +@pytest.mark.parametrize('planet', ['Mercury', 'Venus', 'Jupiter']) +def test_all_three_required_not_two_of_three(engine, planet): + assert not run(engine, {**{'Jupiter': 9, 'Mercury': 1, 'Venus': 2}, planet: 6}) + + +def test_missing_planet_stays_incomplete(engine): + row, = run(engine, {'Jupiter': 9, 'Mercury': 1}) + assert row['formation_status'] == 'incomplete_conditions' + assert 'Venus.house' in row['missing_inputs'] + assert not row['effects'] + + +@pytest.mark.parametrize('house,formed', [(1, True), (4, True), (5, True), (9, True), (2, False), (7, False), (10, False)]) +def test_jupiter_dignity_natural_friends_not_generic_good_house(engine, house, formed): + assert bool(run(engine, {'Jupiter': house, 'Mercury': 1, 'Venus': 2})) is formed diff --git a/tests/test_yoga_satkatha_source.py b/tests/test_yoga_satkatha_source.py new file mode 100644 index 000000000..905a6a701 --- /dev/null +++ b/tests/test_yoga_satkatha_source.py @@ -0,0 +1,39 @@ +# BUG-2301: the astrologer's tests/test_yoga_satkatha_source.py at upstream 58f37ee5b, unchanged except this line. +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(jupiter=11, mercury=6, d9='Pisces'): + planets = {p: {'house': 1} for p in ALL_PLANETS} + planets['Jupiter']['house'] = jupiter + planets['Mercury']['house'] = mercury + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == 'bvr_satkathadisravana_yoga'] + return engine.detect(planets, 'Aries', context={ + 'panchanga': {'is_waning_moon': True}, + 'd9': {'planets': {'Mercury': {'sign': d9}}}}) + + +def test_received_house_aspect_is_not_lord_aspect(): + row = run()[0] + assert row['condition_checks']['third_house_received_benefic_aspects'] == ['Jupiter'] + assert row['condition_checks']['third_lord_received_benefic_aspects'] == [] + assert row['formation_status'] == 'incomplete_conditions' + assert not row['effects'] + + +def test_remarks_tracks_lord_independently_of_house(): + row = run(jupiter=2, mercury=6)[0] + assert row['condition_checks']['third_house_received_benefic_aspects'] == [] + assert row['condition_checks']['third_lord_received_benefic_aspects'] == ['Jupiter'] + assert row['formation_evidence']['matched_geometry_paths'] == ['remarks_received_aspect'] + + +def test_d9_observation_never_automatically_satisfies_undefined_amsa(): + for d9 in ('Pisces', 'Virgo', None): + row = run(d9=d9)[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['condition_checks']['third_lord_d9_sign_observation'] == d9 + + +def test_known_absence_of_both_aspect_paths(): + assert run(jupiter=1, mercury=2) == [] diff --git a/tests/test_yoga_sirachcheda_source.py b/tests/test_yoga_sirachcheda_source.py new file mode 100644 index 000000000..e970d13c5 --- /dev/null +++ b/tests/test_yoga_sirachcheda_source.py @@ -0,0 +1,76 @@ +# BUG-2301: the astrologer's tests/test_yoga_sirachcheda_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +"""Literal Raman273 geometry, with no invented nature or disaster conclusion.""" +import pytest +from scripts.yoga_engine import YogaEngine, ALL_PLANETS + + +def detect(degree=1.0, lagna='Aries', **updates): + planets = {p: {'house': 2} for p in ALL_PLANETS} + planets.update(Mercury={'house': 4}, Venus={'house': 4}, + Sun={'house': 5, 'sign': 'Leo', 'degree_in_sign': 1.0}, + Rahu={'house': 5, 'sign': 'Leo', 'degree_in_sign': degree}) + planets.update(updates) + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == 'bvr_sirachcheda_yoga'] + return engine.detect(planets, lagna) + + +@pytest.mark.parametrize('degree,same', [(1.0, True), (1.499999, True), (1.5, False), (2.0, False)]) +def test_scope_alternatives_do_not_collapse(degree, same): + row = detect(degree)[0] + assert row['formation_status'] == 'incomplete_conditions' + alt = row['condition_checks']['source_scope_alternatives']['Sun'] + assert alt['shared_amsa_reading']['same_named_segment'] is same + assert alt['shared_amsa_reading']['status'] == ('incomplete' if same else 'not_met') + assert alt['planet_only_amsa_reading']['status'] == 'incomplete' + assert alt['saravali_nature_comparison']['Sun']['nature'] == 'benefic' + assert not alt['saravali_nature_comparison']['Sun']['default_raman_rule'] + assert not row['effect_assessment']['personal_outcome_established'] + assert not row['effects'] + + +def test_known_false_geometry_and_missing_coordinates_are_different(): + assert detect(Mercury={'house': 3}) == [] + assert detect(Rahu={'house': 6}) == [] + row = detect(Rahu={'house': 5})[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['condition_checks']['source_scope_alternatives']['Sun']['shared_amsa_reading']['same_named_segment'] is None + + +def test_both_solar_and_saturnian_paths_are_retained_without_votes(): + row = detect(Saturn={'house': 5, 'sign': 'Leo', 'degree_in_sign': 2.0})[0] + assert set(row['condition_checks']['source_scope_alternatives']) == {'Sun', 'Saturn'} + assert row['formation_evidence']['independent_support_count'] == 0 + + +def test_self_conjunction_does_not_establish_geometry(): + row = detect(lagna='Taurus')[0] + assert row['condition_checks']['sixth_lord_joins_venus'] is None + assert not row['formation_evidence']['matched_geometry_paths'] + assert any('self_association' in x for x in row['missing_inputs']) + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_report_projection_retains_both_readings_and_no_event_permission(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + row = detect(2.0)[0] + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert page['formation_facts']['raw_row']['condition_checks'] == row['condition_checks'] + assert not page['claim_permissions']['event_outcome'] + + +def test_literal_table_all_sixty_segments_and_even_sign_reversal(): + from scripts.yoga_engine import YogaContext, SIGNS + # Independently transcribed ten-row groups from the printed25 scan. + labels = ('MMBBBBMMMM' 'MMBBMBBBBB' 'BBBBBBMBBM' + 'MMMMMMBBBM' 'MBMMBBB BMM'.replace(' ', '') + + 'BMBBMBB BMB'.replace(' ', '')) + assert len(labels) == 60 + for index, sign in enumerate(SIGNS): + for segment in range(60): + ctx = YogaContext({'Mars': {'sign': sign, 'degree_in_sign': segment / 2 + .25}}, 'Aries') + row = ctx.saravali_shashtiamsa_comparison('Mars') + ordinal = segment + 1 if index % 2 == 0 else 60 - segment + assert row['ordinal'] == ordinal + assert row['nature'] == ('malefic' if labels[ordinal - 1] == 'M' else 'benefic') + assert row['admission_state'] == 'reference_only' diff --git a/tests/test_yoga_vidyut_source.py b/tests/test_yoga_vidyut_source.py new file mode 100644 index 000000000..63ee0ac3f --- /dev/null +++ b/tests/test_yoga_vidyut_source.py @@ -0,0 +1,90 @@ +# BUG-2301: the astrologer's tests/test_yoga_vidyut_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import copy + +import pytest + +from scripts.yoga_engine import SIGNS, SIGN_LORDS, YogaEngine + + +def detect(planets, asc='Aries'): + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == 'bvr_vidyut_yoga'] + return engine.detect(planets, asc) + + +# Independent transcription of PVR Table6; do not derive expected values from +# the implementation constant under test. +PEAKS = {'Sun': ('Aries', 10), 'Moon': ('Taurus', 3), + 'Mars': ('Capricorn', 28), 'Mercury': ('Virgo', 15), + 'Jupiter': ('Cancer', 5), 'Venus': ('Pisces', 27), + 'Saturn': ('Libra', 20)} + + +@pytest.mark.parametrize('asc', SIGNS) +def test_exact_points_all_ascendants_and_venus_self_reference(asc): + l1 = SIGN_LORDS[asc] + l11 = SIGN_LORDS[SIGNS[(SIGNS.index(asc) + 10) % 12]] + sign, degree = PEAKS[l11] + p = {planet: {'sign': sign} for planet in (l1, l11, 'Venus')} + p[l11]['degree_in_sign'] = degree + row = detect(p, asc)[0] + assert row['condition_checks']['deep_exaltation_degree'] == degree + assert row['condition_checks']['exact_peak'] is True + assert row['formation_status'] == ('incomplete_conditions' if l11 == 'Venus' else 'conditions_met') + assert not row['effect_assessment']['personal_outcome_established'] + assert not row['effects'] + + +@pytest.mark.parametrize('difference', [-1, -0.001, 0, 0.001, 1]) +def test_no_invented_orb_and_off_peak_observations_survive(difference): + p = {'Saturn': {'sign': 'Libra', 'longitude': 200 + difference}, + 'Venus': {'sign': 'Libra'}, 'Mars': {'sign': 'Cancer'}} + row = detect(p)[0] + assert row['condition_checks']['distance_from_peak_degrees'] == pytest.approx(abs(difference)) + assert (row['formation_status'] == 'conditions_met') is (difference == 0) + assert row['formation_evidence']['astrological_orb_assumed'] is False + assert row['formation_evidence']['matched_geometry_paths'] + + +@pytest.mark.parametrize('l1_sign', SIGNS) +def test_quadrant_is_from_lagna_lord_not_lagna(l1_sign): + p = {'Saturn': {'sign': 'Libra', 'degree_in_sign': 20}, + 'Venus': {'sign': 'Libra'}, 'Mars': {'sign': l1_sign}} + assert bool(detect(p)) == (l1_sign in ('Aries', 'Cancer', 'Libra', 'Capricorn')) + + +@pytest.mark.parametrize('degree_fields', [{}, {'degree_in_sign': True}, + {'degree_in_sign': float('nan')}, {'longitude': 200, 'degree_in_sign': 19}]) +def test_missing_or_inconsistent_degree_never_becomes_exact_peak(degree_fields): + p = {'Saturn': {'sign': 'Libra', **degree_fields}, + 'Venus': {'sign': 'Libra'}, 'Mars': {'sign': 'Cancer'}} + row = detect(p)[0] + assert row['formation_status'] == 'incomplete_conditions' + assert row['condition_checks']['degree_in_sign'] is None + assert row['missing_inputs'] + + +def test_wrong_sign_or_nonconjunction_rejects_even_if_peak_number_matches(): + assert not detect({'Saturn': {'sign': 'Virgo', 'degree_in_sign': 20}, + 'Venus': {'sign': 'Virgo'}, 'Mars': {'sign': 'Gemini'}}) + assert not detect({'Saturn': {'sign': 'Libra', 'degree_in_sign': 20}, + 'Venus': {'sign': 'Aries'}, 'Mars': {'sign': 'Cancer'}}) + row = detect({'Saturn': {'sign': 'Libra', 'degree_in_sign': 20}, + 'Venus': {'sign': 'Libra'}})[0] + assert row['formation_status'] == 'incomplete_conditions' + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_source_geometry_and_restrictions_reach_interpretation_without_feedback(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + p = {'Saturn': {'sign': 'Libra', 'degree_in_sign': 20}, + 'Venus': {'sign': 'Libra'}, 'Mars': {'sign': 'Cancer'}} + row = detect(p)[0] + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert not page['claim_permissions']['event_outcome'] + assert page['effect_assessment'] == row['effect_assessment'] + assert page['formation_facts']['raw_row']['condition_checks'] == row['condition_checks'] + assert page['formation_facts']['raw_row']['formation_evidence']['matched_geometry_paths'] + other = copy.deepcopy(p) + other['Saturn']['user_feedback'] = 'Works in technology and is wealthy' + assert detect(other) == [row] diff --git a/tests/test_yoga_yuddha_source.py b/tests/test_yoga_yuddha_source.py new file mode 100644 index 000000000..c3541943c --- /dev/null +++ b/tests/test_yoga_yuddha_source.py @@ -0,0 +1,68 @@ +# BUG-2301: the astrologer's tests/test_yoga_yuddha_source.py at upstream 58f37ee5b, unchanged except the skip markers (reasons inline). +import pytest +from scripts.yoga_engine import ALL_PLANETS, YogaEngine + + +def run(d3='Gemini', d1='Aries', d9='Taurus', mars_house=2, mercury_house=3): + planets = {p: {'sign': 'Taurus', 'house': 2} for p in ALL_PLANETS} + planets['Mercury'] = {'sign': d1, 'house': mercury_house} + planets['Mars']['house'] = mars_house + context = {'d3': {'planets': {'Saturn': {'sign': d3}}}, + 'd9': {'planets': {'Mercury': {'sign': d9}}}} + engine = YogaEngine('references/yoga_rules.json') + engine.rules = [r for r in engine.rules if r['id'] == 'bvr_yuddha_marana_yoga'] + return engine.detect(planets, 'Aries', context=context) + + +@pytest.mark.parametrize('kwargs', [dict(d1='Aries'), dict(d1='Scorpio'), + dict(d1='Taurus', d9='Aries'), dict(d1='Taurus', d9='Scorpio'), + dict(d1='Taurus', mars_house=12, mercury_house=3), + dict(d1='Taurus', mars_house=9, mercury_house=3), + dict(d1='Taurus', mars_house=8, mercury_house=3)]) +def test_three_independent_source_alternatives(kwargs): + row = run(**kwargs)[0] + assert row['formation_status'] == 'conditions_met' + assert row['formation_evidence']['matched_paths'] == ['saturn_d3_dispositor'] + assert row['condition_checks']['saturn_d3_dispositor']['dispositor'] == 'Mercury' + assert not row['effects'] + assert not row['effect_assessment']['personal_outcome_established'] + + +def test_d1_saturn_dispositor_is_not_d3_dispositor(): + # Saturn D1 Taurus points to Venus, but D3 Gemini points to Mercury. + row = run()[0] + assert row['condition_checks']['saturn_d3_dispositor']['dispositor'] == 'Mercury' + assert run(d1='Taurus')[0]['condition_checks']['saturn_d3_dispositor']['status'] == 'not_met' + + +def test_missing_d3_or_d9_is_not_false_and_positive_d1_survives(): + assert run(d3=None)[0]['formation_status'] == 'incomplete_conditions' + assert run(d1='Taurus', d9=None)[0]['formation_status'] == 'incomplete_conditions' + assert run(d9=None)[0]['formation_status'] == 'conditions_met' + + +@pytest.mark.skip(reason='BUG-2301: needs her scripts/jyotish_engine.py cmd_yoga / varga adapter changes (planet_statuses, D3 context); jyotish_engine.py is sealed here') +def test_native_varga_adapter_propagates_actual_d3(): + from scripts.jyotish_engine import _build_yoga_context_from_vargas + from scripts.varga import calc_all_vargas + # The adapter consumes the native shape; no synthetic D3 arithmetic here. + chart = {'D3_Drekkana': {'Saturn': {'sign': 'Gemini', 'sign_idx': 2}, + 'Ascendant': {'sign': 'Aries'}}} + context = _build_yoga_context_from_vargas(chart) + assert context['d3']['planets']['Saturn']['sign'] == 'Gemini' + assert context['d3']['planets']['Saturn']['house'] == 3 + assert 'd3' not in _build_yoga_context_from_vargas({}) + actual = calc_all_vargas({'Saturn': 45.0}, 0.0, [3]) + assert _build_yoga_context_from_vargas(actual)['d3']['planets']['Saturn']['sign'] == 'Virgo' + + +@pytest.mark.skip(reason='BUG-2301: checks her report pack (professional_parity_closure.build_yoga_interpretation_pack); this site builds yoga pages in pl9_interpretation_packs, gated per tests/test_yoga_effect_gate_2300.py') +def test_projection_retains_alternative_without_outcome_permission(): + from scripts.professional_parity_closure import build_yoga_interpretation_pack + row = run()[0] + page = build_yoga_interpretation_pack({'yogas': [row]})['pages'][0] + assert page['formation_facts']['raw_row']['condition_checks'] == row['condition_checks'] + assert not page['claim_permissions']['event_outcome'] + assert page['sections']['result'] == row['effect_assessment']['summary_zh'] + assert page['sections']['theme'] == '' + assert '不代表原文作用兑现' in page['sections']['activation']