diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 31fd442b7..371a79eea 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -30701,3 +30701,24 @@ - 防复发:「新增星盘」弹窗和星盘档案共用表单之后,保存按钮的可用条件也只用星盘档案的同一套「还差」;暂时不能合盘的情况放在选择页的说明里讲,不放在保存按钮上卡人。 - 关联记录:BUG-2240(共用表单)、BUG-2083(合盘选择页点名不能用的人)、BUG-2144、BUG-2062。 - 修复版本:`claude/unknown-time-save-2278`(本地提交,待推送)。 + +## BUG-2280 | 落陷星检测到缓解(落陷取消)条件时,给用户写「落陷;缓解条件待核」「有没有缓解还没核实」,说法两可 + +- 状态:fixed-pending-verify +- 首次发现 / 最近更新:2026-11-23(上线当晚,占星师建议、负责人拍板)/ 2026-11-24 +- 现象:行星表里写「木星 落陷;缓解条件待核」「土星 落陷;缓解条件待核」。星盘页、报告、年运、问答里也有「有没有缓解还没核实」「缓解条件待核」「这些条件还没有核实」等写法。 +- 负责人 11-23:「只要有缓解信息,就直接改成缓解……既然有信息支持有缓解,说明就具有这个缓解取消的能力,因为印度占星的流派纷杂,我们只需要给出相关信息特质就行,不要给用户模棱两可的表达。」 +- 根因:BUG-2169 / BUG-2268 / BUG-2269 / BUG-2241 按占星师 11-22 §4 E 表把落陷取消分成「已核」和「待核」两档。今天规则库里没有一行能到 formed_under_source,所以所有检测到的缓解都成了「待核」,用户只看到两可的说法。 +- 修复(一句话:检测到缓解条件就一律写「落陷;有缓解」,已核和待核同一句;核实状态只留在后台数据): + - 星盘页:`chart-board-model.ts` 两个标签都改成「落陷;有缓解」;`chart-yoga-groups.ts` 支持卡写「X落陷;有缓解」,正文写「落陷不变;有缓解:条件」,不利卡的缓解行写「有缓解,见支持组合」;分盘表跟随。 + - 报告:`neecha_witness.py` 短格两档都写「落陷;有缓解」/ "Debilitated; mitigated",表下说明和脚注改成「X有缓解:…;原始的落陷不变」,不再写「这里不按已缓解处理」;`reading_facts.py` 两个读者标签都写「落陷;有缓解」;`pl9_interpretation_packs.py` 落陷取消页的三层说明两档同一句,条件行都叫「满足的条件」;`yoga_status_words.py` 和 `yoga-status-words.ts` 的格局表里,Neecha Bhanga 行由「检测器检出,待核实」「命中候选规则,尚未完整确认」改写「有缓解」/ "Mitigated"(键不变,其他格局行不变)。 + - 年运:替换表把「有取消条件被检出,但仍有待核实」改写成「有缓解」。 + - 问答:卡片标签、`neechaCandidateStatusWithConditions`、证据包分析句和「见取消说明」指针都改成有缓解;`chat-answer-checks.ts` 把旧的「缓解条件待核」「有没有缓解还没核实」「有没有能补回的条件还要再核」统一换成「落陷,但有缓解」/「有缓解」;`consultation-internal-words.ts` 的「落陷取消条件已满足」等换成「落陷,但有缓解」;`chat-answer-tables.ts` C9 改写成「落陷(有缓解)」;去掉事实核对里 BUG-2169 的 `neecha_mitigation` 拦截(说有缓解不再算不符);回答规则 `product-voice.ts` 改成「卡上写有缓解就写落陷,但有缓解,不写待核」;个人报告兜底句去掉「有没有能补回的条件还要再核」。 + - 合约:`references/product_runtime_contract.md` 在 G-26 后加一条 BUG-2280,说明上一条分档写法给用户的部分作废。 + - 范围照旧:缓解只针对落陷带来的那一项不利,原始落陷不变,不说成入旺或变得有力;只有自我参照、不成立或未计算的仍只写「落陷」。冻结文件没有改。 +- 验证: + - 新增 `frontend/tests/neecha-plain-2280.test.ts`:所有标签同一句;星盘页、问答卡、证据包、改写表、年运、回答规则和报告 Python 源码里不出现「缓解条件待核」「有没有缓解还没核实」「不说它有缓解」「这些条件还没有核实」等;旧说法被改写;格局表 Neecha Bhanga 行写「有缓解」,其他格局不变。 + - 改写的旧测试(都注明原值 / 新值 / 原因):`neecha-card-2169`(整体改写)、`chart-severe-2268`、`chart-board-20261027`、`chart-view-varga-dignity`、`chart-yoga-groups-2226`、`chat-aspects-2241`、`chat-plain-body-2247`、`consult-fact-guard-dignity-2020`、`consult-internal-words-1948`、`evidence-pack-cancel-1987`、`body-fallback-2148`、`annual-user-layer-2037`、`report-backstage-words-2269`;Python `test_acceptance_1123_regression`、`test_reading_facts_neecha_2169`、`test_report_english_edition`、`test_report_fixes_2105`、`test_report_neecha_short_cell_2155`、`test_report_neecha_state_2165`、`test_report_reader_main`、`test_report_wording_2024`。 +- 防复发:守卫测试扫描用户可见和模型可见的源码,出现两可说法即失败。 +- 关联记录:BUG-2169、BUG-2165、BUG-2155、BUG-2241、BUG-2262、BUG-2268、BUG-2269(本条取代它们对用户的落陷取消写法)。 +- 修复版本:分支 `claude/neecha-plain-2280`(待父会话推送)。 diff --git a/frontend/src/lib/annual-report-sections.ts b/frontend/src/lib/annual-report-sections.ts index e18e17d68..d463df5a9 100644 --- a/frontend/src/lib/annual-report-sections.ts +++ b/frontend/src/lib/annual-report-sections.ts @@ -1073,7 +1073,8 @@ const ANNUAL_READER_PATTERNS: readonly (readonly [RegExp, string])[] = [ // 「……被检出为候选格局,但尚未完整确认」「……有取消条件被检出,但仍有待核实」 [/被?检出为候选(?:格局)?[,,]?\s*(?:但)?(?:尚未|还没有?)完整确认/gu, "是按规则筛出的候选"], // 原值: 换成「有缓解因素」,把待核抬成了有;新值同问答;原因: BUG-2269。 - [/有取消条件被检出[,,]?\s*(?:但)?(?:仍|还)?有待核实/gu, "有没有缓解还没核实"], + // BUG-2280 原值「有没有缓解还没核实」/ 新值「有缓解」/ 原因:负责人 11-23,检测到缓解条件就说有缓解。 + [/有取消条件被检出[,,]?\s*(?:但)?(?:仍|还)?有待核实/gu, "有缓解"], // 「钱这一块缺少证据等级所需的计算依据,只写到看得出的方向」 [/缺少证据等级所需的计算依据/gu, "目前还不能明确判断"], // BUG-2269: a raw status code the model copied (old material) never reaches the reader. diff --git a/frontend/src/lib/chart-board-model.ts b/frontend/src/lib/chart-board-model.ts index edc3d9d2d..899506665 100644 --- a/frontend/src/lib/chart-board-model.ts +++ b/frontend/src/lib/chart-board-model.ts @@ -170,12 +170,14 @@ export function stepSelection(model: BoardModel, selection: BoardSelection, dire */ /** * BUG-2268 (占星师 11-19 / 11-22 E 表): a detected neecha bhanga is not a verdict. Unverified — the only - * state the chart page has today, its yoga rows carry no D1 scope — reads 「落陷;缓解条件待核」 and - * stays on the 落陷 step; verified reads 「落陷;另有缓解条件」 with her sentence as the detail. + * state the chart page has today, its yoga rows carry no D1 scope — reads 「落陷;有缓解」 (BUG-2280; was 「落陷;缓解条件待核」) and + * stays on the 落陷 step; verified reads the same words with her sentence as the detail. */ // BUG-2268 follow-up 原值「落陷,有没有缓解还没核实」/「落陷(有缓解因素)」/ 新值:她 11-22 §4 E 表原句,和报告全线同一句 / 原因:星盘页和报告说法要一致。 -export const NEECHA_UNVERIFIED_LABEL = "落陷;缓解条件待核"; -export const NEECHA_VERIFIED_LABEL = "落陷;另有缓解条件"; +// BUG-2280 (负责人 2026-11-23) 原值 未核「落陷;缓解条件待核」/ 已核「落陷;另有缓解条件」/ 新值:一律「落陷;有缓解」/ +// 原因:检测到缓解条件就说有缓解,不给用户两可的说法;和报告、问答同一句。 +export const NEECHA_UNVERIFIED_LABEL = "落陷;有缓解"; +export const NEECHA_VERIFIED_LABEL = "落陷;有缓解"; export const NEECHA_VERIFIED_DETAIL = "这一配置的不利影响有缓解因素,但不能据此认为困难全部消失。"; // BUG-2268 原值 ["落陷取消", 1, "落陷取消"] / 新值见下 / 原因:「落陷取消」读起来是定论,和格局卡「待核」矛盾。 diff --git a/frontend/src/lib/chart-view-varga.ts b/frontend/src/lib/chart-view-varga.ts index a4f77669b..703bd80ce 100644 --- a/frontend/src/lib/chart-view-varga.ts +++ b/frontend/src/lib/chart-view-varga.ts @@ -25,7 +25,7 @@ const VARGA_MEANING: Readonly> = tables.vargaMeaning; /** * The D1 table's words for a divisional chart's dignity. BUG-2268 原值:引擎原文「入旺(Exalted)」等, - * 带英文括号 / 新值:去掉括号,和 D1 表同一套中文;落陷取消同样写「落陷;缓解条件待核」/ 原因:分盘表没清理过。 + * 带英文括号 / 新值:去掉括号,和 D1 表同一套中文;落陷取消同样写「落陷;有缓解」(BUG-2280)/ 原因:分盘表没清理过。 */ export const VARGA_DIGNITY_LABEL: Readonly> = Object.fromEntries( Object.entries(tables.dignityLabels as Record).map(([level, label]) => [ diff --git a/frontend/src/lib/chart-yoga-groups.ts b/frontend/src/lib/chart-yoga-groups.ts index c35cf8033..d359c2363 100644 --- a/frontend/src/lib/chart-yoga-groups.ts +++ b/frontend/src/lib/chart-yoga-groups.ts @@ -7,7 +7,7 @@ * formed_under_source, BUG-2268), excluding the unfavourable classes. * - 支持组合: structures with no complete yoga name that still support an area — a sign exchange, * a lord in its own house, an exalted body — plus a debilitated body whose mitigation the detector - * found but nobody has checked (「落陷;缓解条件待核」, ruling E three states; BUG-2268). + * found (「落陷;有缓解」, BUG-2280; was 「落陷;缓解条件待核」, BUG-2268). * - 不利结构: the unfavourable rules (状态「留意」), one card per body so several rules on the same * Mercury count once, each with the mitigating structures that involve that body. * @@ -235,7 +235,7 @@ export function buildYogaGroups(input: Readonly<{ if (!id || seen.has(id) || HIDDEN_CATEGORIES.has(String(row.category ?? ""))) continue; const planets = rowPlanets(row); if (isNeecha(row)) { - // Ruling E: a detected mitigation is 「缓解条件待核」; the debilitation itself stays. + // BUG-2280: a detected mitigation is 「有缓解」 (owner 11-23; was ruling E 「缓解条件待核」); the debilitation itself stays. for (const planet of planets.length ? planets : []) { const key = `neecha:${planet}`; if (seen.has(key)) continue; @@ -248,7 +248,7 @@ export function buildYogaGroups(input: Readonly<{ id: key, group: "support", name: `${zh(planet)}${verified ? NEECHA_VERIFIED_LABEL : NEECHA_UNVERIFIED_LABEL}`, alias: null, text: verified ? `${zh(planet)}落陷不变;${NEECHA_VERIFIED_DETAIL}` - : `${zh(planet)}落陷不变${conditions.length ? `;检测到${conditions.join("、")},缓解条件待核` : ";缓解条件待核"}。`, + : `${zh(planet)}落陷不变${conditions.length ? `;有缓解:${conditions.join("、")}` : ";有缓解"}。`, tags: [], same: false, planets: [planet], diagram: { kind: "place", a: planet, label: body ? `落陷,第 ${body.house} 宫` : "落陷" }, }); @@ -343,7 +343,7 @@ export function buildYogaGroups(input: Readonly<{ if (card.planets.includes(planet) && !card.name.includes("落陷")) mitigations.push(`缓解:${card.name}`); } if (body && DEBILITATED[planet] === body.sign && support.some((card) => card.id === `neecha:${planet}`)) { - mitigations.push("缓解条件待核,见支持组合"); + mitigations.push("有缓解,见支持组合"); // BUG-2280 原值「缓解条件待核,见支持组合」 } } adverse.push({ diff --git a/frontend/src/lib/chat-answer-checks.ts b/frontend/src/lib/chat-answer-checks.ts index a624af2be..512fa65cb 100644 --- a/frontend/src/lib/chat-answer-checks.ts +++ b/frontend/src/lib/chat-answer-checks.ts @@ -609,8 +609,10 @@ export const OWNER_CHAT_WORDING: ReadonlyArray = [ [/条件看上去满足/gu, "条件对上了,还没核实"], [/(?:按所选规则的形成条件)?成立[;;,、]\s*强度和结果另评/gu, "成立,作用多大另看"], [/强度和结果另评/gu, "作用多大另看"], - [/落陷[;;,、]?\s*(?:缓解条件(?:还)?待核实?|落陷取消的条件还待核实)/gu, "落陷,有没有缓解还没核实"], - [/落陷取消的条件还待核实|缓解条件(?:还)?待核实?/gu, "有没有缓解还没核实"], + // BUG-2280 原值「落陷,有没有缓解还没核实」「有没有缓解还没核实」/ 新值「落陷,但有缓解」「有缓解」/ 原因:负责人 11-23, + // 检测到缓解条件就说有缓解,不给用户两可的说法。旧回答或旧卡里的「有没有缓解还没核实」也一并换掉。 + [/落陷[;;,、]?\s*(?:缓解条件(?:还)?待核实?|落陷取消的条件还待核实|有没有缓解还没(?:有)?核实)/gu, "落陷,但有缓解"], + [/落陷取消的条件还待核实|缓解条件(?:还)?待核实?|有没有缓解还没(?:有)?核实|有没有能补回的条件还要再核/gu, "有缓解"], [/命中候选规则[,、,]\s*尚未完整确认/gu, "条件只对上一部分"], [/只(?:算|能算)一种方法的指向(?:窗口)?|只有一种方法指向、另一种没有对上|两套推时间的方法没有在这里对上/gu, "只有一种方法指到这里"], [/有前提的时间段/gu, "有条件的时间段"], @@ -641,7 +643,7 @@ export function ownerChatWording(text: string): { output: string; replaced: stri // 「只有一种方法指到这里,只有一种方法指到这里」 after two old phrases met: left to dropRepeats. // BUG-2247: a replacement is a whole clause; a 「是」 or 「为」 left in front of it (「不利影响有缓解因素是条件对上了,还没核实」) // becomes a comma, and the same status said twice in a row (「还没核实、还没核实」) is said once. - output = output.replace(/([^,,。;;::\s])(?:是|为)(条件对上了,还没核实|有没有缓解还没核实|条件只对上一部分|作用多大另看)/gu, "$1,$2"); + output = output.replace(/([^,,。;;::\s])(?:是|为)(条件对上了,还没核实|条件只对上一部分|作用多大另看)/gu, "$1,$2"); output = output.replace(/(还没核实|还待核实|待核实)(?:[、,,]\s*(?:还没核实|还待核实|待核实|待核))+/gu, "$1"); return { output, replaced }; } diff --git a/frontend/src/lib/chat-answer-tables.ts b/frontend/src/lib/chat-answer-tables.ts index d82080af8..a6dd612ed 100644 --- a/frontend/src/lib/chat-answer-tables.ts +++ b/frontend/src/lib/chat-answer-tables.ts @@ -659,10 +659,11 @@ export function checkSentenceAgainstTables(sentence: string, card: TableCard, do // C9 status words: a pending neecha bhanga or a candidate yoga written as established. const neecha = /落陷(?:已经|已|得到|确实|被)(?:取消|化解)(?:了)?(?![^。]{0,30}(?:待核|没有核实|未核|还没))|落陷(?:取消|化解)(?:了|已经?成立|成立|已生效)(?![^。]{0,30}(?:待核|没有核实|未核|还没))/; - if (neecha.test(text) && /木星/.test(text) && String(card.natal.planets?.Jupiter?.status ?? "").includes("待核")) { + if (neecha.test(text) && /木星/.test(text) && /待核|有缓解/.test(String(card.natal.planets?.Jupiter?.status ?? ""))) { const m = text.match(neecha)!; - text = text.replace(m[0], "落陷(缓解条件待核)"); - subs.push({ kind: "status_neecha", note: `${m[0]} → 落陷(缓解条件待核)` }); + // BUG-2280 原值「落陷(缓解条件待核)」/ 新值「落陷(有缓解)」/ 原因:负责人 11-23;落陷本身不消失,只说有缓解。 + text = text.replace(m[0], "落陷(有缓解)"); + subs.push({ kind: "status_neecha", note: `${m[0]} → 落陷(有缓解)` }); } const formed = /([A-Z][A-Za-z-]+(?: [A-Z][A-Za-z-]+)* Yoga)[^。,;]{0,10}?(已经|已|确实)?(成立|成形|形成)(?![^。]{0,4}待)/; const fm = text.match(formed); diff --git a/frontend/src/lib/consultation-answer-fact-guard.ts b/frontend/src/lib/consultation-answer-fact-guard.ts index c4eb57426..8dec7c708 100644 --- a/frontend/src/lib/consultation-answer-fact-guard.ts +++ b/frontend/src/lib/consultation-answer-fact-guard.ts @@ -348,14 +348,12 @@ export function findAnswerFactClaims(answer: string, card: EvidenceCard): Answer let offset = 0; const saturnMoon = saturnMoonFacts(card); const nodes = nodeSignFacts(card); - const neechaCandidates = neechaCandidatePlanets(card); const slow = slowTransitFacts(card); const transitHouses = transitHouseFacts(card, view.d1Lagna); const coverageRows = (() => { try { return periodCoverageRows(card); } catch { return []; } })(); for (const line of answer.split("\n")) { checkLine(line, offset, view, push); checkDignity(line, offset, push); - if (neechaCandidates.size) checkNeechaMitigation(line, offset, neechaCandidates, push); if (saturnMoon) checkSaturnOnMoon(line, offset, saturnMoon, push); checkTransitDated(line, offset, slow, push); if (nodes) checkNodeOnPlanet(line, offset, nodes, push); @@ -872,41 +870,11 @@ function checkDignity(line: string, offset: number, push: Emit) { } } -/** - * BUG-2169 (占星师 2026-11-22 §4 E 表): a planet whose card status is 「落陷;缓解条件待核」 (the Neecha - * Bhanga row is detector-only, not verified) must not be written as having mitigation. A clause that names - * exactly that one planet and says its debilitation is mitigated / cancelled, without a pending word, is a - * mismatch. Words that keep it pending (待核、待核实、没有核实、未核实、不说它有缓解) pass. +/* + * BUG-2280 (负责人 2026-11-23): removed the BUG-2169 neecha_mitigation check. It flagged 「X的落陷有缓解」 when the + * card said 「落陷;缓解条件待核」; every detected mitigation is now written 「落陷;有缓解」 on the card, in reports and on + * the chart page, so saying the debilitation has mitigation is no longer a mismatch. */ -const NEECHA_MITIGATION_CLAIM = /另有缓解(?:条件)?|有缓解(?:条件|因素)?|已(?:经)?(?:被)?(?:缓解|化解|取消)|落陷(?:已|被)?(?:取消|化解)|缓解了|化解了/u; -// BUG-2241: 「有没有缓解还没核实」 (the owner's chat wording) is pending too. -const NEECHA_PENDING = /待核|待核实|没有核实|未核实|尚未核实|还没核实|不说它有缓解|不说有缓解|还要再核/u; - -function neechaCandidatePlanets(card: EvidenceCard): Set { - const planets = (card as unknown as { base?: { natal?: { planets?: Record } } }) - .base?.natal?.planets ?? {}; - const out = new Set(); - for (const [name, row] of Object.entries(planets)) { - if (typeof row?.status === "string" && row.status.startsWith("落陷;缓解条件待核")) out.add(name); - } - return out; -} - -function checkNeechaMitigation(line: string, offset: number, candidates: Set, push: Emit) { - for (const clause of splitProse(line, 0, /[。!?;;\n]/u)) { - const text = line.slice(clause.start, clause.end); - if (!NEECHA_MITIGATION_CLAIM.test(text) || NEECHA_PENDING.test(text)) continue; - const planets = [...new Set([...text.matchAll(PLANET_RE)].map((hit) => PLANET_NAMES[hit[0]]!))]; - if (planets.length !== 1 || !candidates.has(planets[0]!)) continue; - const planet = planets[0]!; - push({ - kind: "neecha_mitigation", layer: "落陷缓解", entity: planet, reference: "落陷取消核实状态", - claimed: `${PLANET_ZH[planet]}的落陷有缓解`, card: `${PLANET_ZH[planet]}落陷;缓解条件待核(不说它有缓解,也不说没有)`, - fact_id: `neecha:${planet}`, source_path: "base.natal.planets.status", - quote: text, start: offset + clause.start, end: offset + clause.end, - }); - } -} /** Every explicit-layer claim in the answer that the card contradicts. */ export function findAnswerFactMismatches(answer: string, card: EvidenceCard): AnswerFactMismatch[] { diff --git a/frontend/src/lib/consultation-evidence-card.ts b/frontend/src/lib/consultation-evidence-card.ts index 6a1c117b1..2d8a8d7d7 100644 --- a/frontend/src/lib/consultation-evidence-card.ts +++ b/frontend/src/lib/consultation-evidence-card.ts @@ -1515,11 +1515,14 @@ export const NEECHA_BHANGA_ENGINE_LABEL = "落陷取消(Neecha Bhanga)"; // 原因:分层规则,规则口吻(取消条件已满足)留在后台;回答照抄了这个标签。成立条件仍在格局行里。 // BUG-2163 原值「落陷;这一配置的不利影响有缓解因素,但不能据此认为困难全部消失」/ 新值:她 11-22 §4(E)「已核」的短写法加该行边界 / // 原因:表格与正文按真实状态分开写;引擎标签「落陷取消(Neecha Bhanga)」是默认规则成立(报告侧 reading_facts.NEECHA_BHANGA_READER_ZH 同一句)。 -export const NEECHA_BHANGA_CARD_LABEL = "落陷;另有缓解条件,不代表困难全部消失"; +// BUG-2280 (负责人 2026-11-23) 原值「落陷;另有缓解条件,不代表困难全部消失」/ 新值「落陷;有缓解」/ 原因:已核、待核一句话, +// 和报告 reading_facts.NEECHA_BHANGA_READER_ZH 同一句(report-wording-2024 钉住)。 +export const NEECHA_BHANGA_CARD_LABEL = "落陷;有缓解"; // BUG-2169 (她 11-22 §4 E 表): 「另有缓解条件」 only when the Neecha Bhanga row on the card has the yoga table's // verified status (formation formed_under_source, BUG-2165 neecha_witness). A detector-only row // (the computed status in yoga-status-words.ts, today every row) is a candidate. Was: every engine label became the verified sentence. -export const NEECHA_CANDIDATE_CARD_LABEL = "落陷;缓解条件待核"; +// BUG-2280 原值「落陷;缓解条件待核」/ 新值:和已核同一句 / 原因:负责人 11-23,有缓解就写有缓解;核实状态只留在格局行。 +export const NEECHA_CANDIDATE_CARD_LABEL = "落陷;有缓解"; /** BUG-2039: her user sentence with the conditions that hold (默认规则), for the model's reasoning. */ export function neechaBhangaStatusWithConditions(conditions: readonly string[]): string { @@ -1528,7 +1531,8 @@ export function neechaBhangaStatusWithConditions(conditions: readonly string[]): /** BUG-2169: a candidate planet's status with the detected conditions, never as established mitigation. */ export function neechaCandidateStatusWithConditions(conditions: readonly string[]): string { - return `${NEECHA_CANDIDATE_CARD_LABEL}(检测到的条件:${conditions.join(";")};还没有核实,回答里不说它有缓解,也不说没有)`; + // BUG-2280 原值「(检测到的条件:…;还没有核实,回答里不说它有缓解,也不说没有)」/ 新值见下 / 原因:负责人 11-23。 + return `${NEECHA_CANDIDATE_CARD_LABEL}(缓解来自:${conditions.join(";")};缓解只针对落陷带来的那一项不利,落陷位置不变)`; } /** BUG-2169: true when a Neecha Bhanga yoga row carries the verified formation status. */ diff --git a/frontend/src/lib/consultation-internal-words.ts b/frontend/src/lib/consultation-internal-words.ts index b7b8ba3a3..44da86f8b 100644 --- a/frontend/src/lib/consultation-internal-words.ts +++ b/frontend/src/lib/consultation-internal-words.ts @@ -225,9 +225,10 @@ const PHRASE_RE = new RegExp(Object.keys(CHAT_PHRASES).join("|"), "gu"); export const BASIS_ONLY_WORDS: Readonly> = { // BUG-2030(占星师 11-19 第二次答复,分层规则):落陷取消和出生时间分界的规则口吻换成她给用户的说法。 // BUG-2169 原值「落陷,不利影响有缓解因素」/ 新值「落陷,缓解条件待核」/ 原因:她 11-22 §4 E 表,今天的落陷取消都是检测器检出、未核实。 - "落陷取消条件已满足": "落陷,缓解条件待核", - "落陷取消条件满足": "落陷,缓解条件待核", - "落陷取消条件成立": "落陷,缓解条件待核", + // BUG-2280 原值「落陷,缓解条件待核」/ 新值「落陷,但有缓解」/ 原因:负责人 11-23,检测到缓解条件就说有缓解。 + "落陷取消条件已满足": "落陷,但有缓解", + "落陷取消条件满足": "落陷,但有缓解", + "落陷取消条件成立": "落陷,但有缓解", "落陷取消成立": "落陷,不利影响有缓解因素", "落陷已取消": "落陷的不利影响有缓解因素", "落陷取消": "不利影响有缓解因素", diff --git a/frontend/src/lib/evidence-pack.ts b/frontend/src/lib/evidence-pack.ts index 26837a8d5..7f8565d03 100644 --- a/frontend/src/lib/evidence-pack.ts +++ b/frontend/src/lib/evidence-pack.ts @@ -248,11 +248,13 @@ export function cancellationSentence(edge: EvidenceEdge): string { if ((edge as EvidenceEdge & { verified?: boolean }).verified === true) { return `${name}本命${sign ? `在${sign}` : ""}落陷,已满足落陷取消条件${conditions ? `:${conditions}` : ""}。` + `这不等于${name}入旺,也不代表相关困难全部消失。` - + `提到${name}时说成落陷、另有缓解条件,不代表困难全部消失;缓解只针对因落陷而来的那一项不利判断,${name}的落陷位置不变,` + + `提到${name}时说成落陷,但有缓解;缓解只针对因落陷而来的那一项不利判断,${name}的落陷位置不变,` + `它受到的其他压力照样算,不因此算作另一个格局,也不说它变得有力。`; } - return `${name}本命${sign ? `在${sign}` : ""}落陷;检测到可能缓解它的条件${conditions ? `:${conditions}` : ""},这些条件还没有核实。` - + `提到${name}时说成落陷、缓解条件待核:不说它有缓解,也不说没有;按落陷本身和其他条件来写,` + // BUG-2280 原值「…这些条件还没有核实。提到时说成落陷、缓解条件待核:不说它有缓解,也不说没有…」/ 新值见下 / + // 原因:负责人 11-23,检测到缓解条件就说有缓解。 + return `${name}本命${sign ? `在${sign}` : ""}落陷;有缓解它的条件${conditions ? `:${conditions}` : ""}。` + + `提到${name}时说成落陷,但有缓解;缓解只针对因落陷而来的那一项不利判断,${name}的落陷位置不变,` + `它受到的其他压力照样算,不算作另一个格局,也不说它变得有力。`; } return `规则自带的取消条件已满足,它指向的那一项效应按规则取消${witnessed}。取消不删掉原来的位置,也不因此推出相反的结论。`; @@ -486,8 +488,8 @@ export function buildEvidencePack( // BUG-2169 原值一律「(落陷的不利有缓解因素,见取消说明)」/ 新值:未核实写「缓解条件待核」/ 原因:她 11-22 §4 E 表 if (!cancelled.has(entry.evidence_id)) continue; entry.what = verifiedTargets.has(entry.evidence_id) - ? `${String(entry.what)}(落陷的不利有缓解因素,见取消说明)` - : `${String(entry.what)}(落陷;缓解条件待核,见取消说明)`; + ? `${String(entry.what)}(落陷;有缓解,见取消说明)` + : `${String(entry.what)}(落陷;有缓解,见取消说明)`; // BUG-2280 原值 未核「(落陷;缓解条件待核,见取消说明)」 } } diff --git a/frontend/src/lib/personal-report-reading-fallback.ts b/frontend/src/lib/personal-report-reading-fallback.ts index 735790c35..b9d843aa3 100644 --- a/frontend/src/lib/personal-report-reading-fallback.ts +++ b/frontend/src/lib/personal-report-reading-fallback.ts @@ -70,7 +70,7 @@ const lifeAreas: Readonly> = { */ const signConditions: readonly [RegExp, string][] = [ // BUG-2163: 待核的缓解(她 11-22 §4)不说成已有能补回的条件;须排在下一条前面。 - [/^落陷;缓解条件待核/u, "所在的星座对它不利,有没有能补回的条件还要再核"], + // BUG-2280: 原值先把「落陷;缓解条件待核」写成「有没有能补回的条件还要再核」;新值去掉,有缓解都走下一条。 [/^落陷.*缓解/u, "所在的星座对它不利,有些条件能补回一部分,但不利的一面仍在"], [/^落陷/u, "所在的星座对它不利,要看其他条件能补回多少"], [/^(?:入旺|入庙|自宫)/u, "所在的星座对它很有利"], diff --git a/frontend/src/lib/yoga-status-words.ts b/frontend/src/lib/yoga-status-words.ts index 4514c13bc..a57f69450 100644 --- a/frontend/src/lib/yoga-status-words.ts +++ b/frontend/src/lib/yoga-status-words.ts @@ -50,6 +50,18 @@ function blocked(gap: string): YogaStatus { * 一个格局行(`card.base.natal.yogas_detail.rows[]`)的状态。`row` 缺失 = 只在 hits 里出现、卡上没有状态行。 * `notEvaluated` 为 true 表示该名字在 `yogas_detail.not_evaluated` 里。 */ +/** + * BUG-2280 (负责人 2026-11-23,占星师建议): a Neecha Bhanga row the detector found reads 「有缓解」 for readers, not + * 「检测器检出,待核实」 / 「命中候选规则,尚未完整确认」. Same as scripts/report_render/yoga_status_words.py. + */ +export const NEECHA_MITIGATED_TEXT = "有缓解"; + +function isNeechaRow(row: Rec): boolean { + const ruleId = (text(row.rule_id) ?? "").toLowerCase(); + return ruleId.includes("neecha_bhanga") || (text(row.category) ?? "").toLowerCase() === "neecha_bhanga" + || (text(row.name) ?? "").toLowerCase().startsWith("neecha bhanga"); +} + export function yogaStatus(row: Rec | undefined, options: { notEvaluated?: boolean } = {}): YogaStatus { if (!row) return blocked(options.notEvaluated ? YOGA_GAP_NOT_EVALUATED : YOGA_GAP_NO_ROW); const formation = text(rec(row.formation).status); @@ -58,13 +70,15 @@ export function yogaStatus(row: Rec | undefined, options: { notEvaluated?: boole if (formation === "conditions_not_met") return { key: "conditions_not_met", text: YOGA_STATUS_MAPPING.conditions_not_met.text }; const status = text(row.status); const claim = text(row.claim_status); + const neecha = isNeechaRow(row); for (const key of ["candidate", "computed", "blocked"] as const) { if (status && YOGA_STATUS_MAPPING[key].evidence.includes(status)) { - return key === "blocked" ? blocked(`状态为 ${status}`) : { key, text: YOGA_STATUS_MAPPING[key].text }; + if (key === "blocked") return blocked(`状态为 ${status}`); + return { key, text: neecha ? NEECHA_MITIGATED_TEXT : YOGA_STATUS_MAPPING[key].text }; } } if ((claim && YOGA_STATUS_MAPPING.candidate.evidence.includes(claim)) || formation === "candidate") { - return { key: "candidate", text: YOGA_STATUS_MAPPING.candidate.text }; + return { key: "candidate", text: neecha ? NEECHA_MITIGATED_TEXT : YOGA_STATUS_MAPPING.candidate.text }; } if (options.notEvaluated) return blocked(YOGA_GAP_NOT_EVALUATED); return blocked(status ? `状态值 ${status} 不在映射表内` : "卡上这条格局没有状态值"); diff --git a/frontend/src/mastra/product-voice.ts b/frontend/src/mastra/product-voice.ts index 937c36806..1c488c47f 100644 --- a/frontend/src/mastra/product-voice.ts +++ b/frontend/src/mastra/product-voice.ts @@ -178,7 +178,7 @@ ${DOWNGRADE_ROUTES}`; * names kept out of the body. Kept: plain explanation of every term (one fixed glossary), no grades / audit table / * software or book names / English status words (BUG-2115/2129/2130), no asking for past events and no use of the * user's history for predictions (feedback isolation), no guarantees, committed judgments (不推责, the product line word - * for word), plain method status, 落陷取消 as 待核 (BUG-2169), 罗睺 / 计都 and Chinese names, the public / backstage + * for word), plain method status, 落陷取消 as 「有缓解」 (BUG-2280; was 待核, BUG-2169), 罗睺 / 计都 and Chinese names, the public / backstage * boundary (BUG-1621, on the card), the biography and safety red lines and the downgrade routes. Carried over from * staging: a length the user asks for wins (BUG-2182); 「判断依据」 names the second timing system, the karakas and the * matching divisional chart (BUG-2150) and keeps the 「- **判断短句**:依据。(依据性质)」 line form (BUG-1981); a classical saying is its general meaning weighed in this chart (BUG-2153); @@ -201,7 +201,7 @@ const NO_BLAME_LINE = plainVoiceLine("- 不推责"); * annual-chart section; 「判断依据」 is one short line per judgment plus the keys of the card rows it rests on, and the program * prints those rows (chat-evidence-keys.ts). A user who uses the terms or asks for the basis gets them, glossed. * 原因: the owner reversed BUG-2229's 「正文写宫位和技法名」 now that the data is complete and the professional content is folded. - * Kept: red lines, 不推责, length priority (BUG-2182), yes / no first (BUG-1974), method status (now in 「判断依据」), 落陷取消待核 + * Kept: red lines, 不推责, length priority (BUG-2182), yes / no first (BUG-1974), method status (now in 「判断依据」), 落陷取消写「有缓解」(BUG-2280) * (BUG-2169), classical sayings weighed (BUG-2153), natal vs annual Sahams, Argala house numbers, the precomputed tables. */ export const chatConversationVoice = `VISIBLE VOICE @@ -225,7 +225,7 @@ export const chatConversationVoice = `VISIBLE VOICE - 用户说了范围(未来两年、到 2030 年):照他的范围写,仍按自然的段落合并,最多 8 条。 每条写成「- **2026 年 12 月到 2027 年 4 月:一个平常话的小标题**:这一段是什么样子;该做什么;别做什么」,不写原因、不讲星盘;这一段(或其中一部分)在土星压力段里就直说偏吃力(「这一段整体偏吃力,别给自己加量」「4 月初之前做事容易卡」);日期写到年月,只有真正的转折点才写到哪一天。每条末尾写〔〕和它合并的 period_coverage 行的编号(例如〔T3 T4〕),日期从这些行来:第一行的开始到最后一行的结束;「整段 / 前半 / 后半 / 偏吃力」照这些行的「土星压力段」写。不把每个细小的运期单独列一条。 ## 要留意的:几条风险,每条写什么时候、会是什么样子、怎么应对。 -## 判断依据:正文每条判断一条,按正文的顺序,写成「- **判断短句**:一句说明。(依据性质)〔编号〕」。〔〕里写这条判断用到的表行编号(precomputed_tables 里每行前面的〔〕,例如〔H10 Sa D10 FB〕),程序会把这些行原样列出来,所以这里不抄数据、不重复正文的话。「一句说明」只写表行里没有的:两套推时间的方法 Vimshottari 和 Narayana 有没有指到同一段(卡上 Narayana 标为候选、起算有一步没定时写「只有一种方法指到这里」)、格局的状态(照卡上状态,待核就写待核)、落陷有没有缓解(待核就写待核)、年盘或 Mudda 带来的变化、卡上 classical_texts 的「传统说法:大意;在这张盘里:哪些条件撑住或削弱它」;没有这些就只写编号。这句说明最多 40 个字,不写宫位、星座、度数、分数、个数和运期日期(这些都在编号的行里,再写一遍就是重复;行里没有的数字和「相等」这类比较不写)。首轮大约 8 到 12 条:按正文的判断写,时间线不单独成条(程序把时间线各段合成一条),要留意的几条用到的行并进相关判断那一条。括号里的依据性质从这几样里选:几种方法一致、只有一种方法支持、出生时间稍有出入就会变、相关分盘还没核实、不同方法对这段时间说法不同,不写字母等级。时间线各段的编号已经写在正文那几条后面,这里不再列。卡上算出、又和用户问的事有关的第二套运程的当前段和下一段(Narayana、Chara)、Jaimini 代表星(AmK、DK 等)、对口的分盘,都在相关那一条的编号里带上(例如〔N1 AmK D10〕)。说明里写到木星土星同时作用某一块时,Position 写「进入」,Aspect 写「照到」,不写「经过」。 +## 判断依据:正文每条判断一条,按正文的顺序,写成「- **判断短句**:一句说明。(依据性质)〔编号〕」。〔〕里写这条判断用到的表行编号(precomputed_tables 里每行前面的〔〕,例如〔H10 Sa D10 FB〕),程序会把这些行原样列出来,所以这里不抄数据、不重复正文的话。「一句说明」只写表行里没有的:两套推时间的方法 Vimshottari 和 Narayana 有没有指到同一段(卡上 Narayana 标为候选、起算有一步没定时写「只有一种方法指到这里」)、格局的状态(照卡上状态,待核就写待核)、落陷有没有缓解(卡上写有缓解就写「落陷,但有缓解」,不写待核)、年盘或 Mudda 带来的变化、卡上 classical_texts 的「传统说法:大意;在这张盘里:哪些条件撑住或削弱它」;没有这些就只写编号。这句说明最多 40 个字,不写宫位、星座、度数、分数、个数和运期日期(这些都在编号的行里,再写一遍就是重复;行里没有的数字和「相等」这类比较不写)。首轮大约 8 到 12 条:按正文的判断写,时间线不单独成条(程序把时间线各段合成一条),要留意的几条用到的行并进相关判断那一条。括号里的依据性质从这几样里选:几种方法一致、只有一种方法支持、出生时间稍有出入就会变、相关分盘还没核实、不同方法对这段时间说法不同,不写字母等级。时间线各段的编号已经写在正文那几条后面,这里不再列。卡上算出、又和用户问的事有关的第二套运程的当前段和下一段(Narayana、Chara)、Jaimini 代表星(AmK、DK 等)、对口的分盘,都在相关那一条的编号里带上(例如〔N1 AmK D10〕)。说明里写到木星土星同时作用某一块时,Position 写「进入」,Aspect 写「照到」,不写「经过」。 怎么写 - 卡上为这道题交付的层,和这件事有关的都要用进判断,正文只说它们带来的结果,依据写进「判断依据」那一条的编号或说明;对这件事不起作用的层不写,不列「中性」「用不上」的清单。 diff --git a/frontend/tests/annual-user-layer-2037.test.tsx b/frontend/tests/annual-user-layer-2037.test.tsx index 9fcf77db3..c42b8dbe1 100644 --- a/frontend/tests/annual-user-layer-2037.test.tsx +++ b/frontend/tests/annual-user-layer-2037.test.tsx @@ -133,8 +133,8 @@ test("the reader layer puts the plain birth-time line under the dependent item a test("reader wording: status words, disclaimers and the Saturn title", () => { const cases: Array<[string, string]> = [ ["土星与木星互换星座被检出为候选格局,但尚未完整确认;木星在摩羯座的落陷有取消条件被检出,但仍有待核实。这两条都只能当线索,不能当成结论。恋爱和结婚是两件事。", - // 原值:「……的落陷有缓解因素。」;新值:「……的落陷有没有缓解还没核实。」;原因:BUG-2269,「待核」不能抬成「有」 - "土星与木星互换星座是按规则筛出的候选;木星在摩羯座的落陷有没有缓解还没核实。恋爱和结婚是两件事。"], + // 原值:「……的落陷有没有缓解还没核实。」(BUG-2269);新值:「……的落陷有缓解。」;原因:BUG-2280,负责人 11-23 有缓解就写有缓解 + "土星与木星互换星座是按规则筛出的候选;木星在摩羯座的落陷有缓解。恋爱和结婚是两件事。"], ["钱这一块缺少证据等级所需的计算依据,只写到看得出的方向。", "钱这一块目前还不能明确判断,只写到看得出的方向。"], ["这一节暂不能判断。", "这一节目前还不能明确判断。"], ["家和学习是 Vimshottari 压力、Narayana看不出,这一节看不出,不细断。", "家和学习是 Vimshottari 压力、Narayana 没有明显指向,这一节看不出。"], diff --git a/frontend/tests/body-fallback-2148.test.ts b/frontend/tests/body-fallback-2148.test.ts index f475ada67..82bf256b9 100644 --- a/frontend/tests/body-fallback-2148.test.ts +++ b/frontend/tests/body-fallback-2148.test.ts @@ -58,9 +58,9 @@ test("a mitigated debilitation stays a condition, never 「问题已经消失」 facts.planets.Mars.d1_dignity_zh = "落陷;另有缓解条件,不代表困难全部消失"; const wealth = textOf("character", { ...facts, ascendant: { ...facts.ascendant, lord: "Mars" } }); assert.match(wealth, /火星所在的星座对它不利,有些条件能补回一部分,但不利的一面仍在/u); - // A candidate mitigation never reads as one that exists. - facts.planets.Mars.d1_dignity_zh = "落陷;缓解条件待核"; + // BUG-2280 原值:「落陷;缓解条件待核」写成「有没有能补回的条件还要再核」/ 新值:新标签「落陷;有缓解」和已核同一句 / 原因:负责人 11-23 + facts.planets.Mars.d1_dignity_zh = "落陷;有缓解"; const candidate = textOf("character", { ...facts, ascendant: { ...facts.ascendant, lord: "Mars" } }); - assert.match(candidate, /火星所在的星座对它不利,有没有能补回的条件还要再核/u); - assert.doesNotMatch(candidate, /有些条件能补回一部分/u); + assert.match(candidate, /火星所在的星座对它不利,有些条件能补回一部分,但不利的一面仍在/u); + assert.doesNotMatch(candidate, /还要再核/u); }); diff --git a/frontend/tests/chart-board-20261027.test.tsx b/frontend/tests/chart-board-20261027.test.tsx index 70ac4c182..22bb6ed11 100644 --- a/frontend/tests/chart-board-20261027.test.tsx +++ b/frontend/tests/chart-board-20261027.test.tsx @@ -203,7 +203,7 @@ test("dignity reads the engine's status label on a nine-step scale", () => { assert.deepEqual(dignityStep("入旺(Exalted)"), { step: 8, label: "入旺" }); assert.deepEqual(dignityStep("落陷(Debilitated)"), { step: 0, label: "落陷" }); // BUG-2268 原值 { step: 1, label: "落陷取消" } / 新值见下 / 原因:没核实的落陷取消不是定论,落陷照旧。 - assert.deepEqual(dignityStep("落陷取消(Neecha Bhanga)"), { step: 0, label: "落陷;缓解条件待核" }); + assert.deepEqual(dignityStep("落陷取消(Neecha Bhanga)"), { step: 0, label: "落陷;有缓解" }); assert.deepEqual(dignityStep("中性(Neutral) · 逆行"), { step: 3, label: "中性" }); assert.equal(dignityStep("—"), null); }); diff --git a/frontend/tests/chart-severe-2268.test.ts b/frontend/tests/chart-severe-2268.test.ts index 57925862f..b414e585d 100644 --- a/frontend/tests/chart-severe-2268.test.ts +++ b/frontend/tests/chart-severe-2268.test.ts @@ -56,8 +56,9 @@ test("B-S2: the table, the inspector, the divisional table and the yoga card say assert.equal(card.name, `月亮${NEECHA_VERIFIED_LABEL}`); assert.match(card.text, new RegExp(NEECHA_VERIFIED_DETAIL)); // 原值:断言源码不含「缓解条件待核」/ 新值:断言用她 11-22 §4 E 表原句,和报告同一句 / 原因:BUG-2268 follow-up,星盘页跟报告一致。 - assert.equal(NEECHA_UNVERIFIED_LABEL, "落陷;缓解条件待核"); - assert.equal(NEECHA_VERIFIED_LABEL, "落陷;另有缓解条件"); + // BUG-2280 原值「落陷;缓解条件待核」/「落陷;另有缓解条件」/ 新值:都写「落陷;有缓解」/ 原因:负责人 11-23 + assert.equal(NEECHA_UNVERIFIED_LABEL, "落陷;有缓解"); + assert.equal(NEECHA_VERIFIED_LABEL, "落陷;有缓解"); for (const source of ["../src/lib/chart-yoga-groups.ts", "../src/lib/chart-board-model.ts"]) { assert.doesNotMatch(code(source), /有没有缓解还没核实/u, source); } diff --git a/frontend/tests/chart-view-varga-dignity.test.ts b/frontend/tests/chart-view-varga-dignity.test.ts index 054b1ac73..ecf7fd853 100644 --- a/frontend/tests/chart-view-varga-dignity.test.ts +++ b/frontend/tests/chart-view-varga-dignity.test.ts @@ -19,7 +19,7 @@ test("every engine level has the D1 status wording", () => { assert.equal(VARGA_DIGNITY_LABEL.OWN_SIGN, "入庙"); assert.equal(VARGA_DIGNITY_LABEL.ENEMY, "入敌"); assert.equal(VARGA_DIGNITY_LABEL.NEUTRAL, "中性"); - assert.equal(VARGA_DIGNITY_LABEL.NEECHA_BHANGA, "落陷;缓解条件待核"); + assert.equal(VARGA_DIGNITY_LABEL.NEECHA_BHANGA, "落陷;有缓解"); // BUG-2280 原值「落陷;缓解条件待核」 for (const label of Object.values(VARGA_DIGNITY_LABEL)) assert.doesNotMatch(label, /[A-Za-z()]/u); assert.deepEqual(Object.keys(VARGA_DIGNITY_LABEL).sort(), [...VARGA_DIGNITY_LEVELS].sort()); }); diff --git a/frontend/tests/chart-yoga-groups-2226.test.ts b/frontend/tests/chart-yoga-groups-2226.test.ts index c16ae54dc..e830ca8a9 100644 --- a/frontend/tests/chart-yoga-groups-2226.test.ts +++ b/frontend/tests/chart-yoga-groups-2226.test.ts @@ -40,7 +40,8 @@ test("the 7th lord in its own sign is the same fact as Sasa; two daridra rules o assert.match(groups.adverse[0]!.text, /这一颗水星,这里合成一条/u); assert.ok(groups.adverse[0]!.tags.some((tag) => tag.startsWith("缓解:"))); // BUG-2268 原值「火星落陷,缓解条件待核」/ 新值见下 / 原因:和行星表、检视、分盘表同一句(B-S2)。 - assert.ok(groups.support.some((card) => card.name === "火星落陷;缓解条件待核")); + // BUG-2280 原值「火星落陷;缓解条件待核」/ 新值「火星落陷;有缓解」/ 原因:负责人 11-23 + assert.ok(groups.support.some((card) => card.name === "火星落陷;有缓解")); assert.ok(groups.support.some((card) => card.name === "水星与木星互换")); }); diff --git a/frontend/tests/chat-aspects-2241.test.ts b/frontend/tests/chat-aspects-2241.test.ts index f005e2b75..33ef31d35 100644 --- a/frontend/tests/chat-aspects-2241.test.ts +++ b/frontend/tests/chat-aspects-2241.test.ts @@ -212,7 +212,9 @@ test("BUG-2241: the owner's plain status wording in chat answers; the shared sou const cases: Array<[string, string]> = [ ["Sasa Yoga 条件看上去满足、待核实。", "Sasa Yoga 条件对上了,还没核实。"], ["Sasa Yoga 按所选规则的形成条件成立;强度和结果另评。", "Sasa Yoga 成立,作用多大另看。"], - ["木星落陷;缓解条件待核。", "木星落陷,有没有缓解还没核实。"], + // BUG-2280 原值「木星落陷,有没有缓解还没核实。」/ 新值「木星落陷,但有缓解。」/ 原因:负责人 11-23 + ["木星落陷;缓解条件待核。", "木星落陷,但有缓解。"], + ["木星落陷,有没有缓解还没核实。", "木星落陷,但有缓解。"], ["Gaja Kesari 命中候选规则,尚未完整确认。", "Gaja Kesari 条件只对上一部分。"], ["Narayana 起算的那一步有分歧,只算一种方法的指向。", "Narayana 从哪年起算还有分歧,只有一种方法指到这里。"], ["KP 只在前提成立时作依据。", "KP 有条件地作依据。"], @@ -227,8 +229,8 @@ test("BUG-2241: the owner's plain status wording in chat answers; the shared sou for (const [before, after] of cases) assert.equal(ownerChatWording(before).output, after, before); // The status words the chart page and reports read are unchanged. assert.equal(YOGA_STATUS_MAPPING.formed_under_source.text, "按所选规则的形成条件成立;强度和结果另评"); - // The neecha check reads the new pending wording as pending (no mismatch). - assert.deepEqual(kinds("木星落陷,有没有缓解还没核实。"), []); + // BUG-2280: saying the debilitation has mitigation is no mismatch any more (the neecha_mitigation check was removed). + assert.deepEqual(kinds("木星落陷,但有缓解。"), []); }); test("BUG-2241 (fresh answers on the final build): card notes and rule wording are dropped; natal restatements, D1 and bracketed claims read right", () => { diff --git a/frontend/tests/chat-plain-body-2247.test.ts b/frontend/tests/chat-plain-body-2247.test.ts index ab5139b1a..5bb5fcd78 100644 --- a/frontend/tests/chat-plain-body-2247.test.ts +++ b/frontend/tests/chat-plain-body-2247.test.ts @@ -177,7 +177,7 @@ test("BUG-2247: the wording mapping replaces whole phrases once, never leaves a assert.equal(clean("但金的另一面是花钱。资金的另一面是风险。"), "但金星的另一面是花钱。资金的另一面是风险。"); assert.equal( clean("## 时间线\n\n- **2027 年 3 月到 6 月:稳住**:别冒进(落陷取消的检测条件看上去满足,还待核实)。\n\n## 判断依据\n\n- **x**:落陷(缓解条件待核)。"), - "## 时间线\n\n- **2027 年 3 月到 6 月:稳住**:别冒进。\n\n## 判断依据\n\n- **x**:落陷(有没有缓解还没核实)。", + "## 时间线\n\n- **2027 年 3 月到 6 月:稳住**:别冒进。\n\n## 判断依据\n\n- **x**:落陷(有缓解)。", // BUG-2280 原值「落陷(有没有缓解还没核实)」 ); }); diff --git a/frontend/tests/chat-voice-2229.test.ts b/frontend/tests/chat-voice-2229.test.ts index c9c1b021e..c8a36ca50 100644 --- a/frontend/tests/chat-voice-2229.test.ts +++ b/frontend/tests/chat-voice-2229.test.ts @@ -37,7 +37,8 @@ test("BUG-2229: the plain chat voice is the sectioned voice; the old plain voice assert.match(voice, /不写软件和程序库的名字,不引书名/u); assert.match(voice, /不请用户回想过去的事来帮着推将来/u); // 原值:/落陷的缓解卡上是待核就写待核/;新值:/落陷有没有缓解(待核就写待核)/;原因:BUG-2247,这句改写在「判断依据」那一条的说明里。 - assert.match(voice, /落陷有没有缓解(待核就写待核)/u); + // BUG-2280 原值:/落陷有没有缓解(待核就写待核)/;新值:卡上写有缓解就写「落陷,但有缓解」;原因:负责人 11-23 + assert.match(voice, /落陷有没有缓解(卡上写有缓解就写「落陷,但有缓解」,不写待核)/u); assert.match(voice, /罗睺、计都/u); assert.match(voice, /AmK(事业代表星/u); assert.match(voice, /precomputed_tables/u); diff --git a/frontend/tests/consult-fact-guard-dignity-2020.test.ts b/frontend/tests/consult-fact-guard-dignity-2020.test.ts index 52e9f7e17..0ea1df343 100644 --- a/frontend/tests/consult-fact-guard-dignity-2020.test.ts +++ b/frontend/tests/consult-fact-guard-dignity-2020.test.ts @@ -33,7 +33,8 @@ test("the card states a cancelled debilitation in her words, not as 「落陷取 assert.equal(NEECHA_BHANGA_ENGINE_LABEL, "落陷取消(Neecha Bhanga)"); // BUG-2030 原值 /^落陷,落陷取消条件已满足(不等于入旺/ / 新值:她给用户的说法 / 原因:11-19 第二次答复的分层规则 // BUG-2163 原值「落陷;这一配置的不利影响有缓解因素,但不能据此认为困难全部消失」/ 新值:她 11-22 §4(E)短写法 / 原因:按真实状态写 - assert.equal(NEECHA_BHANGA_CARD_LABEL, "落陷;另有缓解条件,不代表困难全部消失"); + // BUG-2280 原值「落陷;另有缓解条件,不代表困难全部消失」/ 新值「落陷;有缓解」/ 原因:负责人 11-23,已核待核同一句 + assert.equal(NEECHA_BHANGA_CARD_LABEL, "落陷;有缓解"); // BUG-2169 原值:引擎标签一律换成上面这句 / 新值:这句只给核实过的行,未核实写「落陷;缓解条件待核」 / 原因:她 11-22 §4 E 表 }); diff --git a/frontend/tests/consult-internal-words-1948.test.ts b/frontend/tests/consult-internal-words-1948.test.ts index 4b9612071..69710e231 100644 --- a/frontend/tests/consult-internal-words-1948.test.ts +++ b/frontend/tests/consult-internal-words-1948.test.ts @@ -121,7 +121,8 @@ test("the table uses existing wording, drops what carries nothing, and leaves re assert.equal(scrubInternalWords("原书:「Jupiter in the 2nd」;KP Sub Lord Saturn"), "原书:「Jupiter in the 2nd」;KP Sub Lord Saturn"); // BUG-2030(占星师 11-19 第二次答复,分层规则):落陷取消和分界的规则口吻换成她给用户的说法。 // BUG-2169 原值「落陷,不利影响有缓解因素」/ 新值「落陷,缓解条件待核」/ 原因:她 11-22 §4 E 表,未核实不说有缓解 - assert.equal(scrubInternalWords("- **关系**:第 7 宫有木星,落陷取消条件已满足"), "- **关系**:第 7 宫有木星,落陷,缓解条件待核"); + // BUG-2280 原值「落陷,缓解条件待核」/ 新值「落陷,但有缓解」/ 原因:负责人 11-23 + assert.equal(scrubInternalWords("- **关系**:第 7 宫有木星,落陷取消条件已满足"), "- **关系**:第 7 宫有木星,落陷,但有缓解"); assert.equal(scrubInternalWords("木星落陷已取消,但仍在摩羯"), "木星落陷的不利影响有缓解因素,但仍在摩羯"); assert.equal(scrubInternalWords("(相关分盘在卡上;分界敏感)"), "(相关分盘;出生时间前后几分钟会影响这一条)"); assert.equal(scrubInternalWords("与木星(摩羯 8.99°,落陷但落陷取消)同宫"), "与木星(摩羯 8.99°,落陷但不利影响有缓解因素)同宫"); diff --git a/frontend/tests/consult-yoga-status-wording-1825.test.ts b/frontend/tests/consult-yoga-status-wording-1825.test.ts index 53adda432..73ae91b3a 100644 --- a/frontend/tests/consult-yoga-status-wording-1825.test.ts +++ b/frontend/tests/consult-yoga-status-wording-1825.test.ts @@ -26,6 +26,7 @@ import type { EvidenceCard } from "../src/lib/consultation-evidence-card.ts"; import { CONDENSED_SHARED_READING_LINES } from "../src/lib/consultation-condensed-checklist.ts"; import { professionalConversationVoice } from "../src/mastra/product-voice.ts"; import { + NEECHA_MITIGATED_TEXT, YOGA_BLOCKED_PREFIX, YOGA_STATUS_MAPPING, yogaStatusContractTable, @@ -64,7 +65,8 @@ test("her parents counterexample: computed written as 非成立 is rejected five for (const item of found) { assert.equal(item.kind, "yoga_status"); assert.equal(item.claimed, "非成立"); - assert.equal(item.card, YOGA_STATUS_MAPPING.computed.text); + // BUG-2280 原值:五行都是 computed 文字 / 新值:Neecha Bhanga 那一行写「有缓解」/ 原因:负责人 11-23,检测到缓解就说有缓解 + assert.equal(item.card, /neecha/i.test(item.entity) ? NEECHA_MITIGATED_TEXT : YOGA_STATUS_MAPPING.computed.text); assert.equal(item.layer, "D1"); assert.equal(item.reference, "yogas_detail status"); assert.match(item.source_path, /^base\.natal\.yogas_detail\.rows\[\d\]$/); diff --git a/frontend/tests/evidence-pack-cancel-1987.test.ts b/frontend/tests/evidence-pack-cancel-1987.test.ts index 0e0a4ca58..cec3cb299 100644 --- a/frontend/tests/evidence-pack-cancel-1987.test.ts +++ b/frontend/tests/evidence-pack-cancel-1987.test.ts @@ -67,16 +67,17 @@ test("one sentence per Neecha Bhanga cancellation on the public charts and the s // 原因:BUG-2012,占星师 2026-11-19 上线前答复第 3、12 条 // 原值:/按《Light on Life》规则,已满足落陷取消条件:/ 新值:不写书名 原因:BUG-2133 问答也不引书名 // BUG-2169 原值 /落陷,已满足落陷取消条件:/ / 新值:公开盘的取消边都没核实,写候选 / 原因:她 11-22 §4 E 表(检测器检出 ≠ 已核) - assert.match(text, /落陷;检测到可能缓解它的条件:/, chart); + assert.match(text, /落陷;有缓解它的条件:/, chart); // BUG-2280 原值 /落陷;检测到可能缓解它的条件:/ assert.doesNotMatch(text, /《|Light on Life/, chart); // BUG-2169 原值「这不等于…入旺,也不代表相关困难全部消失」/ 新值:候选不谈入旺 / 原因:同上 - assert.match(text, /这些条件还没有核实/, chart); + assert.doesNotMatch(text, /还没有核实|待核/, chart); // BUG-2280 原值:要求「这些条件还没有核实」 assert.doesNotMatch(text, /已被取消|已被化解/, chart); for (const condition of edge.conditions ?? []) assert.ok(text.includes(condition), `${chart}: ${condition}`); // BUG-2030 原值「提到…时写成落陷、取消条件已满足;取消只针对…」/ 新值:她给用户的说法 / 原因:分层规则 // BUG-2163 原值「说成这一配置的不利影响有缓解因素,但不能据此认为困难全部消失」/ 新值:她 11-22 §4(E)短写法 / 原因:按真实状态写 // BUG-2169 原值「提到…时说成落陷、另有缓解条件…」/ 新值:候选的说法 / 原因:同上 - assert.match(text, new RegExp(`提到${name}时说成落陷、缓解条件待核:不说它有缓解,也不说没有`), chart); + // BUG-2280 原值「提到…时说成落陷、缓解条件待核:不说它有缓解,也不说没有」/ 新值见下 / 原因:负责人 11-23 + assert.match(text, new RegExp(`提到${name}时说成落陷,但有缓解`), chart); // the placement stays; no claim that it becomes strong or forms another combination // BUG-2169 原值「…的落陷位置不变,它受到的其他压力照样算」/ 新值:候选句同样保留其他压力 / 原因:同上 assert.match(text, /它受到的其他压力照样算/, chart); @@ -130,7 +131,7 @@ test("in the pack the sentence sits before the direct evidence and the cancelled // 原值:/落陷已被取消,见取消说明/;新值:确认的是条件成立(BUG-2012) // BUG-2030 原值 /落陷取消条件已满足,见取消说明/ / 新值见下 / 原因:分层规则,规则口吻不进回答 // BUG-2169 原值 /落陷的不利有缓解因素,见取消说明/ / 新值:未核实写待核 / 原因:她 11-22 §4 E 表 - assert.match(String(jupiter.what), /落陷;缓解条件待核,见取消说明/); + assert.match(String(jupiter.what), /落陷;有缓解,见取消说明/); // BUG-2280 原值 /落陷;缓解条件待核,见取消说明/ // the structured cancels row is still in limits, unchanged in kind assert.ok((pack.limits as Json[]).some((row) => row.relation === "cancels" && row.target === "ev:D1:Jupiter")); // no cancellation: no sentence, no pointer diff --git a/frontend/tests/neecha-card-2169.test.ts b/frontend/tests/neecha-card-2169.test.ts index 46aa57a8c..926284b2d 100644 --- a/frontend/tests/neecha-card-2169.test.ts +++ b/frontend/tests/neecha-card-2169.test.ts @@ -1,5 +1,7 @@ -// BUG-2169 (占星师 2026-11-22 §4 E 表): the chat card, the evidence pack and the answer fact guard keep a -// detector-only debilitation cancellation as a candidate. Synthetic data only. +// BUG-2169 (占星师 2026-11-22 §4 E 表) kept a detector-only debilitation cancellation as a pending candidate. +// BUG-2280 (负责人 2026-11-23,占星师建议) 原值:候选写「落陷;缓解条件待核」,回答说「有缓解」由事实核对拦下 / +// 新值:检测到缓解条件就一律写「落陷;有缓解」,已核与候选同一句,事实核对不再拦 / 原因:不给用户模棱两可的说法。 +// Synthetic data only. import assert from "node:assert/strict"; import test from "node:test"; @@ -11,31 +13,27 @@ import { import { cancellationSentence } from "../src/lib/evidence-pack.ts"; import { findAnswerFactMismatches } from "../src/lib/consultation-answer-fact-guard.ts"; -test("the candidate label never says mitigation exists", () => { - assert.equal(NEECHA_CANDIDATE_CARD_LABEL, "落陷;缓解条件待核"); +test("candidate and verified rows read the same: 「落陷;有缓解」", () => { + assert.equal(NEECHA_CANDIDATE_CARD_LABEL, "落陷;有缓解"); + assert.equal(NEECHA_BHANGA_CARD_LABEL, NEECHA_CANDIDATE_CARD_LABEL); const label = neechaCandidateStatusWithConditions(["落陷星座主星土星在上升起第1宫(角宫)"]); assert.ok(label.startsWith(NEECHA_CANDIDATE_CARD_LABEL)); - assert.doesNotMatch(label, /另有缓解|缓解来自/); - assert.notEqual(NEECHA_CANDIDATE_CARD_LABEL, NEECHA_BHANGA_CARD_LABEL); + assert.match(label, /缓解来自:落陷星座主星土星在上升起第1宫(角宫)/); + assert.doesNotMatch(label, /待核|还没有核实|不说它有缓解/); }); -test("the evidence pack writes the candidate form unless the edge is verified", () => { +test("the evidence pack says 「落陷,但有缓解」 for a verified and an unverified edge", () => { const edge = { from: "ev:yoga:nb", to: "ev:D1:Jupiter", type: "cancels", conditions: ["土星在角宫"] }; - const pending = cancellationSentence(edge); - assert.match(pending, /缓解条件待核/); - assert.doesNotMatch(pending, /另有缓解条件|已满足落陷取消条件/); - const verified = cancellationSentence({ ...edge, verified: true } as never); - assert.match(verified, /另有缓解条件/); + for (const sentence of [cancellationSentence(edge), cancellationSentence({ ...edge, verified: true } as never)]) { + assert.match(sentence, /说成落陷,但有缓解/); + assert.doesNotMatch(sentence, /待核|还没有核实|不说它有缓解/); + } }); -test("the fact guard catches 「有缓解」 for a candidate planet and lets pending wording pass", () => { - const card = { base: { natal: { planets: { Jupiter: { status: `${NEECHA_CANDIDATE_CARD_LABEL}(检测到的条件:x)` } } }, timing: {} }, +test("the fact guard no longer flags 「有缓解」", () => { + const card = { base: { natal: { planets: { Jupiter: { status: `${NEECHA_CANDIDATE_CARD_LABEL}(缓解来自:x)` } } }, timing: {} }, domain_sections: {} } as never; const hits = (text: string) => findAnswerFactMismatches(text, card).filter((item) => item.kind === "neecha_mitigation"); - assert.equal(hits("木星落陷,但另有缓解条件。").length, 1); - assert.equal(hits("木星的落陷已被化解。").length, 1); - assert.equal(hits("木星落陷,缓解条件待核。").length, 0); - assert.equal(hits("木星落陷,有没有缓解还没有核实。").length, 0); - assert.equal(hits("金星另有缓解条件。").length, 0, "a planet that is not a candidate is not checked"); - assert.equal(hits("木星和土星都有缓解。").length, 0, "two planets in one clause are not checked"); + assert.equal(hits("木星落陷,但有缓解。").length, 0); + assert.equal(hits("木星落陷,但另有缓解条件。").length, 0); }); diff --git a/frontend/tests/neecha-plain-2280.test.ts b/frontend/tests/neecha-plain-2280.test.ts new file mode 100644 index 000000000..6ab12db06 --- /dev/null +++ b/frontend/tests/neecha-plain-2280.test.ts @@ -0,0 +1,49 @@ +// BUG-2280 (负责人 2026-11-23,占星师建议): wherever mitigation (Neecha Bhanga) conditions were detected, readers see +// 「落陷;有缓解」 — never 「缓解条件待核」「有没有缓解还没核实」 or any other hedge. Guard over the user-facing sources, +// the model-facing rules and the shared status words. Synthetic data only. +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import test from "node:test"; + +import { NEECHA_UNVERIFIED_LABEL, NEECHA_VERIFIED_LABEL } from "../src/lib/chart-board-model.ts"; +import { NEECHA_BHANGA_CARD_LABEL, NEECHA_CANDIDATE_CARD_LABEL } from "../src/lib/consultation-evidence-card.ts"; +import { ownerChatWording } from "../src/lib/chat-answer-checks.ts"; +import { scrubInternalWords } from "../src/lib/consultation-internal-words.ts"; +import { yogaStatus } from "../src/lib/yoga-status-words.ts"; + +const BANNED = /缓解条件(?:还)?待核|有没有缓解还没(?:有)?核实|有没有能补回的条件还要再核|不说它有缓解|这些条件还没有核实/u; +const code = (path: string) => readFileSync(new URL(path, import.meta.url), "utf8") + .replace(/\/\*[\s\S]*?\*\//gu, "").replace(/\/\/.*$/gmu, ""); +const pyCode = (path: string) => readFileSync(new URL(path, import.meta.url), "utf8") + .split("\n").filter((line) => !line.trim().startsWith("#")).join("\n"); + +test("one wording for every detected mitigation", () => { + for (const label of [NEECHA_UNVERIFIED_LABEL, NEECHA_VERIFIED_LABEL, NEECHA_BHANGA_CARD_LABEL, NEECHA_CANDIDATE_CARD_LABEL]) { + assert.equal(label, "落陷;有缓解"); + } +}); + +test("no hedge in the user-facing and model-facing sources", () => { + const ts = [ + "chart-board-model.ts", "chart-view-varga.ts", "chart-yoga-groups.ts", "consultation-evidence-card.ts", "evidence-pack.ts", + "consultation-internal-words.ts", "personal-report-reading-fallback.ts", "chat-answer-tables.ts", "annual-report-sections.ts", + "yoga-status-words.ts", + ].map((name) => `../src/lib/${name}`); + for (const path of [...ts, "../src/mastra/product-voice.ts"]) assert.doesNotMatch(code(path), BANNED, path); + for (const path of ["neecha_witness.py", "reading_facts.py", "yoga_status_words.py"]) { + assert.doesNotMatch(pyCode(`../../scripts/report_render/${path}`), BANNED, path); + } + assert.doesNotMatch(pyCode("../../scripts/pl9_interpretation_packs.py"), BANNED); +}); + +test("old hedges in answers and card text are rewritten to 「有缓解」", () => { + assert.equal(ownerChatWording("木星落陷;缓解条件待核。").output, "木星落陷,但有缓解。"); + assert.equal(ownerChatWording("木星落陷,有没有缓解还没核实。").output, "木星落陷,但有缓解。"); + assert.equal(scrubInternalWords("木星落陷取消条件已满足"), "木星落陷,但有缓解"); +}); + +test("a Neecha Bhanga row in a yoga table reads 「有缓解」, other rows keep their status words", () => { + assert.equal(yogaStatus({ rule_id: "main_detector:neecha_bhanga", status: "computed" }).text, "有缓解"); + assert.equal(yogaStatus({ name: "Neecha Bhanga", status: "candidate" }).text, "有缓解"); + assert.equal(yogaStatus({ name: "Gaja Kesari", status: "computed" }).text, "检测器检出,待核实"); +}); diff --git a/frontend/tests/report-backstage-words-2269.test.tsx b/frontend/tests/report-backstage-words-2269.test.tsx index 57db3ab78..85e436235 100644 --- a/frontend/tests/report-backstage-words-2269.test.tsx +++ b/frontend/tests/report-backstage-words-2269.test.tsx @@ -94,8 +94,9 @@ test("annual: the writer's material and rules carry reader words, not status cod assert.doesNotMatch(systemPrompt(), /\bblocked\b|parameter_sensitive|3509ccd7/); }); -test("annual: a cancellation still to be checked is never raised to 「有缓解因素」", () => { - assert.equal(annualReaderWording("木星在摩羯座的落陷有取消条件被检出,但仍有待核实。"), "木星在摩羯座的落陷有没有缓解还没核实。"); +// BUG-2280 原值:待核写「有没有缓解还没核实」,不许写有缓解 / 新值:写「有缓解」/ 原因:负责人 11-23,有缓解就写有缓解 +test("annual: a detected cancellation reads 「有缓解」", () => { + assert.equal(annualReaderWording("木星在摩羯座的落陷有取消条件被检出,但仍有待核实。"), "木星在摩羯座的落陷有缓解。"); }); test("annual: a missing grading input reads as a plain sentence; saved basis text loses backstage words", () => { diff --git a/references/product_runtime_contract.md b/references/product_runtime_contract.md index 1b35bf873..69f15d2be 100644 --- a/references/product_runtime_contract.md +++ b/references/product_runtime_contract.md @@ -768,6 +768,7 @@ Shadbala 达没达到最低线照 strengths.shadbala 每颗星写;minimum_chec - 解读正文在检查前另换四种写法:「同一句要并读」去掉;「只作这一天观察,不外推」去掉;「在某领域被路由分给了某某」写成「已放在某某部分使用」;「用途稳定性……没有评估」写成「未评估出生时间对这类判断的影响」(与 must_disclose 的读者文字同一句)。 - 落陷取消(占星师 2026-11-19 第 3 条):报告事实包里凡是引擎标签「落陷取消(Neecha Bhanga)」的位置(行星行、宫主行、瑜伽参与星),都写成问答卡同一句「落陷,落陷取消条件已满足(不等于入旺,也不代表相关困难全部消失)」(BUG-2020 的 `NEECHA_BHANGA_CARD_LABEL`,两处由测试钉成同一句)。尊贵状态核对只看括号外的字,括注里的「入旺」不算。冻结的引擎文件没有改。 - 产品公告 G-26(BUG-2169,占星师 2026-11-22 §4 E 表):报告事实包、问答卡、证据包和改写表里的落陷取消,按格局表的核实状态写:已核实(formed_under_source)写「落陷;另有缓解条件,不代表困难全部消失」,检测器检出或候选写「落陷;缓解条件待核」,只有自我参照、不成立或未计算写「落陷」。今天全部规则都是检测器检出,所以都写「待核」;回答里把待核的星写成「有缓解」由事实核对(neecha_mitigation)拦下。上一条 BUG-2030 的统一写法只适用于已核实的行。 +- BUG-2280(负责人 2026-11-23,占星师建议):上一条的分档写法给用户的部分作废。凡是检测到落陷取消(缓解)条件的落陷星,表格、正文、问答一律写「落陷;有缓解」(行文里可写「X落陷,但有缓解」),已核实和检测器检出同一句;不写「缓解条件待核」「有没有缓解还没核实」「待核实」这类两可说法。核实状态只留在后台数据。缓解只针对落陷带来的那一项不利,原始落陷不变、不说成入旺或变得有力,这条范围照旧。只有自我参照、不成立或未计算的仍写「落陷」。 - 旧自选记录(BUG-1997 之前保存,没有逐条线的分盘清单)不回填:用到那些分盘的段落不带另一情景说明,在生时纠正里重新保存一次自选即写入清单(BUG-1997)。 - 候选瑜伽表里的组合说明不出现参考库的名字:「按 PyJHora 源码条件判定」写成「按规则判定」(BUG-2217,原为「按来源规则判定」),「PyJHora aligned ……」去掉前缀。「独立年度方法参考」一章按原规定保留「来源:PyJHora」。 - 数据章节里保留不动的:状态格「参数敏感」、瑜伽的候选状态说明(文字只在 yoga-status-words.ts 一处;导出的审计标注,占星师 2026-11-07 方案)、功能吉凶层的字段名行、Narayana 候选分支编号与「暂不作为双体系确认」(她第五轮的候选句,只在数据章节)。大运附表里「各步 profile 计算」改为「各步口径计算」。 diff --git a/scripts/pl9_interpretation_packs.py b/scripts/pl9_interpretation_packs.py index eb85382ce..135958ee8 100644 --- a/scripts/pl9_interpretation_packs.py +++ b/scripts/pl9_interpretation_packs.py @@ -1278,12 +1278,14 @@ def _neecha_position(raw: dict, planets: list[str], language: str) -> str: # BUG-2262: what each table state says about the three layers, on the planet's own page. NEECHA_LAYERS = { - "verified": ("原始尊贵:落陷,不变。缓解条件:按本报告所用规则满足(下列)。核定:已按该规则核对,全文写作「落陷;另有缓解条件」,不代表困难全部消失。", - "Original dignity: debilitated, unchanged. Mitigation: met under this report's rule (listed below). Checked against that rule; written throughout as \"debilitated; mitigating conditions present\", which does not mean the difficulty is gone. "), - "candidate": ("原始尊贵:落陷,不变。缓解条件:检测到下列条件,但还没有按本报告所用规则逐项核定。核定:待核,所以全文写作「落陷;缓解条件待核」,不按已缓解处理。", - "Original dignity: debilitated, unchanged. Mitigation: the conditions below were detected but not yet checked one by one against this report's rule. Not yet confirmed, so written throughout as \"debilitated; mitigating conditions to be checked\" and not treated as mitigated. "), + # BUG-2280 (负责人 2026-11-23) 原值 candidate「…还没有按本报告所用规则逐项核定。核定:待核,所以全文写作「落陷;缓解条件待核」…」/ + # 新值:两种状态同一句,全文写作「落陷;有缓解」/ 原因:有缓解条件就说有缓解,不写「待核」。 + "verified": ("原始尊贵:落陷,不变。缓解条件:满足下列条件,所以全文写作「落陷;有缓解」。缓解只针对落陷带来的那一项不利,原始的落陷不变。", + "Original dignity: debilitated, unchanged. Mitigation: the conditions below are met, so it is written throughout as \"debilitated; mitigated\". Mitigation applies only to the adverse effect of the debilitation; the original debilitation stands. "), + "candidate": ("原始尊贵:落陷,不变。缓解条件:找到下列条件,所以全文写作「落陷;有缓解」。缓解只针对落陷带来的那一项不利,原始的落陷不变。", + "Original dignity: debilitated, unchanged. Mitigation: the conditions below were found, so it is written throughout as \"debilitated; mitigated\". Mitigation applies only to the adverse effect of the debilitation; the original debilitation stands. "), } -NEECHA_CONDITION_PREFIX = {"verified": ("满足的条件", "Condition {n} met"), "candidate": ("检测到的条件", "Condition {n} detected")} +NEECHA_CONDITION_PREFIX = {"verified": ("满足的条件", "Condition {n} met"), "candidate": ("满足的条件", "Condition {n} met")} # BUG-2280: 原值 candidate「检测到的条件」 def _neecha_layers_text(state: str | None, language: str) -> str: diff --git a/scripts/report_render/neecha_witness.py b/scripts/report_render/neecha_witness.py index 313ce048d..e650ba3ca 100644 --- a/scripts/report_render/neecha_witness.py +++ b/scripts/report_render/neecha_witness.py @@ -52,8 +52,11 @@ NEECHA_BHANGA_DIGNITY_CELL = { NEECHA_STATES = ("verified", "candidate", "self_reference_only", "not_met", "not_computed") NEECHA_FOOTNOTE_MARK = "¹" NEECHA_SHORT_CELL = { - "verified": {"zh": "落陷;另有缓解条件", "en": "Debilitated; mitigating conditions present"}, - "candidate": {"zh": "落陷;缓解条件待核", "en": "Debilitated; mitigating conditions to be checked"}, + # BUG-2280 (负责人 2026-11-23,占星师建议): 原值 verified「落陷;另有缓解条件」、candidate「落陷;缓解条件待核」/ + # 新值:检测到缓解条件就一律写「落陷;有缓解」/ 原因:流派多,给出有缓解这一特质即可,不给用户模棱两可的「待核」。 + # 核实与否只留在后台数据(neecha_states),用户只看到一种写法。 + "verified": {"zh": "落陷;有缓解", "en": "Debilitated; mitigated"}, + "candidate": {"zh": "落陷;有缓解", "en": "Debilitated; mitigated"}, "self_reference_only": {"zh": "落陷", "en": "Debilitated"}, "not_met": {"zh": "落陷", "en": "Debilitated"}, "not_computed": {"zh": "落陷", "en": "Debilitated"}, @@ -205,14 +208,16 @@ NEECHA_NOTE = { "en": "¹ The mitigating conditions and their witnesses are on the \"{title}\" page under Yoga interpretation; mitigation is not a new dignity and the original debilitation stands.", }, "candidate": { - "zh": "{planet}「缓解条件待核」:只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理。", - "en": "{planet}, \"mitigating conditions to be checked\": only a condition of another reading holds and the default rule does not, so this is not treated as mitigated.", + # BUG-2280 原值「{planet}「缓解条件待核」:…这里不按已缓解处理。」/ 新值见下 / 原因:负责人 11-23,有缓解就写有缓解。 + "zh": "{planet}有缓解:按另一种读法,化解条件成立;原始的落陷不变。", + "en": "{planet} is mitigated: the cancellation condition holds under another reading; the original debilitation stands.", }, # BUG-2165: the default rule's detector found the conditions, the named source's check has not run # (the yoga table's 「检测器检出,待核实」). "detector_only": { - "zh": "{planet}「缓解条件待核」:检测器找到了化解条件,还没有按所选规则逐项核实(格局表写「检测器检出,待核实」),这里不按已缓解处理;条件和见证星见「瑜伽解释」里的「{title}」,原始的落陷不变。", - "en": "{planet}, \"mitigating conditions to be checked\": the detector found cancellation conditions that have not yet been checked against the chosen source (the yoga table says \"Detected, to be verified\"), so this is not treated as mitigated; the conditions and witnesses are on the \"{title}\" page under Yoga interpretation, and the original debilitation stands.", + # BUG-2280 原值「{planet}「缓解条件待核」:检测器找到了化解条件,还没有按所选规则逐项核实…不按已缓解处理…」/ 新值见下 / 原因:同上 + "zh": "{planet}有缓解:化解条件和见证星见「瑜伽解释」里的「{title}」;原始的落陷不变。", + "en": "{planet} is mitigated: the conditions and witnesses are on the \"{title}\" page under Yoga interpretation, and the original debilitation stands.", }, "not_computed": { "zh": "{planet}的落陷取消条件这次没有计算,这不表示没有缓解条件。", @@ -266,8 +271,9 @@ NEECHA_MARKER_NOTE = { "en": "¹ {planet}: {cell}. The mitigating conditions and their witnesses are on the \"{title}\" page under Yoga interpretation; mitigation is not a new dignity and the original debilitation stands.", } NEECHA_MARKER_NOTE_VARIANT = { - "zh": "¹ {planet}:{cell}。只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理;原始的落陷不变。", - "en": "¹ {planet}: {cell}. Only a condition of another reading holds and the default rule does not, so this is not treated as mitigated; the original debilitation stands.", + # BUG-2280 原值「…只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理;…」/ 新值见下 / 原因:负责人 11-23。 + "zh": "¹ {planet}:{cell}。按另一种读法,化解条件成立;原始的落陷不变。", + "en": "¹ {planet}: {cell}. The cancellation condition holds under another reading; the original debilitation stands.", } diff --git a/scripts/report_render/reading_facts.py b/scripts/report_render/reading_facts.py index c12a3e332..6a6ba51ec 100644 --- a/scripts/report_render/reading_facts.py +++ b/scripts/report_render/reading_facts.py @@ -1351,8 +1351,10 @@ NEECHA_BHANGA_ENGINE_LABEL = "落陷取消(Neecha Bhanga)" # 边界「不代表困难全部消失」/ 原因:表格与正文按真实状态分开写(BUG-2155 neecha_witness.NEECHA_SHORT_CELL);引擎标签 # 「落陷取消(Neecha Bhanga)」是默认规则成立,即「已核」。只有另一种读法成立(待核)时写「缓解条件待核」,未计算或只有自我参照 # 时只写「落陷」,不说有缓解。 -NEECHA_BHANGA_READER_ZH = "落陷;另有缓解条件,不代表困难全部消失" -NEECHA_CANDIDATE_READER_ZH = "落陷;缓解条件待核" +# BUG-2280 (负责人 2026-11-23) 原值 已核「落陷;另有缓解条件,不代表困难全部消失」、待核「落陷;缓解条件待核」/ 新值:一律 +# 「落陷;有缓解」/ 原因:检测到缓解条件就说有缓解,不给用户「待核」这类两可说法;核实状态只留在后台。 +NEECHA_BHANGA_READER_ZH = "落陷;有缓解" +NEECHA_CANDIDATE_READER_ZH = "落陷;有缓解" _DIGNITY_FIELDS = ("d1_dignity", "d9_dignity", "dignity", "status") _DEBILITATED = frozenset({"落陷(Debilitated)", "落陷", "DEBILITATED", "Debilitated"}) diff --git a/scripts/report_render/yoga_status_words.py b/scripts/report_render/yoga_status_words.py index 8c8df9c1c..325ab0353 100644 --- a/scripts/report_render/yoga_status_words.py +++ b/scripts/report_render/yoga_status_words.py @@ -45,10 +45,23 @@ YOGA_NOTICE_EN = ( ) +# BUG-2280 (负责人 2026-11-23,占星师建议): a Neecha Bhanga row the detector found reads 「有缓解」 for readers, not +# 「检测器检出,待核实」 / 「命中候选规则,尚未完整确认」. The key (computed / candidate) stays for the code. +NEECHA_MITIGATED_TEXT = {"zh": "有缓解", "en": "Mitigated"} + + +def _is_neecha_row(row): + rule_id = _text(row.get("rule_id")).lower() + return ("neecha_bhanga" in rule_id or _text(row.get("category")).lower() == "neecha_bhanga" + or _text(row.get("name")).lower().startswith("neecha bhanga")) + + def yoga_status_cell(key, text, language): """Status cell of the candidate table: the Chinese text, or its English counterpart.""" if language != "en": return text + if text == NEECHA_MITIGATED_TEXT["zh"]: + return NEECHA_MITIGATED_TEXT["en"] return YOGA_STATUS_TEXT_EN.get(key, YOGA_STATUS_TEXT_EN["blocked"]) @@ -73,11 +86,14 @@ def yoga_status(row, not_evaluated=False): return formation, YOGA_STATUS_MAPPING[formation]["text"] status = _text(row.get("status")) claim = _text(row.get("claim_status")) + neecha = _is_neecha_row(row) for key in ("candidate", "computed", "blocked"): if status in YOGA_STATUS_MAPPING[key]["evidence"]: - return _blocked(f"状态为 {status}") if key == "blocked" else (key, YOGA_STATUS_MAPPING[key]["text"]) + if key == "blocked": + return _blocked(f"状态为 {status}") + return key, NEECHA_MITIGATED_TEXT["zh"] if neecha else YOGA_STATUS_MAPPING[key]["text"] if claim in YOGA_STATUS_MAPPING["candidate"]["evidence"] or formation == "candidate": - return "candidate", YOGA_STATUS_MAPPING["candidate"]["text"] + return "candidate", NEECHA_MITIGATED_TEXT["zh"] if neecha else YOGA_STATUS_MAPPING["candidate"]["text"] if not_evaluated: return _blocked(YOGA_GAP_NOT_EVALUATED) return _blocked(f"状态值 {status} 不在映射表内" if status else "卡上这条格局没有状态值") diff --git a/tests/test_acceptance_1123_regression.py b/tests/test_acceptance_1123_regression.py index a633c4618..83d6c138f 100644 --- a/tests/test_acceptance_1123_regression.py +++ b/tests/test_acceptance_1123_regression.py @@ -45,8 +45,10 @@ def test_a_row_without_participants_is_not_called_unlinked() -> None: @pytest.mark.parametrize("state, prefix, layer", [ - ("candidate", "检测到的条件一", "核定:待核,所以全文写作「落陷;缓解条件待核」"), - ("verified", "满足的条件一", "核定:已按该规则核对"), + # BUG-2280 原值 candidate「检测到的条件一」「核定:待核,所以全文写作「落陷;缓解条件待核」」、verified「核定:已按该规则核对」/ + # 新值:两种状态同一句 / 原因:负责人 11-23,有缓解就写有缓解。 + ("candidate", "满足的条件一", "所以全文写作「落陷;有缓解」"), + ("verified", "满足的条件一", "所以全文写作「落陷;有缓解」"), ]) def test_neecha_pages_say_the_three_layers_in_the_tables_state(state, prefix, layer) -> None: """BUG-2262: original dignity, conditions found, rule confirmation — never 「落陷取消」 in place of 落陷.""" diff --git a/tests/test_reading_facts_neecha_2169.py b/tests/test_reading_facts_neecha_2169.py index 4bd63f651..655984f90 100644 --- a/tests/test_reading_facts_neecha_2169.py +++ b/tests/test_reading_facts_neecha_2169.py @@ -15,6 +15,7 @@ from tests.test_reading_facts_2126 import _facts def test_obama_facts_carry_the_candidate_wording_only() -> None: text = json.dumps(_facts("barack_obama_1961_aa", False), ensure_ascii=False) + # BUG-2280 原值:只出现待核一句、不出现已核一句 / 新值:两档同一句「落陷;有缓解」,不出现任何「待核」 / 原因:负责人 11-23。 + assert NEECHA_CANDIDATE_READER_ZH == NEECHA_BHANGA_READER_ZH == "落陷;有缓解" assert NEECHA_CANDIDATE_READER_ZH in text - assert NEECHA_BHANGA_READER_ZH not in text - assert "另有缓解条件" not in text + assert "缓解条件待核" not in text and "另有缓解条件" not in text diff --git a/tests/test_report_astro_review_2110.py b/tests/test_report_astro_review_2110.py index 2604302aa..7e2230dc3 100644 --- a/tests/test_report_astro_review_2110.py +++ b/tests/test_report_astro_review_2110.py @@ -89,12 +89,12 @@ def test_rule_condition_text_reads_the_rule_and_says_when_it_is_missing(): def test_neecha_page_lists_position_each_condition_with_its_witness_and_the_limits(): expected = { "zh": ("#### 落陷取消(木星)", "原始落陷位置:木星落陷于摩羯座。", - ["检测到的条件一:落陷星座的主星土星在上升起第 1 宫(角宫);见证星:土星。", - "检测到的条件二:落陷星入旺星座的主星月亮在月亮起第 1 宫(角宫);见证星:月亮(自我参照,不作独立印证)。"], + ["满足的条件一:落陷星座的主星土星在上升起第 1 宫(角宫);见证星:土星。", + "满足的条件二:落陷星入旺星座的主星月亮在月亮起第 1 宫(角宫);见证星:月亮(自我参照,不作独立印证)。"], "综合含义与仍需考虑的限制:", "不按条件的数量叠加效果"), "en": ("#### Neecha Bhanga (Jupiter)", "Original debilitation position: Jupiter debilitated in Capricorn.", - ["Condition 1 detected: lord of the debilitation sign, Saturn, in house 1 from the Lagna (kendra); witness: Saturn.", - "Condition 2 detected: lord of the fallen planet's exaltation sign, Moon, in house 1 from the Moon (kendra); " + ["Condition 1 met: lord of the debilitation sign, Saturn, in house 1 from the Lagna (kendra); witness: Saturn.", + "Condition 2 met: lord of the fallen planet's exaltation sign, Moon, in house 1 from the Moon (kendra); " "witness: Moon (self-reference, not independent support)."], "Overall meaning and remaining limits:", "the effect is not multiplied by the number of conditions"), } @@ -105,6 +105,7 @@ def test_neecha_page_lists_position_each_condition_with_its_witness_and_the_limi assert position in page and all(text in page for text in conditions) # BUG-2262 (占星师 2026-11-23): this chart's conditions are detected but not confirmed under the # chosen rule (state candidate); the page says the three layers apart. 原值:「满足的条件一」. + # BUG-2280 原值「检测到的条件一」/ 新值「满足的条件一」/ 原因:负责人 11-23,检测到缓解条件就说有缓解,两档同一说法。 assert ("原始尊贵:落陷,不变。" if language == "zh" else "Original dignity: debilitated, unchanged.") in page # The overall meaning closes the page, after the dasha link line. assert page.index(summary) > page.index(conditions[-1]) and no_multiply in page diff --git a/tests/test_report_english_edition.py b/tests/test_report_english_edition.py index 52fbaa32e..33cee9dfe 100644 --- a/tests/test_report_english_edition.py +++ b/tests/test_report_english_edition.py @@ -134,9 +134,11 @@ def test_english_dignity_takes_the_english_half() -> None: # 新值: "Debilitated; mitigating conditions present¹";原因: BUG-2155(占星师 2026-11-22 §4) # 原值: "Debilitated; mitigating conditions present¹"(没有 states 也按已核) # 新值: "Debilitated; mitigating conditions to be checked";原因: BUG-2165(已核只看格局表的核实状态) - assert _dignity_label("落陷取消(Neecha Bhanga)", "en") == "Debilitated; mitigating conditions to be checked" + # 原值: "Debilitated; mitigating conditions to be checked" / "Debilitated; mitigating conditions present¹" + # 新值: "Debilitated; mitigated(见格局说明)" / "Debilitated; mitigated¹";原因: BUG-2280(负责人 11-23 一种说法) + assert _dignity_label("落陷取消(Neecha Bhanga)", "en").startswith("Debilitated; mitigated") assert _dignity_label("落陷取消(Neecha Bhanga)", "en", "Jupiter", {"Jupiter": "verified"}) == \ - "Debilitated; mitigating conditions present¹" + "Debilitated; mitigated¹" assert _dignity_label("入旺(Exalted)") == "入旺" diff --git a/tests/test_report_fixes_2105.py b/tests/test_report_fixes_2105.py index eac21cb27..994353f3b 100644 --- a/tests/test_report_fixes_2105.py +++ b/tests/test_report_fixes_2105.py @@ -98,13 +98,14 @@ def test_neecha_bhanga_dignity_cells_keep_the_debilitation(): # 原因:BUG-2155(占星师 2026-11-22 §4) # 原值:「落陷;另有缓解条件¹」;新值:「落陷;缓解条件待核」(格局表这一行是「检测器检出,待核实」) # 原因:BUG-2165(占星师 2026-11-22 §4:已核只在所选来源条件核实后) - assert zh.count("落陷;缓解条件待核") == 7 - assert en.count("Debilitated; mitigating conditions to be checked") == 7 - assert "另有缓解条件" not in chinese and "mitigating conditions present" not in english - assert "| 木星 | 土星 | 太阳 | 金星 | 木星 | 落陷;缓解条件待核 | 0.96 |" in chinese - assert "| Jupiter | Saturn | Sun | Venus | Jupiter | Debilitated; mitigating conditions to be checked | 0.96 |" in english + # 原值:「落陷;缓解条件待核」×7;新值:「落陷;有缓解」×7;原因:BUG-2280(负责人 11-23,有缓解就写有缓解) + assert zh.count("落陷;有缓解") == 7 + assert en.count("Debilitated; mitigated") == 7 + assert "缓解条件待核" not in chinese and "to be checked" not in english + assert "| 木星 | 土星 | 太阳 | 金星 | 木星 | 落陷;有缓解 | 0.96 |" in chinese + assert "| Jupiter | Saturn | Sun | Venus | Jupiter | Debilitated; mitigated | 0.96 |" in english _packet, jobs_zh, _jobs_en = public_chart_reports(JOBS) - assert "另有缓解条件" not in jobs_zh and "缓解条件待核" not in jobs_zh # no cancellation on this chart + assert "有缓解" not in jobs_zh and "缓解条件待核" not in jobs_zh # no cancellation on this chart # 3. Yoga pages keyed by rule ---------------------------------------------------------------------- diff --git a/tests/test_report_neecha_short_cell_2155.py b/tests/test_report_neecha_short_cell_2155.py index 6d97fb90d..a9fb1d1f7 100644 --- a/tests/test_report_neecha_short_cell_2155.py +++ b/tests/test_report_neecha_short_cell_2155.py @@ -50,11 +50,12 @@ def test_cells_for_each_state_in_both_editions() -> None: "planets": ["Jupiter"], "formation": {"status": "formed_under_source"}}]} states = neecha_states(_snapshot(yogas=[{"planet": "Jupiter"}], variant_only=[{"planet": "Mars"}], literal_only=[{"planet": "Venus"}]), verified_layer) - assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "zh", "Jupiter", states) == "落陷;另有缓解条件¹" - assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "en", "Jupiter", states) == "Debilitated; mitigating conditions present¹" - assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "zh", "Jupiter", states, footnote=False) == "落陷;另有缓解条件(见格局说明)" - assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "zh", "Mars", states) == "落陷;缓解条件待核" - assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "en", "Mars", states) == "Debilitated; mitigating conditions to be checked" + # BUG-2280 原值:已核「落陷;另有缓解条件¹」、待核「落陷;缓解条件待核」/ 新值:都写「落陷;有缓解」/ 原因:负责人 11-23。 + assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "zh", "Jupiter", states) == "落陷;有缓解¹" + assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "en", "Jupiter", states) == "Debilitated; mitigated¹" + assert neecha_bhanga_dignity_cell("落陷取消(Neecha Bhanga)", "zh", "Jupiter", states, footnote=False) == "落陷;有缓解(见格局说明)" + assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "zh", "Mars", states) == "落陷;有缓解" + assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "en", "Mars", states) == "Debilitated; mitigated" # Self-reference only: product policy neecha_bhanga_policy_v1 keeps 落陷 (the special note lives with the detector). assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "zh", "Venus", states) == "落陷" not_computed = neecha_states({}) @@ -63,7 +64,7 @@ def test_cells_for_each_state_in_both_editions() -> None: assert neecha_bhanga_dignity_cell("入旺(Exalted)", "zh", "Saturn", states) is None assert neecha_bhanga_dignity_cell("落陷(Debilitated)", "zh") is None assert _dignity_label("落陷(Debilitated)", "zh") == "落陷" - assert _dignity_label("落陷(Debilitated)", "zh", "Mars", states) == "落陷;缓解条件待核" + assert _dignity_label("落陷(Debilitated)", "zh", "Mars", states) == "落陷;有缓解" # BUG-2280 原值「落陷;缓解条件待核」 def test_notes_under_a_table() -> None: @@ -73,7 +74,7 @@ def test_notes_under_a_table() -> None: zh = neecha_table_notes(list(statuses), statuses, states, "zh") assert zh == [ "¹ 缓解条件和见证星见「瑜伽解释」里的「落陷取消(木星)」;缓解不是新的尊贵等级,原始的落陷不变。", - "火星「缓解条件待核」:只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理。", + "火星有缓解:按另一种读法,化解条件成立;原始的落陷不变。", # BUG-2280 原值「火星「缓解条件待核」:…不按已缓解处理。」 "土星的落陷取消条件这次没有计算,这不表示没有缓解条件。", ] en = neecha_table_notes(list(statuses), statuses, states, "en") @@ -88,8 +89,9 @@ def test_candidate_state_in_a_rendered_table() -> None: "advanced_systems": {"yogas_doshas": _snapshot(variant_only=[{"planet": "Mars"}])}}, } lines = _dignity_section(packet, "zh") - assert any("落陷;缓解条件待核" in line for line in lines) - assert "火星「缓解条件待核」:只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理。" in lines + # BUG-2280 原值「落陷;缓解条件待核」与「火星「缓解条件待核」:…」/ 新值见下 / 原因:负责人 11-23 + assert any("落陷;有缓解" in line for line in lines) + assert "火星有缓解:按另一种读法,化解条件成立;原始的落陷不变。" in lines uncomputed = {"worksheets": {"d1_rasi_bhava": {"planets": {"Mars": {"status": "落陷(Debilitated)"}}}}} lines = _dignity_section(uncomputed, "en") assert any("| Debilitated |" in line for line in lines) @@ -103,31 +105,32 @@ def test_public_chart_tables_use_the_short_cell_and_one_explanation(language: st # 原值:「落陷;另有缓解条件¹」/ "Debilitated; mitigating conditions present¹" # 新值:「落陷;缓解条件待核」/ "Debilitated; mitigating conditions to be checked"(格局表该行是「检测器检出,待核实」) # 原因:BUG-2165(占星师 2026-11-22 §4:已核只在所选来源条件核实后) - short = "落陷;缓解条件待核" if language == "zh" else "Debilitated; mitigating conditions to be checked" - verified = "另有缓解条件" if language == "zh" else "mitigating conditions present" + # BUG-2280 原值:「落陷;缓解条件待核」/ "…to be checked",且不出现「另有缓解条件」/ 新值:「落陷;有缓解」/ "Debilitated; mitigated", + # 不出现任何待核说法 / 原因:负责人 11-23。 + short = "落陷;有缓解" if language == "zh" else "Debilitated; mitigated" + verified = "缓解条件待核" if language == "zh" else "to be checked" long_cell = LONG_ZH if language == "zh" else LONG_EN # 原值:五张表和两句宫主说明各印一次 BUG-2030 的长句(共 10 处);新值:表格短句加说明,长句只留在格局页 # 原因:BUG-2155(占星师 2026-11-22 §4) assert text.count(short) >= 6 assert verified not in text assert long_cell not in text - status = "| 落陷取消 | 检测器检出,待核实 |" if language == "zh" else "| Detected, to be verified |" + status = "| 落陷取消 | 有缓解 |" if language == "zh" else "| Mitigated |" # BUG-2280 原值「检测器检出,待核实」 assert status in text - note = ("木星「缓解条件待核」:检测器找到了化解条件,还没有按所选规则逐项核实(格局表写「检测器检出,待核实」),这里不按已缓解处理;" - "条件和见证星见「瑜伽解释」里的「落陷取消(木星)」,原始的落陷不变。" if language == "zh" - else "Jupiter, \"mitigating conditions to be checked\": the detector found cancellation conditions that have not yet been " - "checked against the chosen source") + # BUG-2280 原值「木星「缓解条件待核」:检测器找到了化解条件,还没有按所选规则逐项核实…」/ 新值见下 / 原因:负责人 11-23 + note = ("木星有缓解:化解条件和见证星见「瑜伽解释」里的「落陷取消(木星)」;原始的落陷不变。" if language == "zh" + else "Jupiter is mitigated: the conditions and witnesses are on the") assert text.count(note) >= 4 heading = "#### 落陷取消(木星)" if language == "zh" else "#### Neecha Bhanga (Jupiter)" assert heading in text - sentence = "尊贵状态为落陷;缓解条件待核(见格局说明)。" if language == "zh" else \ - "with dignity/status Debilitated; mitigating conditions to be checked (see the yoga notes)." + sentence = "尊贵状态为落陷;有缓解(见格局说明)。" if language == "zh" else \ + "with dignity/status Debilitated; mitigated (see the yoga notes)." # BUG-2280 原值「…缓解条件待核…」 assert sentence in text # Body pages (planet and house-lord pages) keep the original 落陷 and point to the notes. # 原值:「尊贵为落陷取消」;新值:「尊贵为落陷;另有缓解条件(见格局说明)」;原因:BUG-2155 # 原值:「尊贵为落陷;另有缓解条件(见格局说明)」;新值:「尊贵为落陷;缓解条件待核(见格局说明)」;原因:BUG-2165 - body = "木星落在摩羯座第1宫,尊贵为落陷;缓解条件待核(见格局说明)。" if language == "zh" else \ - "dignity Debilitated; mitigating conditions to be checked (see the yoga notes)" + body = "木星落在摩羯座第1宫,尊贵为落陷;有缓解(见格局说明)。" if language == "zh" else \ + "dignity Debilitated; mitigated (see the yoga notes)" # BUG-2280 原值「…缓解条件待核…」 assert body in text and "尊贵为落陷取消" not in text # The original 落陷 always stays next to the clause. assert "落陷取消(Neecha Bhanga)" not in text diff --git a/tests/test_report_neecha_state_2165.py b/tests/test_report_neecha_state_2165.py index cbb47630f..81a216e1b 100644 --- a/tests/test_report_neecha_state_2165.py +++ b/tests/test_report_neecha_state_2165.py @@ -84,11 +84,12 @@ def test_notes_tell_detector_only_from_variant_only() -> None: states = {"Jupiter": "candidate", "Mars": "candidate"} statuses = {"Jupiter": NB, "Mars": "落陷(Debilitated)"} zh = neecha_table_notes(list(statuses), statuses, states, "zh") - assert zh[0].startswith("木星「缓解条件待核」:检测器找到了化解条件,还没有按所选规则逐项核实(格局表写「检测器检出,待核实」)") + # BUG-2280 原值「木星「缓解条件待核」:检测器找到了化解条件,还没有…核实」/ 新值见下 / 原因:负责人 11-23,有缓解就写有缓解 + assert zh[0].startswith("木星有缓解:化解条件和见证星见") assert "「落陷取消(木星)」" in zh[0] - assert zh[1] == "火星「缓解条件待核」:只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理。" + assert zh[1] == "火星有缓解:按另一种读法,化解条件成立;原始的落陷不变。" en = neecha_table_notes(list(statuses), statuses, states, "en") - assert en[0].startswith("Jupiter, \"mitigating conditions to be checked\": the detector found cancellation conditions") + assert en[0].startswith("Jupiter is mitigated: the conditions and witnesses are on") def test_marker_and_its_one_footnote() -> None: @@ -100,10 +101,10 @@ def test_marker_and_its_one_footnote() -> None: assert neecha_marker_cell("落陷(Debilitated)", "zh", "Venus", states) is None assert neecha_marker_cell("入旺(Exalted)", "zh", "Jupiter", states) is None assert neecha_marker_note("Jupiter", NB, "zh", states) == ( - "¹ 木星:落陷;缓解条件待核。缓解条件和见证星见「瑜伽解释」里的「落陷取消(木星)」;缓解不是新的尊贵等级,原始的落陷不变。") - assert neecha_marker_note("Saturn", NB, "en", states).startswith("¹ Saturn: Debilitated; mitigating conditions present. ") + "¹ 木星:落陷;有缓解。缓解条件和见证星见「瑜伽解释」里的「落陷取消(木星)」;缓解不是新的尊贵等级,原始的落陷不变。") + assert neecha_marker_note("Saturn", NB, "en", states).startswith("¹ Saturn: Debilitated; mitigated. ") assert neecha_marker_note("Mars", "落陷(Debilitated)", "zh", states) == ( - "¹ 火星:落陷;缓解条件待核。只有另一种读法下的化解条件成立,默认规则没有成立,这里不按已缓解处理;原始的落陷不变。") + "¹ 火星:落陷;有缓解。按另一种读法,化解条件成立;原始的落陷不变。") # BUG-2280 assert neecha_marker_note("Venus", "落陷(Debilitated)", "zh", states) is None @@ -132,7 +133,7 @@ def test_period_list_prints_the_marker_and_one_footnote(language: str) -> None: states = {"Jupiter": "candidate"} pack = build_dasha_interpretation_pack(_master(language), {"language": language, "neecha_states": states}) page = pack["page_series"][0] - short = "落陷;缓解条件待核" if language == "zh" else "Debilitated; mitigating conditions to be checked" + short = "落陷;有缓解" if language == "zh" else "Debilitated; mitigated" # BUG-2280 原值「落陷;缓解条件待核」 marker = "尊贵落陷¹与星宿" if language == "zh" else "dignity Debilitated¹, and nakshatra" paragraphs = [text for block in page["flow_blocks"] for kind, text in block["sections"] if kind in ("Antar", "Pratyantar")] jupiter = [text for text in paragraphs if ("/ 木星(" if language == "zh" else "/ Jupiter (") in text] @@ -147,8 +148,9 @@ def test_period_list_prints_the_marker_and_one_footnote(language: str) -> None: def test_period_list_without_states_never_reads_as_verified() -> None: page = build_dasha_interpretation_pack(_master("zh"), {"language": "zh"})["page_series"][0] text = " ".join(text for block in page["flow_blocks"] for _kind, text in block["sections"]) - assert "另有缓解条件" not in text and "落陷¹" in text - assert page["footnotes"][0].startswith("¹ 木星:落陷;缓解条件待核。") + # BUG-2280: 已核、待核同一句,测试改成不出现任何待核说法 + assert "缓解条件待核" not in text and "落陷¹" in text + assert page["footnotes"][0].startswith("¹ 木星:落陷;有缓解。") def _section_counts(text: str, needle: str) -> dict[str, int]: @@ -166,7 +168,7 @@ def _section_counts(text: str, needle: str) -> dict[str, int]: def test_public_chart_period_lists_use_the_marker(language: str) -> None: _packet, chinese, english = public_chart_reports("barack_obama_1961_aa") text = chinese if language == "zh" else english - short = "落陷;缓解条件待核" if language == "zh" else "Debilitated; mitigating conditions to be checked" + short = "落陷;有缓解" if language == "zh" else "Debilitated; mitigated" # BUG-2280 原值「落陷;缓解条件待核」 pd_heading = "#### 木星 PD" if language == "zh" else "#### Pratyantar Dasha of Jupiter" # 原值:中英各 97 处短句(木星 PD 段 72、AD 段 9);新值:PD 段 0,AD 段只剩每页脚注 9 条 # 原因:BUG-2165(占星师 2026-11-22 §4:避免九次复制同一句) @@ -179,8 +181,8 @@ def test_public_chart_period_lists_use_the_marker(language: str) -> None: assert text.count(marker) == 81 assert text.count(short) <= 30 # Summary tables keep the short sentence (planet table row). - row = "| 木星 | 土星 | 太阳 | 金星 | 木星 | 落陷;缓解条件待核 | 0.96 |" if language == "zh" else \ - "| Jupiter | Saturn | Sun | Venus | Jupiter | Debilitated; mitigating conditions to be checked | 0.96 |" + row = "| 木星 | 土星 | 太阳 | 金星 | 木星 | 落陷;有缓解 | 0.96 |" if language == "zh" else \ + "| Jupiter | Saturn | Sun | Venus | Jupiter | Debilitated; mitigated | 0.96 |" # BUG-2280 assert row in text diff --git a/tests/test_report_reader_main.py b/tests/test_report_reader_main.py index 990b11a44..2ca64df7d 100644 --- a/tests/test_report_reader_main.py +++ b/tests/test_report_reader_main.py @@ -436,8 +436,9 @@ def test_reader_headings_drop_field_jargon_and_dignity_is_one_name(reader_packet # 原值: "落陷;另有缓解条件¹"(没有 states 也按已核) # 新值: "落陷;缓解条件待核"(没有 states 时不说已核,待核格不带 ¹,表下另有说明) # 原因: BUG-2165(占星师 2026-11-22 §4):「已核」只看格局表那一行的核实状态 - assert _dignity_label("落陷取消(Neecha Bhanga)") == "落陷;缓解条件待核" - assert _dignity_label("落陷取消(Neecha Bhanga)", "zh", "Jupiter", {"Jupiter": "verified"}) == "落陷;另有缓解条件¹" + # 原值: "落陷;缓解条件待核" / "落陷;另有缓解条件¹";新值: 「落陷;有缓解」一句;原因: BUG-2280(负责人 11-23) + assert _dignity_label("落陷取消(Neecha Bhanga)").startswith("落陷;有缓解") + assert _dignity_label("落陷取消(Neecha Bhanga)", "zh", "Jupiter", {"Jupiter": "verified"}) == "落陷;有缓解¹" assert _dignity_label("极敌(Great Enemy)") == "极敌" assert _dignity_label("中性") == "中性" assert _dignity_label(None) == "" diff --git a/tests/test_report_wording_2024.py b/tests/test_report_wording_2024.py index 0854a19bf..5bb1db376 100644 --- a/tests/test_report_wording_2024.py +++ b/tests/test_report_wording_2024.py @@ -46,13 +46,15 @@ def test_cancelled_debilitation_reads_in_the_astrologers_wording_everywhere_in_t assert out["yogas"]["rows"][0]["planets"]["Jupiter"]["dignity"] == NEECHA_BHANGA_READER_ZH unknown = _neecha_bhanga_reader_label(facts) assert unknown["planets"]["Jupiter"]["d1_dignity_zh"] == NEECHA_CANDIDATE_READER_ZH - assert NEECHA_BHANGA_READER_ZH not in str(unknown) + # BUG-2280: 已核与待核同一句,这条改成「待核」两字不出现。 + assert "待核" not in str(unknown) # The yoga's own name is not the planet label and stays. assert out["yogas"]["rows"][0]["name_cn"] == "落陷取消" # BUG-2030 原值:含「不等于入旺」、以「落陷,」开头 / 新值:她给用户的说法 / 原因:11-19 第二次答复的分层规则 # BUG-2163 原值「落陷;这一配置的不利影响有缓解因素,但不能据此认为困难全部消失」/ 新值:她 11-22 §4(E)的短写法加边界 / # 原因:表格与正文按真实状态分开写,引擎标签是「已核」 - assert NEECHA_BHANGA_READER_ZH == "落陷;另有缓解条件,不代表困难全部消失" + # BUG-2280 原值「落陷;另有缓解条件,不代表困难全部消失」/ 新值「落陷;有缓解」/ 原因:负责人 11-23 + assert NEECHA_BHANGA_READER_ZH == "落陷;有缓解" assert "入旺" not in NEECHA_BHANGA_READER_ZH and "取消条件" not in NEECHA_BHANGA_READER_ZH # The input is not changed in place. assert facts["planets"]["Jupiter"]["d1_dignity_zh"] == "落陷取消" @@ -89,7 +91,7 @@ def test_debilitation_wording_follows_the_verified_state_bug_2163(): states = {"Jupiter": "verified", "Mars": "candidate", "Venus": "not_computed", "Saturn": "self_reference_only"} out = _neecha_bhanga_reader_label(facts, None, states)["planets"] assert out["Jupiter"]["d1_dignity_zh"] == NEECHA_BHANGA_READER_ZH - assert out["Mars"]["d1_dignity_zh"] == NEECHA_CANDIDATE_READER_ZH == "落陷;缓解条件待核" + assert out["Mars"]["d1_dignity_zh"] == NEECHA_CANDIDATE_READER_ZH == "落陷;有缓解" # BUG-2280 原值「落陷;缓解条件待核」 assert out["Mars"]["d1_dignity"] == "落陷(Debilitated)" assert out["Venus"]["d1_dignity_zh"] == out["Saturn"]["d1_dignity_zh"] == "落陷" # An engine label whose state the witness check marks as a candidate never reads as mitigated.