fix: synastry readers get one plain sentence when no event has a timing basis; scan periods and system gaps stay backstage (BUG-2029)
Astrologer 2026-11-19, layering rule and Q19. The page and export drop the exploratory block; the appendix and stored rows use her sentences and keep the four no-period states apart; the follow-up no longer volunteers scan periods or reads system gaps out as missing data. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
This commit is contained in:
@@ -27283,3 +27283,15 @@
|
||||
- 验证与防复发:新增 `tests/consult-basis-display-2031.test.tsx`;`consult-basis-candidate-status-1824` 的页面断言按新值更新并注明原因;问答测试 903 通过。
|
||||
- 关联记录:BUG-1981、BUG-1824、BUG-2030;占星师 11-19 第二次答复。
|
||||
- 修复版本:`claude/qa-display-2031`,待 staging。
|
||||
|
||||
## BUG-2029 | 合盘:研究扫描的时间段仍给读者看;系统缺规则、缺依据被写成「盘里没有」或念给用户
|
||||
|
||||
- 状态:fixed-pending-verify(待测试环境真机复测;新写作规则没有用一次完整生成验证)。
|
||||
- 首次发现 / 最近更新:2026-11-19 / 2026-11-19。
|
||||
- 触发与现象:占星师 2026-11-19 第二次答复(第 19 条和分层规则)。(1)页面和导出有折叠的「探索性结果」,列出扫描到的时间段;追问被要求提到这些时间段。(2)附录和保存的事件行把「依据没有建立」写成「两人各自的盘里都没有针对这类事件的依据」,把规则没接入写成某个人「资料不足」。(3)追问材料把「还没有判断规则」这类系统缺口原样交给模型。(4)旧报告「关系如何推进」正文里有「可参考的推进窗口在某年到某年」,追问把它当作窗口复述给用户。
|
||||
- 触发条件:合盘完整报告的页面、导出和追问。
|
||||
- 根因:BUG-2014、BUG-2022、BUG-2026 是按她上一轮答复做的,那一轮把给开发的规则和给用户的文字混在了一起;她这次分了层:研究扫描默认不作为事件预测展示,系统缺口不向用户解释。「没有依据」那一句是我们对上游状态 `not_established` 的误读:它包含证据被挡住或缺失的情况。写作规则允许把扫描日期写成研究参考,所以正文里有窗口的说法。
|
||||
- 修复:读者一层:页面和导出去掉「探索性结果」,没有正式候选时在「关系事件」下写一句「目前还不能给出有充分依据的时间段。」;引导句不再提研究扫描。附录和保存的事件行改用她第 19 条的原句,四种状态在数据里分开(`formalState`、`scanState`),规则没接入不写成资料不足;研究扫描一栏有区间时带她的原句。追问材料的事件行只带读者的话和单列的扫描区间,阅读说明改为先答不能给出时间段、不主动列区间、用户明确问才说;旧正文里带年份的句子不进时间两节的追问材料。追问内部用词表加上「恒真」「具名规则」「方法版本」「尚未接入」「判断规则」,残留说法换成读者的话。写作规则改为正文不写扫描到的日期或时间段。旧报告的事件行在读取时换成现行说法。
|
||||
- 验证与防复发:新增 `frontend/tests/synastry-user-layer-2029.test.tsx`;六个测试文件里钉住旧说法的断言按原值、新值、原因更新。公开名人盘离线渲染前后对照。两次真实追问(DeepSeek flash):两段式问题答出两人的星宿,时间部分先说给不出有充分依据的时间段,但随后复述了旧正文里的「可参考的推进窗口」,据此加了第(4)项修复,修复后没有再调模型,只由测试和离线材料检查覆盖;明确问有没有算出过时间段的问题,回答说有探索性的扫描区间并说明不能据此判断事件会发生。已保存报告正文里的窗口句子仍在页面上,要重新生成才会消失。
|
||||
- 关联记录:BUG-2014、BUG-2022、BUG-2026、BUG-2002。之前的测试钉的是上一轮答复的说法,没有检查保存的正文会把扫描区间带进追问。
|
||||
- 修复版本:`claude/synastry-user-layer-2029`。
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
synastryAskSectionOrder, synastrySectionOrder, synastrySectionTitle,
|
||||
SYNASTRY_FOOTNOTE, TALK_TOGETHER, type SynastryAskSectionId,
|
||||
} from "@/lib/synastry-full-sections";
|
||||
import { currentSynastryEvents, currentSynastryEventStatus, EVENT_OVERLAP_NOTE, EXPLORATORY_NOTE, EXPLORATORY_TITLE, exploratorySynastryEvents, readerSynastryEvents } from "@/lib/synastry-full-timeline";
|
||||
import { currentSynastryEvents, currentSynastryEventStatus, EVENT_OVERLAP_NOTE, readerEventNotice, readerSynastryEvents } from "@/lib/synastry-full-timeline";
|
||||
import type { SynastryStructure } from "@/lib/synastry-report-structure";
|
||||
import { RAMAN_COMPARISON_NOTES, selectedTraditionalBlock, type TechnicalBlock } from "@/lib/synastry-full-technical";
|
||||
import { dragScroll } from "@/lib/drag-scroll";
|
||||
@@ -161,10 +161,12 @@ export function SynastryReportView(props: {
|
||||
const birthScenarios = readReportBirthScenarios(snapshot.birthScenarios);
|
||||
const structure = body.structure ?? snapshot.structure;
|
||||
const order = synastrySectionOrder(structure);
|
||||
// BUG-2002, BUG-2014: the body table holds formal candidates only; scan-only results sit in a collapsed block.
|
||||
// BUG-2002, BUG-2014: the body table holds formal candidates only.
|
||||
// BUG-2029 (astrologer 2026-11-19, layering rule): scan-only results are not shown to readers; when no
|
||||
// event has a basis for a period the reader gets one plain sentence, and the reasons stay in the appendix.
|
||||
const savedEvents = currentSynastryEvents(body.events, undefined, { a: names.a ?? "", b: names.b ?? "" }, language);
|
||||
const events = readerSynastryEvents(savedEvents, language, reportNames);
|
||||
const exploratory = exploratorySynastryEvents(savedEvents, language, reportNames);
|
||||
const eventNotice = readerEventNotice(savedEvents, events, language);
|
||||
const scope = body.scope ?? snapshot.scope;
|
||||
const scopeNote = scope?.status === "limited"
|
||||
? (language === "en"
|
||||
@@ -186,10 +188,11 @@ export function SynastryReportView(props: {
|
||||
basis: segment.basis ?? "",
|
||||
})),
|
||||
events: readerSynastryEvents(currentSynastryEvents(source.events, undefined, { a: names.a ?? "", b: names.b ?? "" }, target), target, reportNames),
|
||||
exploratory: {
|
||||
title: EXPLORATORY_TITLE[target], note: EXPLORATORY_NOTE[target],
|
||||
events: exploratorySynastryEvents(currentSynastryEvents(source.events, undefined, { a: names.a ?? "", b: names.b ?? "" }, target), target, reportNames),
|
||||
},
|
||||
eventNotice: readerEventNotice(
|
||||
currentSynastryEvents(source.events, undefined, { a: names.a ?? "", b: names.b ?? "" }, target),
|
||||
readerSynastryEvents(currentSynastryEvents(source.events, undefined, { a: names.a ?? "", b: names.b ?? "" }, target), target, reportNames),
|
||||
target,
|
||||
),
|
||||
eventNote: EVENT_OVERLAP_NOTE[target],
|
||||
practices: source.practices,
|
||||
technical: snapshot?.technical,
|
||||
@@ -203,7 +206,7 @@ export function SynastryReportView(props: {
|
||||
return (
|
||||
<section key="timeline" className="synastry-section">
|
||||
<h2>{heading(index, synastrySectionTitle("timeline", language, structure), language)}</h2>
|
||||
{language === "zh" ? <p className="lead">{structure ? "先看两个人各自走到的阶段,再看关系事件的研究扫描。" : "把两个人各自走到的人生阶段放在一起看,这段关系在哪段时间会是什么样子。说的是倾向和条件,不是会发生什么的预言。"}</p> : null}
|
||||
{language === "zh" ? <p className="lead">{structure ? "先看两个人各自走到的阶段,再看关系事件。" : "把两个人各自走到的人生阶段放在一起看,这段关系在哪段时间会是什么样子。说的是倾向和条件,不是会发生什么的预言。"}</p> : null}
|
||||
<ol className="synastry-tl">
|
||||
{(body?.timeline ?? []).map((segment, segmentIndex) => (
|
||||
<li key={segment.id}>
|
||||
@@ -223,29 +226,24 @@ export function SynastryReportView(props: {
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
{events.length > 0 || exploratory.length > 0 ? (
|
||||
{events.length > 0 || eventNotice ? (
|
||||
<div className="synastry-events">
|
||||
<h3>{language === "en" ? "Relationship events" : "关系事件"}</h3>
|
||||
{events.length > 0 ? (
|
||||
<ul>
|
||||
{events.map((event) => (
|
||||
<li key={event.eventClass}>
|
||||
<p><b>{event.title}</b></p>
|
||||
{event.formal ? <p>{event.formal}</p> : null}
|
||||
{event.research ? <p>{event.research}</p> : null}
|
||||
{event.conflict ? <p>{event.conflict}</p> : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : null}
|
||||
{exploratory.length > 0 ? (
|
||||
<details className="synastry-why">
|
||||
<summary>{EXPLORATORY_TITLE[language]}</summary>
|
||||
<p>{EXPLORATORY_NOTE[language]}{language === "en" ? "." : "。"}</p>
|
||||
{exploratory.map((event) => <p key={event.eventClass}><b>{event.title}</b>{language === "en" ? ": " : ":"}{event.text}</p>)}
|
||||
<>
|
||||
<ul>
|
||||
{events.map((event) => (
|
||||
<li key={event.eventClass}>
|
||||
<p><b>{event.title}</b></p>
|
||||
{event.formal ? <p>{event.formal}</p> : null}
|
||||
{event.research ? <p>{event.research}</p> : null}
|
||||
{event.conflict ? <p>{event.conflict}</p> : null}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<p>{EVENT_OVERLAP_NOTE[language]}</p>
|
||||
</details>
|
||||
) : <p>{EVENT_OVERLAP_NOTE[language]}</p>}
|
||||
</>
|
||||
) : <p>{eventNotice}</p>}
|
||||
</div>
|
||||
) : null}
|
||||
</section>
|
||||
|
||||
@@ -181,13 +181,22 @@ export function auditSynastryAnswer(answer: string, material: unknown): {
|
||||
|
||||
// BUG-2001: our own status words and the appendix's instruction lines, when the reply reads them out.
|
||||
// BUG-2022: 「核对规则」「原分不改」 were read out from the event rows and the traditional-matching line.
|
||||
const SYNASTRY_CHAT_INTERNAL_WORDING = [...SYNASTRY_ZH_INTERNAL_WORDING, "执行说明", "结论范围", "核对规则", "原分不改"] as const;
|
||||
// BUG-2029 (astrologer 2026-11-19, layering rule): developer terms never reach a user, and a system gap
|
||||
// is not explained to the user as a missing rule.
|
||||
const SYNASTRY_CHAT_INTERNAL_WORDING = [
|
||||
...SYNASTRY_ZH_INTERNAL_WORDING, "执行说明", "结论范围", "核对规则", "原分不改",
|
||||
"恒真", "具名规则", "方法版本", "尚未接入", "判断规则",
|
||||
] as const;
|
||||
|
||||
// BUG-2022: what is left of our own status sentences after the one rewrite, said in reader words.
|
||||
// Meaning is unchanged; these are the sentences the material used before it was reworded.
|
||||
const SYNASTRY_CHAT_PLAIN_PHRASES: ReadonlyArray<readonly [RegExp, string]> = [
|
||||
[/(?:这一条的|这条的|这一类的)?证据链(?:还没有|尚未|没有)建立/gu, "目前没有这方面的依据"],
|
||||
[/没有这一类事件的核对规则(?:可以套用)?/gu, "这类事件目前没有判断规则"],
|
||||
// 原值 (BUG-2022): 「目前没有这方面的依据」「这类事件目前没有判断规则」
|
||||
// 新值: 她的读者句;原因: BUG-2029,「系统没建立依据」不能说成盘里没有,也不向用户解释系统缺规则。
|
||||
[/(?:这一条的|这条的|这一类的)?证据链(?:还没有|尚未|没有)建立/gu, "目前还不能给出有充分依据的判断"],
|
||||
[/没有这一类事件的核对规则(?:可以套用)?/gu, "这类事件目前还不能给出有充分依据的时间段"],
|
||||
[/(?:本)?系统(?:尚未|还没有|没有)接入[^,。;\n]{0,16}规则/gu, "目前还不能给出有充分依据的时间段"],
|
||||
[/这类事件(?:目前|还)?没有判断规则/gu, "这类事件目前还不能给出有充分依据的时间段"],
|
||||
[/原分不改/gu, "分数不变"],
|
||||
];
|
||||
|
||||
|
||||
@@ -560,8 +560,10 @@ export function userPrompt(input: Readonly<{
|
||||
const task = (structure === "skill_v3" ? updatedTasks[input.sectionId] : undefined) ?? SECTION_TASKS[input.sectionId];
|
||||
const eventTask = input.sectionId === "timeline" || input.sectionId === "progression" ? {
|
||||
// BUG-1919: phrased as things not to write, so the writer does not echo the rules into the text.
|
||||
zh: "五类事件的核对结果和扫描日期由程序在本节末尾单独列出,正文不要提「正式核对」「研究扫描」,也不要复述这些写作要求。正文只写两人各自的阶段和相处条件;不给首次接触、公开关系写日期,不把任何日期写成两人会发生的事,也不写法律婚会通过。",
|
||||
en: "The program lists the event checks and scan dates separately at the end of this section. Do not mention the formal check or the research scan in the text, and do not restate these instructions. Write only about each person's phase and the conditions between them; give no date for first contact or going public, present no date as something that will happen to both, and do not say legal marriage will pass.",
|
||||
// 原值: 「五类事件的核对结果和扫描日期由程序在本节末尾单独列出…」,正文可以把扫描日期写成研究参考
|
||||
// 新值: 正文不写扫描到的日期或时间段;原因: BUG-2029,占星师 2026-11-19 分层规则:研究扫描默认不作为事件预测展示
|
||||
zh: "五类事件的核对结果由程序另行记录,正文不要提「正式核对」「研究扫描」,也不要复述这些写作要求。正文只写两人各自的阶段和相处条件;不写扫描到的日期或时间段,也不写「可参考的窗口」这类说法;不给首次接触、公开关系写日期,不把任何日期写成两人会发生的事,也不写法律婚会通过。",
|
||||
en: "The program records the event checks separately. Do not mention the formal check or the research scan in the text, and do not restate these instructions. Write only about each person's phase and the conditions between them; do not write scan dates or periods, and do not speak of windows to refer to them; give no date for first contact or going public, present no date as something that will happen to both, and do not say legal marriage will pass.",
|
||||
}[input.language] : "";
|
||||
const evidence = JSON.stringify(input.evidence);
|
||||
const keyFacts = sectionKeyFacts(input.evidence);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { signZh } from "./chart-view-labels.ts";
|
||||
import { NAKSHATRA_ZH } from "./panchanga-names-zh.ts";
|
||||
import { displayTechniqueAuditLabel, displayTechniqueAuditNote, techniqueCalculationStatusLabel } from "./consultation-technique-audit.ts";
|
||||
import { hasRamanMatchingProfile } from "./synastry-matching-profiles.ts";
|
||||
import { currentSynastryEventStatus, EVENT_INPUT_LABELS, EVENT_TITLES, EXPLORATORY_NOTE, eventClassRows, eventTimingReason, isScanOnlyEvent, synastryEventTiming } from "./synastry-full-timeline.ts";
|
||||
import { currentSynastryEventStatus, EVENT_INPUT_LABELS, EVENT_TITLES, eventClassRows, eventTimingSentence, isScanOnlyEvent, SCAN_INTERVAL_NOTE, synastryEventTiming } from "./synastry-full-timeline.ts";
|
||||
import { synastryNodeNames } from "./synastry-node-names.ts";
|
||||
|
||||
/**
|
||||
@@ -203,9 +203,10 @@ export function eventTimingBlock(dossier: unknown, names?: Readonly<{ a: string;
|
||||
// appendix (astrologer 2026-11-15 Q1 / Q4); the report body no longer prints the
|
||||
// lines that only say a check was not run.
|
||||
const states = new Map(eventClassRows(dossier, { a: "", b: "" }, language).map((row) => [row.eventClass, row]));
|
||||
// BUG-2022 (astrologer 2026-11-19 ruling 15): a period only the scan found carries her note here too.
|
||||
// BUG-2029 (astrologer 2026-11-19, Q19): a period only the scan found carries her scan-column sentence.
|
||||
// 原值 (BUG-2022): 行尾括注「仅为计算扫描结果,尚不能据此判断事件发生」;新值: 她给研究扫描一栏的原句。
|
||||
const research = (row: ReturnType<typeof states.get>) => !row?.research ? undefined
|
||||
: isScanOnlyEvent(row, language) ? `${row.research}${zh ? `(${EXPLORATORY_NOTE.zh})` : ` (${EXPLORATORY_NOTE.en})`}`
|
||||
: isScanOnlyEvent(row, language) ? `${row.research}${zh ? ";" : "; "}${SCAN_INTERVAL_NOTE[language]}`
|
||||
: row.research;
|
||||
return [
|
||||
version ? (zh ? `研究扫描 ${version}` : `Research scan ${version}`)
|
||||
@@ -256,7 +257,8 @@ export function eventTimingBlock(dossier: unknown, names?: Readonly<{ a: string;
|
||||
] : []),
|
||||
];
|
||||
}),
|
||||
...(event === "legal_marriage" ? [eventTimingReason("annual_layer_not_wired", language)] : []),
|
||||
// 原值: 「缺少年度资料」;新值: 占星师第 19 条的原句;原因: BUG-2029。
|
||||
...(event === "legal_marriage" ? [eventTimingSentence("annual_layer_not_wired", language)] : []),
|
||||
]),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -229,11 +229,24 @@ export type EventClassRow = Readonly<{
|
||||
research?: string;
|
||||
conflict?: string;
|
||||
people: readonly string[];
|
||||
/** BUG-2029: why the formal line gives no period, kept apart in data (see FormalState). */
|
||||
formalState?: FormalState;
|
||||
/** BUG-2029: what the research scan did (found periods, ran without a hit, was not run, ...). */
|
||||
scanState?: string;
|
||||
status?: string;
|
||||
label?: string;
|
||||
windows?: readonly string[];
|
||||
}>;
|
||||
|
||||
/**
|
||||
* BUG-2029 (astrologer 2026-11-19, Q19): four different reasons for "no period" that must never be
|
||||
* merged into 「盘里没有」: the basis for this event class is not built, the rule is not connected,
|
||||
* what the judgment needs has not been obtained, an input is missing. "Ran and found nothing" exists
|
||||
* only for the research scan (scanState no_activation). The dossier does not record a failed annual
|
||||
* computation apart from an annual layer that is not connected, so both read as not_obtained.
|
||||
*/
|
||||
export type FormalState = "candidate" | "observation" | "one_sided" | "basis_not_built" | "rule_not_built" | "not_obtained" | "missing_input";
|
||||
|
||||
type Language = "zh" | "en";
|
||||
type Names = Readonly<{ a: string; b: string }>;
|
||||
type Row = Record<string, unknown>;
|
||||
@@ -253,7 +266,19 @@ const RULE_GAPS: Partial<Record<EventClass, string>> = {
|
||||
first_contact: "no_first_contact_rule",
|
||||
public_formalization: "public_formalization_rule_not_sourced",
|
||||
};
|
||||
/** Generic lead of a saved formal line whose reason this build does not know. */
|
||||
const NO_BASIS = { zh: "目前无法给出有依据的时间段:", en: "No period with a basis can be given yet: " } as const;
|
||||
// BUG-2029 (astrologer 2026-11-19, Q19): her sentences for the appendix and the stored rows.
|
||||
// 原值 (BUG-2022): 「目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」等
|
||||
// 新值: 见下;原因: 「系统没建立依据」「没接入规则」「资料没取得」「缺输入」是四种状态,不能合并成「盘里没有」。
|
||||
const BASIS_NOT_BUILT = {
|
||||
zh: "目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。",
|
||||
en: "A complete basis for timing this kind of event has not been built yet, so no period is given.",
|
||||
} as const;
|
||||
const RULE_NOT_BUILT = {
|
||||
zh: "本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。",
|
||||
en: "The rule this kind of event needs is not connected in this system yet, so no period with a basis can be given.",
|
||||
} as const;
|
||||
const FORMAL_STATUS: Readonly<Record<string, Readonly<Record<Language, string>>>> = {
|
||||
candidate_alignment_requires_event_history: {
|
||||
zh: "两人各自都符合这一类事件的条件,是候选,需要用真实经历核对,不代表已经或一定发生",
|
||||
@@ -261,14 +286,33 @@ const FORMAL_STATUS: Readonly<Record<string, Readonly<Record<Language, string>>>
|
||||
},
|
||||
parallel_observation_only: { zh: "两人各有观察,但还不够判断", en: "There are observations for both people, with too little evidence to draw a conclusion" },
|
||||
one_sided_or_incomplete: { zh: "单侧或证据不完整", en: "One-sided or incomplete evidence" },
|
||||
// BUG-2022 (astrologer 2026-11-19 ruling 15, class one): reader wording for the two "nothing to
|
||||
// give" states. The upstream gate sets not_established when neither person's own evidence is for
|
||||
// this event class, and the site sets no_gate_for_class when the class has no rule at all.
|
||||
// 原值: 「本证据链尚未建立」 / 「暂不能判断:还没有这一类事件的核对规则」
|
||||
// 新值: 「目前无法给出有依据的时间段:……」 加上关键缺口
|
||||
// 原因: 这两句进追问材料,模型照着说成「证据链还没有建立」「没有核对规则可以套用」。
|
||||
not_established: { zh: `${NO_BASIS.zh}两人各自的盘里都没有针对这类事件的依据`, en: `${NO_BASIS.en}neither chart has evidence specific to this event` },
|
||||
no_gate_for_class: { zh: `${NO_BASIS.zh}这类事件还没有判断规则`, en: `${NO_BASIS.en}this event class has no rule yet` },
|
||||
// The upstream gate sets not_established when neither person's evidence is declared for this event
|
||||
// class (that includes evidence that was blocked or missing), so it is "basis not built", never
|
||||
// "ran and both charts lack it". The site sets no_gate_for_class when the class has no rule at all.
|
||||
not_established: BASIS_NOT_BUILT,
|
||||
no_gate_for_class: RULE_NOT_BUILT,
|
||||
};
|
||||
const FORMAL_STATES: Readonly<Record<string, FormalState>> = {
|
||||
candidate_alignment_requires_event_history: "candidate", parallel_observation_only: "observation",
|
||||
one_sided_or_incomplete: "one_sided", not_established: "basis_not_built", no_gate_for_class: "rule_not_built",
|
||||
};
|
||||
/** A blocked formal check, by its recorded reason: her sentence and the state it stands for. */
|
||||
const FORMAL_REASONS: Readonly<Record<string, Readonly<{ state: FormalState; zh: string; en: string }>>> = {
|
||||
public_formalization_rule_not_sourced: { state: "rule_not_built", ...RULE_NOT_BUILT },
|
||||
no_first_contact_rule: { state: "rule_not_built", ...RULE_NOT_BUILT },
|
||||
annual_layer_not_wired: {
|
||||
state: "not_obtained",
|
||||
zh: "这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。",
|
||||
en: "The annual evidence this judgment needs has not been obtained, so this period cannot be checked now.",
|
||||
},
|
||||
vivah_saham_unavailable: {
|
||||
state: "not_obtained",
|
||||
zh: "这条判断所需的婚姻点和年度资料尚未取得,当前不能完成该时间段的核对。",
|
||||
en: "The marriage point and annual evidence this judgment needs have not been obtained, so this period cannot be checked now.",
|
||||
},
|
||||
"modules.relationship_strict_evidence_missing": { state: "missing_input", zh: "资料不足:缺少判断这类事件所需的资料。", en: "Insufficient data: the evidence needed to judge this event is missing." },
|
||||
chart_or_current_dasha_missing: { state: "missing_input", zh: "资料不足:缺少命盘或当前运限。", en: "Insufficient data: the chart or current period is missing." },
|
||||
formal_inputs_missing: { state: "missing_input", zh: "资料不足:缺少判断所需的资料。", en: "Insufficient data: the evidence needed for the judgment is missing." },
|
||||
};
|
||||
const REASONS: Readonly<Record<string, Readonly<Record<Language, string>>>> = {
|
||||
public_formalization_rule_not_sourced: { zh: "公开关系的判断规则还没有出处", en: "A sourced rule for going public is still missing" },
|
||||
@@ -281,6 +325,11 @@ const REASONS: Readonly<Record<string, Readonly<Record<Language, string>>>> = {
|
||||
missing_inputs: { zh: "缺少扫描所需的资料", en: "Required inputs for the scan are missing" },
|
||||
};
|
||||
|
||||
/** BUG-2029: the full sentence for a recorded reason (appendix lines), her Q19 wording. */
|
||||
export function eventTimingSentence(reason: unknown, language: Language): string {
|
||||
return (FORMAL_REASONS[String(reason)] ?? FORMAL_REASONS.formal_inputs_missing)[language];
|
||||
}
|
||||
|
||||
export function eventTimingReason(reason: unknown, language: Language): string {
|
||||
return (REASONS[String(reason)] ?? REASONS.formal_inputs_missing)[language];
|
||||
}
|
||||
@@ -294,7 +343,7 @@ export const EVENT_INPUT_LABELS: Readonly<Record<string, Readonly<Record<Languag
|
||||
Vimshottari: { zh: "Vimshottari 运限", en: "Vimshottari periods" },
|
||||
Narayana: { zh: "Narayana 运限", en: "Narayana periods" },
|
||||
transits: { zh: "木星和土星行运", en: "Jupiter and Saturn transits" },
|
||||
annual: { zh: "年度层", en: "Annual evidence" },
|
||||
annual: { zh: "年度资料", en: "Annual evidence" },
|
||||
};
|
||||
|
||||
function asRow(value: unknown): Row {
|
||||
@@ -425,22 +474,34 @@ function eventNames(names: Names, language: Language): Names {
|
||||
|
||||
function personLine(name: string, side: { status: unknown; missing: string[]; reason: unknown }, language: Language): string {
|
||||
const missing = side.missing.map((key) => EVENT_INPUT_LABELS[key]?.[language]).filter(Boolean).join(language === "zh" ? "、" : ", ");
|
||||
// BUG-2029 (astrologer 2026-11-19, Q19): a rule that is not connected is a system gap and is not
|
||||
// written as the person's missing data. 原值: 「甲:资料不足(缺少首次接触的独立规则)」.
|
||||
const ruleGap = !missing && Object.values(RULE_GAPS).includes(String(side.reason));
|
||||
const reason = missing || (side.reason && side.reason !== "missing_inputs" ? eventTimingReason(side.reason, language) : "");
|
||||
if (language === "zh") {
|
||||
const status = side.status === "activated" ? "有相关运限" : side.status === "not_activated" ? "没有相关运限" : `资料不足${reason ? `(${reason})` : ""}`;
|
||||
const lacking = missing ? `资料不足:缺少${missing}。` : reason ? `资料不足:${reason}。` : "资料不足";
|
||||
const status = side.status === "activated" ? "有相关运限" : side.status === "not_activated" ? "没有相关运限"
|
||||
: ruleGap ? "这类事件的判断规则尚未接入" : lacking;
|
||||
return `${name}:${status}`;
|
||||
}
|
||||
const status = side.status === "activated" ? "Relevant periods found" : side.status === "not_activated" ? "No relevant periods" : `Missing inputs${reason ? ` (${reason})` : ""}`;
|
||||
const lacking = reason ? `Insufficient data: ${missing ? `${missing} missing` : reason}.` : "Insufficient data";
|
||||
const status = side.status === "activated" ? "Relevant periods found" : side.status === "not_activated" ? "No relevant periods"
|
||||
: ruleGap ? "The rule for this kind of event is not connected yet" : lacking;
|
||||
return `${name}: ${status}`;
|
||||
}
|
||||
|
||||
/** Astrologer 2026-11-19, Q19: the sentence of the research-scan column when it holds intervals. */
|
||||
export const SCAN_INTERVAL_NOTE = {
|
||||
zh: "已找到探索性扫描区间,尚不能据此判断该事件会发生。",
|
||||
en: "Exploratory scan intervals were found; they cannot yet be used to judge that this event will happen.",
|
||||
} as const;
|
||||
|
||||
const CONFLICTS: Readonly<Record<string, Readonly<Record<Language, string>>>> = {
|
||||
scan_candidates_not_confirmed_by_gate: {
|
||||
// 原值: 「研究扫描找到的时间段没有通过正式核对,只作研究参考,不是两人的事件窗口。」
|
||||
// 新值: 用占星师 2026-11-19 第 15 条的说法,不再出现「没有通过正式核对」
|
||||
// 原因: BUG-2014。这句会进追问材料,模型会照着说给用户。
|
||||
zh: "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。",
|
||||
en: "These periods are computed scan results only and cannot yet be used to judge that an event will happen. They do not establish a shared event window.",
|
||||
// 原值 (BUG-2014): 「研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。」
|
||||
// 新值: 占星师 2026-11-19 第 19 条给研究扫描一栏的原句;原因: BUG-2029。
|
||||
zh: SCAN_INTERVAL_NOTE.zh,
|
||||
en: SCAN_INTERVAL_NOTE.en,
|
||||
},
|
||||
gate_candidate_without_scan_dates: {
|
||||
zh: "正式核对是候选,但研究扫描没有找到两人重叠的时间段。",
|
||||
@@ -448,8 +509,12 @@ const CONFLICTS: Readonly<Record<string, Readonly<Record<Language, string>>>> =
|
||||
},
|
||||
};
|
||||
|
||||
// 原值: 「(缺年度层,严格核对不能通过)」;新值见下;原因: BUG-2022,附录用读者的话,信息不变。
|
||||
const ANNUAL_SUFFIX = { zh: "(缺少年度资料,尚不能据此判断事件发生)", en: " (Annual evidence is missing, so this cannot yet be used to judge the event.)" } as const;
|
||||
// 原值 (BUG-2022): 「(缺少年度资料,尚不能据此判断事件发生)」;新值见下;原因: BUG-2029,占星师 2026-11-19 第 19 条的原句。
|
||||
// Only legal marriage carries it: that is the one event class whose judgment needs the annual layer.
|
||||
const ANNUAL_SUFFIX = {
|
||||
zh: "(这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对)",
|
||||
en: " (The annual evidence this judgment needs has not been obtained, so this period cannot be checked now.)",
|
||||
} as const;
|
||||
|
||||
/** BUG-2022: true when the row's periods come from the research scan only (no formal candidate). */
|
||||
export function isScanOnlyEvent(row: Pick<EventClassRow, "conflict"> | undefined, language: Language): boolean {
|
||||
@@ -461,8 +526,9 @@ export function eventClassRows(dossier: unknown, names: Names, language: Languag
|
||||
const zh = language === "zh";
|
||||
return synastryEventTiming(dossier)?.classes.map(({ event, formal, candidates, scanStatus, scanReason, alignment, a, b }) => {
|
||||
const title = EVENT_TITLES[event][language];
|
||||
const formalText = FORMAL_STATUS[String(formal.status)]?.[language]
|
||||
?? `${NO_BASIS[language]}${eventTimingReason(formal.reason, language)}`;
|
||||
const blocked = FORMAL_REASONS[String(formal.reason)] ?? FORMAL_REASONS.formal_inputs_missing;
|
||||
const formalText = FORMAL_STATUS[String(formal.status)]?.[language] ?? blocked[language];
|
||||
const formalState = FORMAL_STATES[String(formal.status)] ?? blocked.state;
|
||||
const periods = candidates.map((span) => monthPeriod(span.start, span.end, language)).join(zh ? "、" : ", ");
|
||||
const activeName = a.status === "activated" ? display.a : display.b;
|
||||
const researchText = event === "first_contact" ? (zh ? "不扫描,不借用心动的时间" : "No scan for first contact. Romantic attraction periods are separate.")
|
||||
@@ -479,36 +545,61 @@ export function eventClassRows(dossier: unknown, names: Names, language: Languag
|
||||
research: `${zh ? "研究扫描:" : "Research scan: "}${researchText}${annual}`,
|
||||
conflict: CONFLICTS[alignment.conflict]?.[language],
|
||||
people: [personLine(display.a, a, language), personLine(display.b, b, language)],
|
||||
formalState, scanState: String(scanStatus),
|
||||
};
|
||||
}) ?? [];
|
||||
}
|
||||
|
||||
const LEGACY_COPY = [
|
||||
// BUG-2029: formal lines saved before the astrologer's Q19 sentences (two older generations).
|
||||
...([
|
||||
["缺少婚姻点和年度层,严格核对不能通过", "vivah_saham_unavailable"], ["缺年度层,严格核对不能通过", "annual_layer_not_wired"],
|
||||
["还没有这一类事件的核对规则", "no_first_contact_rule"], ["公开关系的判断规则还没有书证", "no_first_contact_rule"],
|
||||
["缺少首次接触的独立规则", "no_first_contact_rule"], ["缺少关系事件的严格核对资料", "modules.relationship_strict_evidence_missing"],
|
||||
["缺少命盘或当前运限", "chart_or_current_dasha_missing"], ["缺少正式核对所需的资料", "formal_inputs_missing"],
|
||||
] as const).map(([before, reason]) => [`暂不能判断:${before}`, FORMAL_REASONS[reason].zh] as const),
|
||||
...([
|
||||
["缺少婚姻点和年度资料", "vivah_saham_unavailable"], ["缺少年度资料", "annual_layer_not_wired"],
|
||||
["这类事件还没有判断规则", "no_first_contact_rule"], ["公开关系的判断规则还没有出处", "no_first_contact_rule"],
|
||||
["缺少首次接触的独立规则", "no_first_contact_rule"], ["缺少判断这类事件所需的资料", "modules.relationship_strict_evidence_missing"],
|
||||
["缺少命盘或当前运限", "chart_or_current_dasha_missing"], ["缺少判断所需的资料", "formal_inputs_missing"],
|
||||
] as const).map(([before, reason]) => [`${NO_BASIS.zh}${before}`, FORMAL_REASONS[reason].zh] as const),
|
||||
[`${NO_BASIS.zh}两人各自的盘里都没有针对这类事件的依据`, BASIS_NOT_BUILT.zh],
|
||||
["Undetermined: a formal rule for this event class is still missing", RULE_NOT_BUILT.en],
|
||||
[`${NO_BASIS.en}this event class has no rule yet`, RULE_NOT_BUILT.en],
|
||||
[`${NO_BASIS.en}neither chart has evidence specific to this event`, BASIS_NOT_BUILT.en],
|
||||
[`${NO_BASIS.en}Annual evidence is missing`, FORMAL_REASONS.annual_layer_not_wired.en],
|
||||
["(缺少年度资料,尚不能据此判断事件发生)", ANNUAL_SUFFIX.zh],
|
||||
[" (Annual evidence is missing, so this cannot yet be used to judge the event.)", ANNUAL_SUFFIX.en],
|
||||
// BUG-2022: rows and appendix lines saved before the reader wording.
|
||||
["(缺年度层,严格核对不能通过)", ANNUAL_SUFFIX.zh],
|
||||
[" (Annual evidence is missing, so the strict check cannot pass.)", ANNUAL_SUFFIX.en],
|
||||
["缺少婚姻点和年度层,严格核对不能通过", REASONS.vivah_saham_unavailable.zh],
|
||||
["缺年度层,严格核对不能通过", REASONS.annual_layer_not_wired.zh],
|
||||
["暂不能判断:还没有这一类事件的核对规则", FORMAL_STATUS.no_gate_for_class.zh],
|
||||
["Undetermined: a formal rule for this event class is still missing", FORMAL_STATUS.no_gate_for_class.en],
|
||||
["本证据链尚未建立", FORMAL_STATUS.not_established.zh],
|
||||
["This evidence chain is not established yet", FORMAL_STATUS.not_established.en],
|
||||
["缺少关系事件的严格核对资料", REASONS["modules.relationship_strict_evidence_missing"].zh],
|
||||
["缺少正式核对所需的资料", REASONS.formal_inputs_missing.zh],
|
||||
["公开关系的判断规则还没有书证", REASONS.public_formalization_rule_not_sourced.zh],
|
||||
// BUG-2029: a saved person line that put a rule gap down as the person's missing data.
|
||||
...(["缺输入", "资料不足"] as const).flatMap((lead) => (["缺少首次接触的独立规则", "公开关系的判断规则还没有书证", "公开关系的判断规则还没有出处"] as const)
|
||||
.map((gap) => [`:${lead}(${gap})`, ":这类事件的判断规则尚未接入"] as const)),
|
||||
[":缺输入", ":资料不足"],
|
||||
["只有一方被激活,不成双人应期", FORMAL_STATUS.one_sided_or_incomplete.zh],
|
||||
["Only one person is activated; no pair timing", FORMAL_STATUS.one_sided_or_incomplete.en],
|
||||
["这五年里两人都没有被这一类事件激活", FORMAL_STATUS.not_established.zh],
|
||||
["Neither person is activated for this event in these five years", FORMAL_STATUS.not_established.en],
|
||||
// 原值: 映射到「依据尚未建立」;新值: 扫描跑过但没有命中,单独一句;原因: BUG-2029,四种状态不合并。
|
||||
["这五年里两人都没有被这一类事件激活", "这五年里两人都没有相关运限"],
|
||||
["Neither person is activated for this event in these five years", "Neither person has relevant periods in these five years"],
|
||||
["两人都只有一条线支持,证据不够定窗口", "两人各有相关运限,正式核对资料不足"],
|
||||
["Each person has only one lane of support; not enough for a window", "Both people had relevant periods, with insufficient evidence for a formal check"],
|
||||
["有两条以上的线同时激活", "有相关运限"],
|
||||
["activated on two or more lanes", "Relevant periods found"],
|
||||
["只有一条线", "有相关运限"],
|
||||
["one lane only", "Relevant periods found"],
|
||||
["研究扫描找到的时间段没有通过正式核对,只作研究参考,不是两人的事件窗口。", "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。"],
|
||||
["The formal check did not confirm these periods. They are for research reference only and do not establish a shared event window.", "These periods are computed scan results only and cannot yet be used to judge that an event will happen. They do not establish a shared event window."],
|
||||
["研究扫描找到的时间段没有通过正式核对,只作研究参考,不是两人的事件窗口。", SCAN_INTERVAL_NOTE.zh],
|
||||
["研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。", SCAN_INTERVAL_NOTE.zh],
|
||||
["The formal check did not confirm these periods. They are for research reference only and do not establish a shared event window.", SCAN_INTERVAL_NOTE.en],
|
||||
["These periods are computed scan results only and cannot yet be used to judge that an event will happen. They do not establish a shared event window.", SCAN_INTERVAL_NOTE.en],
|
||||
["多体系共识", "研究参考"],
|
||||
["多体系一致", "研究参考"],
|
||||
["multi-system consensus", "research reference"],
|
||||
@@ -554,11 +645,13 @@ const RESEARCH_PREFIX = { zh: "研究扫描:", en: "Research scan: " } as cons
|
||||
const NO_SCAN_PREFIX = { zh: "不扫描", en: "No scan" } as const;
|
||||
const NO_SAVED_SCAN = { zh: "旧报告未记录扫描结果", en: "This saved report has no scan result" } as const;
|
||||
|
||||
/** Astrologer 2026-11-19 ruling 15: the title and the note of the scan block, in her words. */
|
||||
export const EXPLORATORY_TITLE = { zh: "探索性结果", en: "Exploratory results" } as const;
|
||||
export const EXPLORATORY_NOTE = {
|
||||
zh: "仅为计算扫描结果,尚不能据此判断事件发生",
|
||||
en: "Computed scan results only; they cannot yet be used to judge that an event will happen",
|
||||
/**
|
||||
* BUG-2029 (astrologer 2026-11-19, layering rule): what a reader is told when no event class has a
|
||||
* basis for a period. Her sentence; the reasons stay in the appendix and in the stored rows.
|
||||
*/
|
||||
export const READER_NO_EVENT_TIMING = {
|
||||
zh: "目前还不能给出有充分依据的时间段。",
|
||||
en: "No period with enough basis can be given yet.",
|
||||
} as const;
|
||||
|
||||
export type ExploratoryEvent = Readonly<{ eventClass: string; title: string; text: string }>;
|
||||
@@ -575,7 +668,8 @@ function scanOutcome(event: EventClassRow, language: Language): string {
|
||||
if (!text || text.startsWith(NO_SCAN_PREFIX[language]) || text === NO_SAVED_SCAN[language]) return "";
|
||||
if (Object.values(REASONS).some((reason) => reason[language] === text)) return "";
|
||||
// BUG-2022: a legacy row kept its formal status as the scan text; "nothing to give" is not a scan result.
|
||||
if (text.startsWith(NO_BASIS[language]) || Object.values(FORMAL_STATUS).some((status) => status[language] === text)) return "";
|
||||
if (text.startsWith(NO_BASIS[language]) || Object.values(FORMAL_STATUS).some((status) => status[language] === text)
|
||||
|| Object.values(FORMAL_REASONS).some((reason) => reason[language] === text)) return "";
|
||||
// A row saved after BUG-2002 already says "research reference only"; the block's own note covers it.
|
||||
return text.replace(language === "zh" ? /,只作研究参考(?=:)/ : /, for research reference only(?=:)/, "");
|
||||
}
|
||||
@@ -611,10 +705,12 @@ export function readerSynastryEvents(events: readonly EventClassRow[], language:
|
||||
}
|
||||
|
||||
/**
|
||||
* BUG-2014: scan outcomes of the event classes that have no formal candidate.
|
||||
* The page and the export show them in a collapsed block under EXPLORATORY_TITLE
|
||||
* with EXPLORATORY_NOTE. First contact and going public are never scanned, so
|
||||
* they never appear here.
|
||||
* Scan outcomes of the event classes that have no formal candidate. First contact and going public
|
||||
* are never scanned, so they never appear here.
|
||||
* BUG-2029 (astrologer 2026-11-19, layering rule): research-scan results are not shown to readers as
|
||||
* event prediction, so the page and the export no longer print these (BUG-2014 showed them in a
|
||||
* collapsed 「探索性结果」 block). They remain in the stored rows, in the technical appendix
|
||||
* 「关系应期依据」 with SCAN_INTERVAL_NOTE, and in the follow-up material.
|
||||
*/
|
||||
export function exploratorySynastryEvents(events: readonly EventClassRow[], language: Language, names?: Names): ExploratoryEvent[] {
|
||||
return events.flatMap((event) => {
|
||||
@@ -624,6 +720,39 @@ export function exploratorySynastryEvents(events: readonly EventClassRow[], lang
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* BUG-2029: the reader's line under 「关系事件」 when the report has event rows and none of them is a
|
||||
* formal candidate. An old report without event rows gets nothing.
|
||||
*/
|
||||
export function readerEventNotice(saved: readonly EventClassRow[], shown: readonly EventClassRow[], language: Language): string {
|
||||
return saved.length > 0 && shown.length === 0 ? READER_NO_EVENT_TIMING[language] : "";
|
||||
}
|
||||
|
||||
export type FollowupEvent = Readonly<{ eventClass: string; title: string; answer: string; scan_intervals?: string; conflict?: string }>;
|
||||
|
||||
/**
|
||||
* BUG-2029: the event rows as the follow-up model reads them. A formal candidate keeps its line. For
|
||||
* every other state the model gets the reader sentence, not the reason: the reasons are system gaps
|
||||
* (a rule not connected, a basis not built, a layer not obtained), and read out they made a user
|
||||
* think their own data was missing. Scan intervals stay as knowledge under their own key with her
|
||||
* sentence; SYNASTRY_SCAN_NOTE says when they may be mentioned.
|
||||
*/
|
||||
export function followupSynastryEvents(events: readonly EventClassRow[], language: Language): FollowupEvent[] {
|
||||
return events.map((event) => {
|
||||
const candidate = isCandidateFormal(event, language);
|
||||
const formal = (event.formal ?? "").replace(FORMAL_PREFIX[language], "");
|
||||
const outcome = event.eventClass === "first_contact" ? "" : scanOutcome(event, language);
|
||||
const intervals = /\d{4}/.test(outcome);
|
||||
return {
|
||||
eventClass: event.eventClass, title: event.title,
|
||||
answer: candidate ? formal : READER_NO_EVENT_TIMING[language],
|
||||
...(intervals ? { scan_intervals: `${outcome.replace(/^[^::]*[::]\s*/u, "")}(${SCAN_INTERVAL_NOTE[language].replace(/[。.]$/u, "")})` } : {}),
|
||||
...(candidate && event.conflict === CONFLICTS.gate_candidate_without_scan_dates[language]
|
||||
? { conflict: language === "zh" ? "按现有依据是候选,但没有找到两人重叠的时间段。" : "On the current basis this is a candidate; no overlapping period was found." } : {}),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export const EVENT_OVERLAP_NOTE = {
|
||||
zh: "两人的运限同时落在一段时间里,只说明各自的背景。研究扫描只按大运找时间段,Narayana 和行运作为条件列出,不按条数计票。",
|
||||
en: "Periods running at the same time only describe each person's circumstances. The research scan finds dates using Vimshottari periods and records Narayana and transits as accompanying conditions.",
|
||||
|
||||
@@ -40,8 +40,8 @@ export type SynastryExportInput = Readonly<{
|
||||
sections: unknown;
|
||||
timeline: readonly Readonly<{ heading: string; text: string; basis: string }>[];
|
||||
events: unknown;
|
||||
/** BUG-2014: scan-only results, printed under their own heading with the astrologer's note. */
|
||||
exploratory?: Readonly<{ title: string; note: string; events: readonly Readonly<{ title: string; text: string }>[] }>;
|
||||
/** BUG-2029: the one reader sentence when no event class has a basis for a period (scan results are not exported to readers). */
|
||||
eventNotice?: string;
|
||||
eventNote: string;
|
||||
practices: unknown;
|
||||
technical: unknown;
|
||||
@@ -66,16 +66,10 @@ export function buildSynastryExportBlocks(input: SynastryExportInput): ReportExp
|
||||
...[event.formal, event.research, event.conflict].map(text).filter(Boolean).map((line) => `- ${line}`),
|
||||
...(Array.isArray(event.people) ? event.people.map(text).filter(Boolean).map((line) => `- ${line}`) : []),
|
||||
].join("\n"));
|
||||
const scanned = input.exploratory?.events ?? [];
|
||||
blocks.push(block(`body:${id}`, "body", title, [
|
||||
...lines,
|
||||
...(events.length || scanned.length ? [`### ${zh ? "关系事件" : "Relationship events"}`, ...events] : []),
|
||||
...(scanned.length && input.exploratory ? [
|
||||
`#### ${input.exploratory.title}`,
|
||||
`${input.exploratory.note}${zh ? "。" : "."}`,
|
||||
scanned.map((event) => `- **${event.title}**${zh ? ":" : ": "}${event.text}`).join("\n"),
|
||||
] : []),
|
||||
...(events.length || scanned.length ? [input.eventNote] : []),
|
||||
...(events.length ? [`### ${zh ? "关系事件" : "Relationship events"}`, ...events, input.eventNote]
|
||||
: input.eventNotice ? [`### ${zh ? "关系事件" : "Relationship events"}`, input.eventNotice] : []),
|
||||
]));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
type SynastryAskSectionId,
|
||||
type SynastrySectionId,
|
||||
} from "@/lib/synastry-full-sections";
|
||||
import { currentSynastryEvents, currentSynastryEventStatus, isScanOnlyEvent } from "@/lib/synastry-full-timeline";
|
||||
import { currentSynastryEvents, currentSynastryEventStatus, followupSynastryEvents } from "@/lib/synastry-full-timeline";
|
||||
import type { SynastryStructure } from "@/lib/synastry-report-structure";
|
||||
import { currentSynastryTechnicalBlocks, pairMoonLines, type TechnicalBlock } from "@/lib/synastry-full-technical";
|
||||
|
||||
@@ -84,32 +84,30 @@ function technicalLines(block: TechnicalBlock): string[] {
|
||||
* HOUSE_LABEL_NOTE: the birth-time note lists three different house values per planet (own chart,
|
||||
* the other person's planet in this person's D1, the same in D9) under similar labels; an answer
|
||||
* mixed 「乙的月亮落在甲的第 4 宫」 with 「乙方月亮落宫 12 → 1」 as if they were one placement.
|
||||
* SCAN_NOTE: astrologer 2026-11-19 ruling 15. The model may mention scan periods, only as what they are.
|
||||
*/
|
||||
export const SYNASTRY_HOUSE_LABEL_NOTE = {
|
||||
zh: "宫位标注的读法:「甲方月亮落宫」是甲自己的月亮在甲本命盘里的宫位;「甲方本命盘对方月亮落宫」是乙的月亮落在甲本命盘里的宫位;「甲方九分盘对方月亮落宫」是乙的月亮落在甲九分盘(D9)里的宫位,不是本命盘宫位;「乙→甲:…落在第…宫(甲盘)」也是乙的星落在甲本命盘里的宫位。其他星体和乙方各项同样读。这几种是不同的宫位,说宫位会不会随出生时间变化时,只用同一种标注的数值。",
|
||||
en: "How to read the house labels: \"Person A Moon house\" is A's own Moon in A's own chart; \"Person A D1 incoming Moon house\" is B's Moon in A's birth chart; \"Person A D9 incoming Moon house\" is B's Moon in A's navamsa, not a birth-chart house. These are different placements; when saying whether a house changes with birth time, use values from one label only.",
|
||||
} as const;
|
||||
/**
|
||||
* BUG-2029 (astrologer 2026-11-19, layering rule; replaces the BUG-2022 / BUG-2026 note that told the
|
||||
* model to mention scan periods). Asked "when", the answer is that no period with enough basis can be
|
||||
* given yet, followed by what can be judged. Scan intervals are not volunteered; the reasons (a rule
|
||||
* not connected, a basis not built) are system gaps and are not read out to the user.
|
||||
*/
|
||||
export const SYNASTRY_SCAN_NOTE = {
|
||||
zh: "事件行里「探索性结果」列出的时间段只是计算扫描的结果:用户问到这类事件的时间时,可以告诉用户扫描到这些时间段,同时说明它们仅为计算扫描结果,尚不能据此判断事件发生;不要把它们说成事件会发生的时间,也不要略过不提。",
|
||||
en: "Periods listed under \"Exploratory results\" in the event rows are computed scan results only: when the user asks about the timing of such an event, you may say the scan found these periods, and that they cannot yet be used to judge that the event will happen. Do not present them as when the event will happen, and do not leave them out.",
|
||||
zh: "用户问某件事什么时候发生(心动、在一起、公开、结婚),而事件行的 answer 是「目前还不能给出有充分依据的时间段」时:先直接这样回答,再说这段关系里现在能判断的部分(两人各自走到的阶段、相处的倾向)。不要主动列出 scan_intervals 里的区间,不要说成原因出在系统、规则或资料上,也不要让用户以为是自己的资料没填好。只有用户明确问有没有算出过可能的时间段时,才可以说有探索性的扫描区间并列出,同时说明尚不能据此判断该事件会发生;不把它们叫作「窗口」。",
|
||||
en: "When the user asks when something will happen (attraction, becoming a couple, going public, marriage) and the event row's answer is that no period with enough basis can be given yet: say exactly that first, then what can be judged about the relationship now. Do not volunteer the periods under scan_intervals, do not attribute the gap to the system, a rule or missing data, and do not let the user think their own data is incomplete. Only when the user explicitly asks whether any possible periods were computed may you say that exploratory scan intervals exist and list them, adding that they cannot yet be used to judge that the event will happen; do not call them windows.",
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* BUG-2026: the follow-up material only. The event rows began with 「正式核对:」 and 「研究扫描:」,
|
||||
* both on the internal-word list, so the model read them out and most timing questions paid for a
|
||||
* second, wording-only model call. The page and the appendix keep their strings; the writing gate
|
||||
* never sees this material (it is built at read time for the follow-up chat).
|
||||
* BUG-2026: the follow-up material only; the writing gate never sees it (it is built at read time).
|
||||
* BUG-2029: the event rows themselves are now projected by followupSynastryEvents; this relabel is
|
||||
* left for the one boundary sentence inside the raw event evidence.
|
||||
*/
|
||||
const MATERIAL_RELABEL: ReadonlyArray<readonly [RegExp, string]> = [
|
||||
[/^正式核对:/u, ""],
|
||||
[/^Formal check: /u, ""],
|
||||
[/^研究扫描:/u, "探索性结果:"],
|
||||
[/^Research scan: /u, "Exploratory results: "],
|
||||
[/^研究扫描找到的时间段/u, "探索性结果里的时间段"],
|
||||
[/^正式核对是候选,但研究扫描没有找到/u, "按现有依据是候选,但探索性结果里没有"],
|
||||
[/^The formal check identifies a candidate\. The research scan found/u, "On the current basis this is a candidate. The exploratory scan found"],
|
||||
[/扫描日期只作研究参考。两人的事件只按正式核对写。/u, "扫描日期只是计算扫描的结果,不是两人的事件时间。"],
|
||||
[/Scan periods are for research reference only\. Only the formal check may inform conclusions about a shared event\./u, "Scan periods are computed scan results only, not the time of a shared event."],
|
||||
];
|
||||
|
||||
function materialLabel(value: unknown): unknown {
|
||||
@@ -117,10 +115,6 @@ function materialLabel(value: unknown): unknown {
|
||||
return MATERIAL_RELABEL.reduce((text, [pattern, replacement]) => text.replace(pattern, replacement), value);
|
||||
}
|
||||
|
||||
function relabelEventRows(events: ReadonlyArray<Record<string, unknown>>): Array<Record<string, unknown>> {
|
||||
return events.map((row) => Object.fromEntries(Object.entries(row).map(([key, value]) => [key, materialLabel(value)])));
|
||||
}
|
||||
|
||||
/** BUG-2026: the answer still said 甲 / 乙 although the report shows the two names. */
|
||||
export function synastryNameNote(names: { a: string; b: string }, language: "zh" | "en"): string | undefined {
|
||||
if (!names.a || !names.b || names.a === names.b) return undefined;
|
||||
@@ -135,6 +129,12 @@ export function synastryEventTimingSection(payload: unknown): "progression" | "t
|
||||
return body?.structure === "skill_v3" ? "progression" : "timeline";
|
||||
}
|
||||
|
||||
/** BUG-2029: drop the sentences of saved prose that name a calendar year (see synastrySectionMaterial). */
|
||||
export function withoutDatedSentences(text: string): string {
|
||||
return (text.match(/[^。!?!?\n]*[。!?!?\n]?/gu) ?? []).filter((sentence) => !/(?:19|20)\d{2}/.test(sentence)).join("")
|
||||
.replace(/\n{3,}/g, "\n\n").trim();
|
||||
}
|
||||
|
||||
function evidenceText(material: Record<string, unknown>): string {
|
||||
return JSON.stringify(material.evidence ?? "");
|
||||
}
|
||||
@@ -151,10 +151,16 @@ export function synastrySectionMaterial(input: {
|
||||
const structure = body?.structure;
|
||||
const names = record(payload.names);
|
||||
const section = body?.sections?.find((item) => item.id === input.sectionId);
|
||||
// BUG-2029: reports written before the layering rule put scan periods into the prose of the
|
||||
// event-timing sections (「可参考的推进窗口在 2026 年底到 2028 年春」); the follow-up read them back
|
||||
// to the user as windows. In these two sections a sentence that names a calendar year is such a
|
||||
// period (the writer gives no event dates there; the dasha phases travel in `timeline`).
|
||||
const timingSection = input.sectionId === "timeline" || input.sectionId === "progression";
|
||||
const prose = (value: unknown) => typeof value !== "string" ? "" : timingSection ? withoutDatedSentences(value) : value;
|
||||
const reasons = (section?.reasons ?? []).slice(0, 3).map((reason) => ({
|
||||
basis: typeof reason.basis === "string" ? reason.basis : "",
|
||||
plain: typeof reason.plain === "string" ? reason.plain : "",
|
||||
}));
|
||||
basis: prose(reason.basis),
|
||||
plain: prose(reason.plain),
|
||||
})).filter((reason) => reason.basis);
|
||||
const timeline = input.sectionId === "timeline"
|
||||
? (body?.timeline ?? []).slice(0, 8).map((segment) => ({
|
||||
phase: segment.phase ?? "",
|
||||
@@ -169,7 +175,7 @@ export function synastrySectionMaterial(input: {
|
||||
a: typeof names?.a === "string" ? names.a : "",
|
||||
b: typeof names?.b === "string" ? names.b : "",
|
||||
},
|
||||
text: section?.text ?? "",
|
||||
text: prose(section?.text),
|
||||
reasons,
|
||||
evidence: scrub(sectionEvidence(payload.dossier, input.sectionId, timeline, language, structure)),
|
||||
};
|
||||
@@ -185,11 +191,10 @@ export function synastrySectionMaterial(input: {
|
||||
}, language);
|
||||
if (events.length) material.events = events;
|
||||
}
|
||||
const scanOnly = Array.isArray(material.events)
|
||||
&& (material.events as Array<{ conflict?: string }>).some((row) => isScanOnlyEvent(row, language));
|
||||
if (Array.isArray(material.events)) {
|
||||
// BUG-2026: reader-neutral labels in the follow-up material; the saved rows are untouched.
|
||||
material.events = relabelEventRows(material.events as Array<Record<string, unknown>>);
|
||||
// BUG-2029: what the follow-up model reads of the event rows (reader sentence, scan intervals apart).
|
||||
const hasEvents = Array.isArray(material.events);
|
||||
if (hasEvents) {
|
||||
material.events = followupSynastryEvents(material.events as Parameters<typeof followupSynastryEvents>[0], language);
|
||||
const evidence = record(material.evidence);
|
||||
const eventTimeline = record(evidence?.event_timeline);
|
||||
if (evidence && eventTimeline && typeof eventTimeline.boundary === "string") {
|
||||
@@ -201,7 +206,7 @@ export function synastrySectionMaterial(input: {
|
||||
if (moon.length) material.pair_moon = moon;
|
||||
const notes = [
|
||||
...(/落宫|incoming .* house|落在第/u.test(evidenceText(material)) ? [SYNASTRY_HOUSE_LABEL_NOTE[language]] : []),
|
||||
...(scanOnly ? [SYNASTRY_SCAN_NOTE[language]] : []),
|
||||
...(hasEvents ? [SYNASTRY_SCAN_NOTE[language]] : []),
|
||||
...[synastryNameNote(material.names as { a: string; b: string }, language)].filter((note): note is string => Boolean(note)),
|
||||
];
|
||||
if (notes.length) material.reading_notes = notes;
|
||||
|
||||
@@ -95,7 +95,7 @@ export async function runSynastryReportTurn(input: {
|
||||
// BUG-2026: asked when the two become a couple, the model read only this section, whose
|
||||
// material has no event rows, and said the report had not computed it.
|
||||
...(input.timingSectionId && input.timingSectionId !== input.sectionId
|
||||
? [`用户问某件事什么时候发生(心动、在一起、公开、结婚)时,事件行和扫描到的时间段在「${SECTION_TITLES[input.timingSectionId].zh}」(${input.timingSectionId})这一节的材料里:这类问题只读那一节,两人的月亮星座和星宿每一节的材料里都有。`]
|
||||
? [`用户问某件事什么时候发生(心动、在一起、公开、结婚)时,事件行在「${SECTION_TITLES[input.timingSectionId].zh}」(${input.timingSectionId})这一节的材料里:这类问题只读那一节,两人的月亮星座和星宿每一节的材料里都有。`]
|
||||
: []),
|
||||
"先调用 readSynastrySection,再回答。正文第一句就回答用户问的事,不说自己读了哪一节、调了什么材料。",
|
||||
].filter(Boolean).join("\n\n");
|
||||
|
||||
@@ -105,16 +105,21 @@ test("legacy headings persist while old event text uses the current evidence wor
|
||||
// 原因: BUG-2022,占星师 2026-11-19 第 15 条:附录保留两种状态,用读者的话;这些句子进追问材料后被模型念成「证据链还没有建立」
|
||||
// 旧报告没有存底稿时,这句状态原来被当成扫描结果显示在页面上;它不是扫描结果,页面不再显示,事件行里仍是现行说法。
|
||||
assert.doesNotMatch(page, /本证据链尚未建立|目前无法给出有依据的时间段/);
|
||||
assert.equal(currentSynastryEvents(old.events, undefined, names, "zh")[0].research, "研究扫描:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据");
|
||||
// 原值: 「研究扫描:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」
|
||||
// 新值: 「研究扫描:这五年里两人都没有相关运限」;页面改为一句读者的话
|
||||
// 原因: BUG-2029,占星师 2026-11-19 第 19 条:扫描跑过但没有命中,不能合并成「盘里没有依据」
|
||||
assert.equal(currentSynastryEvents(old.events, undefined, names, "zh")[0].research, "研究扫描:这五年里两人都没有相关运限");
|
||||
assert.match(page, /目前还不能给出有充分依据的时间段。/);
|
||||
assert.doesNotMatch(page, /两人都没有被这一类事件激活|十、/);
|
||||
assert.match(renderToStaticMarkup(<SynastryReportView reportId="earlier" snapshot={{ ...old, structure: undefined }} />), /八、关系时间线/);
|
||||
const detailed = (language: "zh" | "en") => eventClassRows(dossier, names, language)
|
||||
.filter(({ eventClass }) => eventClass === "romantic_activation" || eventClass === "relationship_formation")
|
||||
.map(({ formal }) => formal);
|
||||
// 原值: 「正式核对:本证据链尚未建立」 / "This evidence chain is not established yet";新值与原因见上(BUG-2022)
|
||||
assert.deepEqual(detailed("zh"), ["正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据", "正式核对:单侧或证据不完整"]);
|
||||
// 原值 (BUG-2022): 「…两人各自的盘里都没有针对这类事件的依据」;新值: 占星师 2026-11-19 第 19 条的原句;原因: BUG-2029
|
||||
assert.deepEqual(detailed("zh"), ["正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。", "正式核对:单侧或证据不完整"]);
|
||||
assert.deepEqual(detailed("en"), [
|
||||
"Formal check: No period with a basis can be given yet: neither chart has evidence specific to this event", "Formal check: One-sided or incomplete evidence",
|
||||
"Formal check: A complete basis for timing this kind of event has not been built yet, so no period is given.", "Formal check: One-sided or incomplete evidence",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { SynastryReportView } from "../src/components/synastry/synastry-report-v
|
||||
import { chineseNames, glossNodesInReadingOrder } from "../src/lib/synastry-full-generate.ts";
|
||||
import { currentSynastryTechnicalBlocks, currentVerificationLines, SYNASTRY_VERIFICATION_LINE } from "../src/lib/synastry-full-technical.ts";
|
||||
import {
|
||||
currentSynastryEvents, eventClassRows, EXPLORATORY_NOTE, EXPLORATORY_TITLE, exploratorySynastryEvents, readerSynastryEvents,
|
||||
currentSynastryEvents, eventClassRows, exploratorySynastryEvents, READER_NO_EVENT_TIMING, readerSynastryEvents, SCAN_INTERVAL_NOTE,
|
||||
} from "../src/lib/synastry-full-timeline.ts";
|
||||
import { glossFirstNodeMention, synastryNodeNames } from "../src/lib/synastry-node-names.ts";
|
||||
import { synastrySectionMaterial } from "../src/lib/synastry-report-material.ts";
|
||||
@@ -18,9 +18,12 @@ const timeline = (classes: unknown[]) => ({ relationship_event_timeline: {
|
||||
window: { start: "2026-11-15", end: "2031-11-15", years: 5 }, scan: { id: "synastry_research_scan", version: "v1" }, event_classes: classes,
|
||||
} });
|
||||
|
||||
test("BUG-2014: the astrologer's title and note are used word for word", () => {
|
||||
assert.equal(EXPLORATORY_TITLE.zh, "探索性结果");
|
||||
assert.equal(EXPLORATORY_NOTE.zh, "仅为计算扫描结果,尚不能据此判断事件发生");
|
||||
test("BUG-2029: the reader sentence and the scan-column sentence are the astrologer's, word for word", () => {
|
||||
// 原值 (BUG-2014): 页面折叠块标题「探索性结果」和说明「仅为计算扫描结果,尚不能据此判断事件发生」
|
||||
// 新值: 读者只看到一句「目前还不能给出有充分依据的时间段。」;研究扫描一栏(附录)用她第 19 条的原句
|
||||
// 原因: BUG-2029,占星师 2026-11-19 分层规则:研究扫描默认不作为事件预测展示
|
||||
assert.equal(READER_NO_EVENT_TIMING.zh, "目前还不能给出有充分依据的时间段。");
|
||||
assert.equal(SCAN_INTERVAL_NOTE.zh, "已找到探索性扫描区间,尚不能据此判断该事件会发生。");
|
||||
});
|
||||
|
||||
test("BUG-2014: a formal candidate with scan periods is a body row; a scan-only period is exploratory; first contact is neither", () => {
|
||||
@@ -53,17 +56,27 @@ test("BUG-2014: a formal candidate with scan periods is a body row; a scan-only
|
||||
}} />);
|
||||
const area = html.slice(html.indexOf("synastry-events"));
|
||||
assert.match(area, /<ul><li><p><b>心动<\/b><\/p><p>正式核对:[^<]+<\/p><p>研究扫描:两人同时有相关运限:2027 年 3 月至 9 月<\/p><\/li><\/ul>/);
|
||||
assert.match(area, /<details class="synastry-why"><summary>探索性结果<\/summary><p>仅为计算扫描结果,尚不能据此判断事件发生。<\/p><p><b>成为伴侣<\/b>:/);
|
||||
// The scan-only period is inside the collapsed block, after the body list has closed.
|
||||
assert.ok(area.indexOf("成为伴侣") > area.indexOf("</ul>"));
|
||||
// 原值 (BUG-2014): 正文表后有折叠的「探索性结果」,里面列出只有扫描结果的事件
|
||||
// 新值: 页面不再出现这一块,也不出现只有扫描结果的事件和它的时间段;原因: BUG-2029
|
||||
assert.doesNotMatch(area, /探索性结果|仅为计算扫描结果|成为伴侣|法律婚姻/);
|
||||
assert.doesNotMatch(area, /甲:有相关运限|乙:有相关运限|没有通过正式核对/);
|
||||
// No formal candidate at all: one plain sentence, no periods, no reasons.
|
||||
const none = renderToStaticMarkup(<SynastryReportView reportId="none" initialLanguage="zh" snapshot={{
|
||||
sections: [], timeline: [], practices: [], gate: { ok: true as const, language: "zh" as const }, structure: "skill_v3" as const,
|
||||
names: { a: "林甲", b: "王乙" }, events: saved.filter((row) => row.eventClass !== "romantic_activation"), technical: [],
|
||||
}} />);
|
||||
const noneArea = none.slice(none.indexOf("synastry-events"));
|
||||
assert.match(noneArea, /<h3>关系事件<\/h3><p>目前还不能给出有充分依据的时间段。<\/p><\/div>/);
|
||||
assert.doesNotMatch(noneArea, /2027|研究扫描|正式核对|尚未接入|尚未建立|资料不足/);
|
||||
});
|
||||
|
||||
test("BUG-2014: the follow-up material says the scan is exploratory without the failed-check phrase, old saved rows included", () => {
|
||||
const dossier = timeline([{ event_class: "relationship_formation", formal_gate: { status: "not_established" },
|
||||
scan_status: "candidates_found", research_candidates: [dates], person_a: person, person_b: person }]);
|
||||
const fresh = eventClassRows(dossier, names, "zh").find((row) => row.eventClass === "relationship_formation")!;
|
||||
assert.equal(fresh.conflict, "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。");
|
||||
// 原值 (BUG-2014): 「研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。」;新值: 第 19 条原句;原因: BUG-2029
|
||||
assert.equal(fresh.conflict, "已找到探索性扫描区间,尚不能据此判断该事件会发生。");
|
||||
assert.equal(currentSynastryEvents([{ ...fresh, conflict: "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。" }], undefined, names, "zh")[0].conflict, fresh.conflict);
|
||||
const oldRow = { ...fresh, conflict: "研究扫描找到的时间段没有通过正式核对,只作研究参考,不是两人的事件窗口。" };
|
||||
assert.equal(currentSynastryEvents([oldRow], undefined, names, "zh")[0].conflict, fresh.conflict);
|
||||
const material = synastrySectionMaterial({
|
||||
@@ -71,7 +84,7 @@ test("BUG-2014: the follow-up material says the scan is exploratory without the
|
||||
sectionId: "timeline", includeTechnical: true,
|
||||
});
|
||||
assert.doesNotMatch(JSON.stringify(material), /没有通过正式核对/);
|
||||
assert.match(JSON.stringify(material), /仅为计算扫描结果,尚不能据此判断事件发生/);
|
||||
assert.match(JSON.stringify(material.events), /已找到探索性扫描区间,尚不能据此判断该事件会发生/);
|
||||
});
|
||||
|
||||
test("BUG-2014: one verification line, in the astrologer's wording without the corpus words; old saved lines are replaced once", () => {
|
||||
|
||||
@@ -80,7 +80,8 @@ test("the opening tells the model which section holds event timing, unless it is
|
||||
},
|
||||
});
|
||||
await run("climate");
|
||||
assert.match(openings[0]!, /什么时候发生(心动、在一起、公开、结婚)时,事件行和扫描到的时间段在「[^」]+」(progression)这一节的材料里/);
|
||||
// 原值: 「…事件行和扫描到的时间段在「…」这一节的材料里」;新值: 不再提扫描到的时间段;原因: BUG-2029,扫描区间不主动告诉用户
|
||||
assert.match(openings[0]!, /什么时候发生(心动、在一起、公开、结婚)时,事件行在「[^」]+」(progression)这一节的材料里/);
|
||||
await run("progression");
|
||||
assert.doesNotMatch(openings[1]!, /这类问题只读那一节/);
|
||||
});
|
||||
@@ -91,13 +92,18 @@ test("the follow-up material carries no internal label, and the saved rows are u
|
||||
for (const word of ["正式核对", "研究扫描"]) assert.ok(!text.includes(word), word);
|
||||
const events = progression.events as Array<Record<string, string>>;
|
||||
const couple = events.find((row) => row.eventClass === "relationship_formation")!;
|
||||
assert.equal(couple.formal, "目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据");
|
||||
assert.equal(couple.research, "探索性结果:两人同时有相关运限:2027 年 3 月至 9 月");
|
||||
assert.equal(couple.conflict, "探索性结果里的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。");
|
||||
// 原值 (BUG-2026): 事件行带缺口说明和「探索性结果:」一行,阅读说明让模型提到扫描时间段
|
||||
// 新值: 事件行只有读者的话,扫描区间单列在 scan_intervals,阅读说明要求不主动说
|
||||
// 原因: BUG-2029,占星师 2026-11-19 分层规则
|
||||
assert.equal(couple.answer, "目前还不能给出有充分依据的时间段。");
|
||||
assert.equal(couple.scan_intervals, "2027 年 3 月至 9 月(已找到探索性扫描区间,尚不能据此判断该事件会发生)");
|
||||
assert.equal(couple.formal, undefined);
|
||||
assert.equal(couple.research, undefined);
|
||||
assert.ok((progression.reading_notes as string[]).includes(SYNASTRY_SCAN_NOTE.zh));
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /「探索性结果」/);
|
||||
// An answer that repeats the material's labels triggers no wording rewrite.
|
||||
assert.deepEqual(synastryReplyInternalWording(`${couple.formal}。${couple.research}。${couple.conflict}`), []);
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /不要主动列出 scan_intervals 里的区间/);
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /只有用户明确问有没有算出过可能的时间段时/);
|
||||
// An answer that repeats the material's wording triggers no wording rewrite.
|
||||
assert.deepEqual(synastryReplyInternalWording(`${couple.answer}${couple.scan_intervals}`), []);
|
||||
assert.ok(SYNASTRY_ZH_INTERNAL_WORDING.includes("正式核对" as never) && SYNASTRY_ZH_INTERNAL_WORDING.includes("研究扫描" as never));
|
||||
// The page and the appendix read the rows from the timeline module and keep their strings.
|
||||
const saved = currentSynastryEvents(undefined, dossier, { a: "林甲", b: "王乙" }, "zh");
|
||||
|
||||
@@ -839,9 +839,12 @@ test("产品 2026-11-07 占星师方案:new reports follow the skill order, sh
|
||||
// 原值(2): /心动<\/b><\/p><p>研究扫描:两人同时有相关运限,只作研究参考/
|
||||
// 新值(2): 心动没有正式候选,不进正文表;扫描结果在折叠的「探索性结果」里
|
||||
// 原因(2): BUG-2014,占星师 2026-11-19 第 15 条:研究扫描不放在事件标题下的正式表里
|
||||
assert.match(html, /<summary>探索性结果<\/summary><p>仅为计算扫描结果,尚不能据此判断事件发生。<\/p><p><b>心动<\/b>:两人同时有相关运限/);
|
||||
// 原值(3) (BUG-2014): 折叠的「探索性结果」里列出心动的扫描结果,后面有「只说明各自的背景」那句
|
||||
// 新值(3): 这一块不给读者看,只有一句「目前还不能给出有充分依据的时间段。」
|
||||
// 原因(3): BUG-2029,占星师 2026-11-19 分层规则:研究扫描默认不作为事件预测展示
|
||||
assert.match(html, /<h3>关系事件<\/h3><p>目前还不能给出有充分依据的时间段。<\/p>/);
|
||||
assert.doesNotMatch(html, /探索性结果|仅为计算扫描结果|两人同时有相关运限/);
|
||||
assert.doesNotMatch(html, /没有通过正式核对|正式核对:暂不能判断|只作研究参考/);
|
||||
assert.match(html, /只说明各自的背景/);
|
||||
});
|
||||
|
||||
test("产品 2026-11-07 占星师方案:the writer sees each person's promise and the cross-chart links; source_modules is not cut", () => {
|
||||
|
||||
@@ -103,22 +103,24 @@ test("scan periods reach the follow-up as exploratory results the model may ment
|
||||
const material = synastrySectionMaterial({ payload, sectionId: "timeline" as never });
|
||||
// 原值: [SYNASTRY_SCAN_NOTE.zh];新值: 另带一行两人名字的对应;原因: BUG-2026,回答里还在写「甲」「乙」
|
||||
assert.deepEqual(material.reading_notes, [SYNASTRY_SCAN_NOTE.zh, synastryNameNote({ a: "林甲", b: "王乙" }, "zh")]);
|
||||
// Astrologer 2026-11-19 ruling 15, in her words.
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /仅为计算扫描结果,尚不能据此判断事件发生/);
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /不要把它们说成事件会发生的时间,也不要略过不提/);
|
||||
const events = material.events as Array<{ eventClass: string; formal: string; research: string; conflict?: string; people: string[] }>;
|
||||
// 原值 (BUG-2022 / BUG-2026): 阅读说明让模型提到扫描时间段(「不要…略过不提」),事件行带「探索性结果:…」
|
||||
// 新值: 问到「什么时候」先答目前还不能给出有充分依据的时间段,不主动列扫描区间;用户明确问有没有算出过时间段才说
|
||||
// 原因: BUG-2029,占星师 2026-11-19 分层规则:研究扫描默认不作为事件预测展示;系统缺口不说成用户资料不足
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /先直接这样回答,再说这段关系里现在能判断的部分/);
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /不要主动列出 scan_intervals 里的区间,不要说成原因出在系统、规则或资料上,也不要让用户以为是自己的资料没填好/);
|
||||
assert.match(SYNASTRY_SCAN_NOTE.zh, /尚不能据此判断该事件会发生/);
|
||||
const events = material.events as Array<{ eventClass: string; answer: string; scan_intervals?: string }>;
|
||||
const couple = events.find((row) => row.eventClass === "relationship_formation")!;
|
||||
// 原值: 「研究扫描:两人同时有相关运限:2027 年 3 月至 9 月」,并用 isScanOnlyEvent 判断材料里的行
|
||||
// 新值: 追问材料里标签写成「探索性结果:」,冲突句同样改写;页面和附录的行不变
|
||||
// 原因: BUG-2026,「研究扫描」「正式核对」在内部用词表里,模型照着念出来就触发一次只改措辞的重写
|
||||
assert.equal(couple.research, "探索性结果:两人同时有相关运限:2027 年 3 月至 9 月");
|
||||
assert.equal(couple.conflict, "探索性结果里的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。");
|
||||
assert.equal(couple.answer, "目前还不能给出有充分依据的时间段。");
|
||||
assert.equal(couple.scan_intervals, "2027 年 3 月至 9 月(已找到探索性扫描区间,尚不能据此判断该事件会发生)");
|
||||
assert.doesNotMatch(JSON.stringify(events), /尚未接入|尚未建立|判断规则|资料不足|正式核对|研究扫描/);
|
||||
assert.ok(isScanOnlyEvent(eventClassRows(dossier, { a: "林甲", b: "王乙" }, "zh").find((row) => row.eventClass === "relationship_formation"), "zh"));
|
||||
// No event has scan-only periods: no note.
|
||||
// No event has scan periods: the rows carry no intervals; the note about "when" questions stays.
|
||||
const quiet = { ...payload, dossier: { ...dossier, relationship_event_timeline: { ...dossier.relationship_event_timeline,
|
||||
event_classes: dossier.relationship_event_timeline.event_classes.map((row) => ({ ...row, research_candidates: [], scan_status: row.scan_status ? "no_activation" : undefined })) } } };
|
||||
// 原值: undefined;新值: 只剩名字对应那一行;原因: 同上
|
||||
assert.deepEqual(synastrySectionMaterial({ payload: quiet, sectionId: "timeline" as never }).reading_notes, [synastryNameNote({ a: "林甲", b: "王乙" }, "zh")]);
|
||||
const quietMaterial = synastrySectionMaterial({ payload: quiet, sectionId: "timeline" as never });
|
||||
assert.deepEqual(quietMaterial.reading_notes, [SYNASTRY_SCAN_NOTE.zh, synastryNameNote({ a: "林甲", b: "王乙" }, "zh")]);
|
||||
assert.ok((quietMaterial.events as Array<{ scan_intervals?: string }>).every((row) => row.scan_intervals === undefined));
|
||||
});
|
||||
|
||||
test("event rows say what is missing in reader words, in the material and in the appendix", () => {
|
||||
@@ -126,16 +128,21 @@ test("event rows say what is missing in reader words, in the material and in the
|
||||
const text = JSON.stringify(rows);
|
||||
// 原值: 「本证据链尚未建立」「暂不能判断:…核对规则」「缺年度层,严格核对不能通过」「缺输入(…)」「…还没有书证」
|
||||
// 新值: 见下;原因: 这些句子进追问材料,模型照着念给用户
|
||||
assert.doesNotMatch(text, /证据链|核对规则|严格核对|缺输入|书证|年度层|暂不能判断/);
|
||||
assert.doesNotMatch(text, /证据链|核对规则|严格核对|缺输入|书证|年度层|暂不能判断|盘里都没有/);
|
||||
// 原值 (BUG-2022): 「正式核对:目前无法给出有依据的时间段:」加缺口(其中一句是「两人各自的盘里都没有针对这类事件的依据」)
|
||||
// 新值: 占星师 2026-11-19 第 19 条的原句,四种状态在数据里分开
|
||||
// 原因: BUG-2029,「系统没建立依据」「没接入规则」「资料没取得」「缺输入」不能合并成「盘里没有」
|
||||
assert.deepEqual(rows.map((row) => row.formal), [
|
||||
"正式核对:目前无法给出有依据的时间段:这类事件还没有判断规则",
|
||||
"正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据",
|
||||
"正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据",
|
||||
"正式核对:目前无法给出有依据的时间段:公开关系的判断规则还没有出处",
|
||||
"正式核对:目前无法给出有依据的时间段:缺少年度资料",
|
||||
"正式核对:本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。",
|
||||
"正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。",
|
||||
"正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。",
|
||||
"正式核对:本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。",
|
||||
"正式核对:这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。",
|
||||
]);
|
||||
assert.equal(rows[4].research, "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(缺少年度资料,尚不能据此判断事件发生)");
|
||||
assert.deepEqual(rows[0].people, ["甲:资料不足(缺少首次接触的独立规则)", "乙:资料不足(缺少首次接触的独立规则)"]);
|
||||
assert.deepEqual(rows.map((row) => row.formalState), ["rule_not_built", "basis_not_built", "basis_not_built", "rule_not_built", "not_obtained"]);
|
||||
assert.equal(rows[4].research, "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对)");
|
||||
// 原值: 「甲:资料不足(缺少首次接触的独立规则)」;新值: 规则没接入不写成这个人资料不足;原因: 同上
|
||||
assert.deepEqual(rows[0].people, ["甲:这类事件的判断规则尚未接入", "乙:这类事件的判断规则尚未接入"]);
|
||||
// The exploratory block is unchanged by the new wording: the three scanned classes, without the annual suffix.
|
||||
assert.deepEqual(exploratorySynastryEvents(rows, "zh").map((row) => row.text), [
|
||||
"两人各有相关运限,但时间没有重叠", "两人同时有相关运限:2027 年 3 月至 9 月", "两人同时有相关运限:2027 年 3 月至 9 月",
|
||||
@@ -149,7 +156,8 @@ test("the appendix names the two people as the report does and keeps both states
|
||||
assert.match(named, /林甲必需输入:/);
|
||||
assert.doesNotMatch(named, /(^|\n)[甲乙][: ]/u);
|
||||
// Both states stay (astrologer 2026-11-15 Q1 / Q4); a scan-only period carries her 11-19 note.
|
||||
assert.match(named, /成为伴侣\n正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据\n研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(仅为计算扫描结果,尚不能据此判断事件发生)/);
|
||||
// 原值 (BUG-2022): 「…两人各自的盘里都没有针对这类事件的依据」和行尾括注;新值: 第 19 条原句;原因: BUG-2029
|
||||
assert.match(named, /成为伴侣\n正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。\n研究扫描:两人同时有相关运限:2027 年 3 月至 9 月;已找到探索性扫描区间,尚不能据此判断该事件会发生。/);
|
||||
assert.match(named, /心动\n正式核对:[^\n]+\n研究扫描:两人各有相关运限,但时间没有重叠\n/);
|
||||
assert.doesNotMatch(named, /本证据链尚未建立|暂不能判断|严格核对不能通过/);
|
||||
// Without names (the follow-up material), 甲 / 乙 as before.
|
||||
@@ -172,10 +180,17 @@ test("reports saved with the old wording read in the current wording", () => {
|
||||
eventClass: "romantic_activation", title: "心动", formal: "正式核对:本证据链尚未建立", research: "研究扫描:两人各有相关运限,但时间没有重叠", people: [],
|
||||
}];
|
||||
const [marriage, romance] = currentSynastryEvents(saved, undefined, { a: "甲", b: "乙" }, "zh");
|
||||
assert.equal(marriage.formal, "正式核对:目前无法给出有依据的时间段:缺少年度资料");
|
||||
assert.equal(marriage.research, "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(缺少年度资料,尚不能据此判断事件发生)");
|
||||
assert.deepEqual(marriage.people, ["甲:资料不足(缺少首次接触的独立规则)"]);
|
||||
assert.equal(romance.formal, "正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据");
|
||||
// 原值 (BUG-2022): 旧行读成「目前无法给出有依据的时间段:缺少年度资料」等;新值: 读成第 19 条的原句;原因: BUG-2029
|
||||
assert.equal(marriage.formal, "正式核对:这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。");
|
||||
assert.equal(marriage.research, "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对)");
|
||||
assert.deepEqual(marriage.people, ["甲:这类事件的判断规则尚未接入"]);
|
||||
assert.equal(romance.formal, "正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。");
|
||||
// A row saved with the BUG-2022 wording reads the same.
|
||||
const [saved2022, romance2022] = currentSynastryEvents([
|
||||
{ ...saved[0], formal: "正式核对:目前无法给出有依据的时间段:缺少年度资料", research: "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(缺少年度资料,尚不能据此判断事件发生)", people: ["甲:资料不足(缺少首次接触的独立规则)"] },
|
||||
{ ...saved[1], formal: "正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据" },
|
||||
], undefined, { a: "甲", b: "乙" }, "zh");
|
||||
assert.deepEqual([saved2022.formal, saved2022.research, saved2022.people[0], romance2022.formal], [marriage.formal, marriage.research, marriage.people[0], romance.formal]);
|
||||
// The exploratory block strips the annual suffix whichever wording the row was saved with.
|
||||
assert.deepEqual(exploratorySynastryEvents([marriage], "zh").map((row) => row.text), ["两人同时有相关运限:2027 年 3 月至 9 月"]);
|
||||
// A saved traditional-matching line reads in the current wording too.
|
||||
@@ -188,7 +203,10 @@ test("what is left of our status sentences in a reply is said in reader words",
|
||||
const reply = "这份合盘没有算出你们正式在一起的时间点。\n\n关于「心动」,材料里写的是这一条的证据链还没有建立;「首次接触」没有这一类事件的核对规则可以套用。\n\n传统配对里提过一个可能的例外,但原分不改。";
|
||||
assert.deepEqual(synastryReplyInternalWording(reply), ["证据链", "核对规则", "原分不改"]);
|
||||
const cleaned = cleanSynastryChatReply(reply);
|
||||
assert.match(cleaned, /材料里写的是目前没有这方面的依据;「首次接触」这类事件目前没有判断规则。/);
|
||||
// 原值 (BUG-2022): 「目前没有这方面的依据」「这类事件目前没有判断规则」;新值: 读者的话;原因: BUG-2029,不把系统缺口说成盘里没有或缺规则
|
||||
assert.match(cleaned, /材料里写的是目前还不能给出有充分依据的判断;「首次接触」这类事件目前还不能给出有充分依据的时间段。/);
|
||||
assert.equal(cleanSynastryChatReply("本系统尚未接入这类事件所需的判断规则,所以说不了。"), "目前还不能给出有充分依据的时间段,所以说不了。");
|
||||
assert.deepEqual(synastryReplyInternalWording("这是恒真分支,按具名规则和方法版本看,系统尚未接入判断规则。"), ["恒真", "具名规则", "方法版本", "尚未接入", "判断规则"]);
|
||||
assert.match(cleaned, /但分数不变。/);
|
||||
assert.deepEqual(synastryReplyInternalWording(cleaned), []);
|
||||
// Ordinary sentences are untouched.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { SynastryReportView } from "../src/components/synastry/synastry-report-view.tsx";
|
||||
import { buildSynastryExportBlocks } from "../src/lib/synastry-report-export.ts";
|
||||
import { eventTimingBlock } from "../src/lib/synastry-full-technical.ts";
|
||||
import { buildTimelineSegments, eventClassRows, exploratorySynastryEvents, readerSynastryEvents } from "../src/lib/synastry-full-timeline.ts";
|
||||
import { buildTimelineSegments, eventClassRows, exploratorySynastryEvents, readerEventNotice, readerSynastryEvents } from "../src/lib/synastry-full-timeline.ts";
|
||||
|
||||
const names = { a: "甲", b: "乙" };
|
||||
const dates = { start: "2027-03-01", end: "2027-10-01" };
|
||||
@@ -108,14 +108,18 @@ test("BUG-2002: the page body and the export show the reader's table; the append
|
||||
const body = { sections: [], timeline: [], practices: [], gate: { ok: true as const, language: "zh" as const }, structure: "skill_v3" as const };
|
||||
const technical = [eventTimingBlock(dossier)!];
|
||||
const html = renderToStaticMarkup(<SynastryReportView reportId="sample" initialLanguage="zh" snapshot={{ ...body, names, events, technical }} />);
|
||||
const table = html.slice(html.indexOf("synastry-events"), html.indexOf("只说明各自的背景"));
|
||||
const table = html.slice(html.indexOf("synastry-events"), html.indexOf("</section>", html.indexOf("synastry-events")));
|
||||
assert.ok(table.length > 0);
|
||||
assert.doesNotMatch(table, WITHHELD);
|
||||
// 原值: 成为伴侣一行在正文表里,后面跟「甲:有相关运限」
|
||||
// 新值: 正文表没有行;扫描结果在折叠的「探索性结果」里,带占星师的说明
|
||||
// 原因: BUG-2014,占星师 2026-11-19 第 15 条
|
||||
assert.doesNotMatch(table, /<ul>|甲:有相关运限|只作研究参考/);
|
||||
assert.match(table, /<details class="synastry-why"><summary>探索性结果<\/summary><p>仅为计算扫描结果,尚不能据此判断事件发生。<\/p><p><b>心动<\/b>:两人各有相关运限,但时间没有重叠<\/p><p><b>成为伴侣<\/b>:两人同时有相关运限:2027 年 3 月至 9 月<\/p>/);
|
||||
// 原值 (BUG-2014): 折叠的「探索性结果」里列出心动、成为伴侣的扫描结果
|
||||
// 新值: 这一块不再给读者看,只有一句「目前还不能给出有充分依据的时间段。」
|
||||
// 原因: BUG-2029,占星师 2026-11-19 分层规则:研究扫描默认不作为事件预测展示
|
||||
assert.match(table, /<h3>关系事件<\/h3><p>目前还不能给出有充分依据的时间段。<\/p>/);
|
||||
assert.doesNotMatch(table, /探索性结果|仅为计算扫描结果|2027|心动|成为伴侣|只说明各自的背景/);
|
||||
assert.doesNotMatch(table, /首次接触|公开关系/);
|
||||
assert.doesNotMatch(html, /五类事件的正式核对/);
|
||||
// Astrologer 2026-11-15 Q1 / Q4: the two verification states stay visible, in the appendix.
|
||||
@@ -124,19 +128,22 @@ test("BUG-2002: the page body and the export show the reader's table; the append
|
||||
// 新值: 「目前无法给出有依据的时间段:…」加关键缺口;「缺少年度资料」
|
||||
// 原因: BUG-2022,占星师 2026-11-19 第 15 条:附录保留两种状态,用读者的话;这些句子进追问材料后被模型念成「证据链还没有建立」
|
||||
// 只有扫描结果的时间段,附录的研究扫描行后面带她的说明。
|
||||
assert.match(appendix, /成为伴侣\n正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据\n研究扫描:两人同时有相关运限:2027 年 3 月至 9 月(仅为计算扫描结果,尚不能据此判断事件发生)/);
|
||||
assert.match(appendix, /首次接触\n正式核对:目前无法给出有依据的时间段:这类事件还没有判断规则\n研究扫描:不扫描,不借用心动的时间/);
|
||||
assert.doesNotMatch(appendix, /本证据链尚未建立|暂不能判断|严格核对不能通过|缺输入/);
|
||||
assert.match(technical[0].english!.lines.join("\n"), /Becoming a couple\nFormal check: No period with a basis can be given yet: neither chart has evidence specific to this event\nResearch scan: /);
|
||||
// 原值 (BUG-2022): 「正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」「…这类事件还没有判断规则」,扫描行尾括注「仅为计算扫描结果…」
|
||||
// 新值: 占星师 2026-11-19 第 19 条的原句;原因: BUG-2029,「没建立依据」不能写成「盘里没有」
|
||||
assert.match(appendix, /成为伴侣\n正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。\n研究扫描:两人同时有相关运限:2027 年 3 月至 9 月;已找到探索性扫描区间,尚不能据此判断该事件会发生。/);
|
||||
assert.match(appendix, /首次接触\n正式核对:本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。\n研究扫描:不扫描,不借用心动的时间/);
|
||||
assert.doesNotMatch(appendix, /本证据链尚未建立|暂不能判断|严格核对不能通过|缺输入|盘里都没有/);
|
||||
assert.match(technical[0].english!.lines.join("\n"), /Becoming a couple\nFormal check: A complete basis for timing this kind of event has not been built yet, so no period is given\.\nResearch scan: /);
|
||||
|
||||
const exported = buildSynastryExportBlocks({
|
||||
title: "甲 × 乙", savedLine: "保存于 2026-11-19", language: "zh", order: ["timeline"], headings: { timeline: "九、关系应期" },
|
||||
sections: [], timeline: [], events: readerSynastryEvents(events, "zh"),
|
||||
exploratory: { title: "探索性结果", note: "仅为计算扫描结果,尚不能据此判断事件发生", events: exploratorySynastryEvents(events, "zh") },
|
||||
eventNotice: readerEventNotice(events, readerSynastryEvents(events, "zh"), "zh"),
|
||||
eventNote: "备注", practices: [], technical: [],
|
||||
} as never).map((block: { text: string }) => block.text).join("\n");
|
||||
// 原值: 导出里「**成为伴侣**」下面是研究扫描一行;新值: 在「探索性结果」小节里;原因: BUG-2014
|
||||
assert.match(exported, /### 关系事件\n\n#### 探索性结果\n\n仅为计算扫描结果,尚不能据此判断事件发生。\n\n- \*\*心动\*\*:两人各有相关运限,但时间没有重叠\n- \*\*成为伴侣\*\*:两人同时有相关运限:2027 年 3 月至 9 月/);
|
||||
// 原值 (BUG-2014): 导出里有「#### 探索性结果」小节,列出扫描结果;新值: 只有一句读者的话;原因: BUG-2029
|
||||
assert.match(exported, /### 关系事件\n\n目前还不能给出有充分依据的时间段。/);
|
||||
assert.doesNotMatch(exported, /探索性结果|2027|备注|心动|成为伴侣/);
|
||||
assert.doesNotMatch(exported, WITHHELD);
|
||||
});
|
||||
|
||||
|
||||
@@ -44,16 +44,22 @@ test("the report and follow-up display the same five formal checks and research
|
||||
// 原值: 「本证据链尚未建立」「暂不能判断:…」「缺年度层,严格核对不能通过」「缺少关系事件的严格核对资料」
|
||||
// 新值: 「目前无法给出有依据的时间段:…」加关键缺口;「缺少年度资料」
|
||||
// 原因: BUG-2022,占星师 2026-11-19 第 15 条:附录保留两种状态,用读者的话;这些句子进追问材料后被模型念成「证据链还没有建立」
|
||||
formal: "正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据",
|
||||
// 原值 (BUG-2022): 「正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」
|
||||
// 新值: 占星师 2026-11-19 第 19 条的原句,并在数据里分开记状态;原因: BUG-2029
|
||||
formal: "正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。",
|
||||
formalState: "basis_not_built", scanState: "candidates_found",
|
||||
research: "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月",
|
||||
// 原值: 「研究扫描找到的时间段没有通过正式核对,只作研究参考,不是两人的事件窗口。」
|
||||
// 新值: 用占星师 2026-11-19 第 15 条的说法;原因: BUG-2014,这句会进追问材料
|
||||
conflict: "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。",
|
||||
// 原值 (BUG-2014): 「研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。」;新值: 她第 19 条给研究扫描一栏的原句;原因: BUG-2029
|
||||
conflict: "已找到探索性扫描区间,尚不能据此判断该事件会发生。",
|
||||
people: ["甲:有相关运限", "乙:有相关运限"],
|
||||
});
|
||||
assert.equal(events[2].conflict, "正式核对是候选,但研究扫描没有找到两人重叠的时间段。");
|
||||
// 原值: /缺年度层,严格核对不能通过/;新值: 读者的话,信息不变;原因: BUG-2022
|
||||
assert.match(events[4].research!, /缺少年度资料,尚不能据此判断事件发生/);
|
||||
// 原值 (BUG-2022): /缺少年度资料,尚不能据此判断事件发生/;新值: 她第 19 条的原句;原因: BUG-2029
|
||||
assert.match(events[4].research!, /这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对/);
|
||||
assert.deepEqual(events.map((row) => row.formalState), ["rule_not_built", "basis_not_built", "candidate", "rule_not_built", "not_obtained"]);
|
||||
for (const row of [events[0], events[3]]) assert.doesNotMatch(row.research!, /\d{4}/);
|
||||
const body = { sections: [], timeline: [], practices: [], gate: { ok: true as const, language: "zh" as const }, structure: "skill_v3" as const };
|
||||
const technical = [eventTimingBlock(dossier)!];
|
||||
@@ -69,19 +75,17 @@ test("the report and follow-up display the same five formal checks and research
|
||||
assert.ok(html.includes(row.formal!) && html.includes(row.research!));
|
||||
}
|
||||
const material = synastrySectionMaterial({ payload, sectionId: "timeline", language });
|
||||
// 原值: 追问材料的事件行与页面逐字相同(assert.deepEqual(material.events, localized))
|
||||
// 新值: 内容相同,只有「正式核对:」「研究扫描:」两个标签在追问材料里换成读者的话
|
||||
// 原因: BUG-2026,这两个词在内部用词表里,模型照着念就多调一次模型改措辞;页面和附录不变
|
||||
const relabel = (text: string | undefined) => text
|
||||
?.replace(/^正式核对:|^Formal check: /u, "")
|
||||
.replace(/^研究扫描:/u, "探索性结果:").replace(/^Research scan: /u, "Exploratory results: ")
|
||||
.replace(/^研究扫描找到的时间段/u, "探索性结果里的时间段")
|
||||
.replace(/^正式核对是候选,但研究扫描没有找到/u, "按现有依据是候选,但探索性结果里没有")
|
||||
.replace(/^The formal check identifies a candidate\. The research scan found/u, "On the current basis this is a candidate. The exploratory scan found");
|
||||
assert.deepEqual(material.events, localized.map((row) => ({
|
||||
...row, formal: relabel(row.formal), research: relabel(row.research), ...(row.conflict ? { conflict: relabel(row.conflict) } : {}),
|
||||
})));
|
||||
assert.doesNotMatch(JSON.stringify(material.events), /正式核对|研究扫描|formal check|research scan/i);
|
||||
// 原值 (BUG-2026): 追问材料的事件行和页面内容相同,只换两个标签
|
||||
// 新值: 追问材料只给读者的话和单列的扫描区间(followupSynastryEvents)
|
||||
// 原因: BUG-2029,占星师 2026-11-19 分层规则:系统缺规则、缺依据不念给用户,扫描区间不主动说
|
||||
const followup = material.events as Array<Record<string, string | undefined>>;
|
||||
assert.deepEqual(followup.map((row) => row.eventClass), localized.map((row) => row.eventClass));
|
||||
const noTiming = language === "zh" ? "目前还不能给出有充分依据的时间段。" : "No period with enough basis can be given yet.";
|
||||
assert.deepEqual(followup.map((row) => row.answer === noTiming), [true, true, false, true, true]);
|
||||
assert.match(followup[1].scan_intervals!, language === "zh" ? /^2027 年 3 月至 9 月(已找到探索性扫描区间,尚不能据此判断该事件会发生)$/ : /^March 2027 to September 2027/);
|
||||
assert.equal(followup[0].scan_intervals, undefined);
|
||||
assert.equal(followup[2].scan_intervals, undefined);
|
||||
assert.doesNotMatch(JSON.stringify(material.events), /正式核对|研究扫描|formal check|research scan|尚未接入|判断规则|资料不足|not connected|Insufficient/i);
|
||||
assert.ok(html.includes(EVENT_OVERLAP_NOTE[language].replace("person's", "person's")));
|
||||
}
|
||||
});
|
||||
@@ -108,7 +112,8 @@ test("legacy event rows are reprojected from the saved dossier with no recalcula
|
||||
assert.equal(events[1].formal, "正式核对:两人各有观察,但还不够判断");
|
||||
assert.deepEqual(events[1].people, ["甲:有相关运限", "乙:有相关运限"]);
|
||||
// 原值: /暂不能判断/;新值与原因见上(BUG-2022)
|
||||
assert.match(events[3].formal!, /目前无法给出有依据的时间段/);
|
||||
// 原值 (BUG-2022): /目前无法给出有依据的时间段/(后接冒号和缺口);新值: 第 19 条「本系统尚未接入…」原句;原因: BUG-2029
|
||||
assert.equal(events[3].formal, "正式核对:本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。");
|
||||
const legacy = currentSynastryEvents([...old, { ...old[0], eventClass: "romantic_activation",
|
||||
people: ["甲:有两条以上的线同时激活", "乙:只有一条线"] }], undefined, names, "zh");
|
||||
assert.doesNotMatch(legacy[0].research!, /2027/);
|
||||
@@ -131,7 +136,10 @@ test("the timing appendix preserves each person's conditions and missing strict
|
||||
assert.match(block.lines.join("\n"), /Narayana 随参数变化.*木星 处女/);
|
||||
assert.match(block.lines.join("\n"), /九分盘 已具备/);
|
||||
// 原值: /缺年度层/;新值: /缺少年度资料/;原因: BUG-2022,「年度层」是内部用词
|
||||
assert.match(block.lines.join("\n"), /缺少年度资料/);
|
||||
// 原值 (BUG-2022): /缺少年度资料/;新值: 第 19 条的原句;原因: BUG-2029
|
||||
assert.match(block.lines.join("\n"), /这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。/);
|
||||
assert.match(block.lines.join("\n"), /研究扫描:两人同时有相关运限:2027 年 3 月至 9 月;已找到探索性扫描区间,尚不能据此判断该事件会发生。/);
|
||||
assert.doesNotMatch(block.lines.join("\n"), /盘里都没有|没有针对这类事件/);
|
||||
assert.match(block.english?.lines.join("\n") ?? "", /Narayana Parameter-sensitive.*Jupiter Virgo/);
|
||||
});
|
||||
|
||||
@@ -142,7 +150,8 @@ test("a saved global gate block supplies its reason for all five formal checks",
|
||||
};
|
||||
assert.deepEqual(eventClassRows(legacy, names).map((row) => row.formal),
|
||||
// 原值: 「正式核对:暂不能判断:缺少关系事件的严格核对资料」;新值与原因见上(BUG-2022)
|
||||
Array(5).fill("正式核对:目前无法给出有依据的时间段:缺少判断这类事件所需的资料"));
|
||||
// 原值 (BUG-2022): 「正式核对:目前无法给出有依据的时间段:缺少判断这类事件所需的资料」;新值: 第 19 条「资料不足:缺少……。」;原因: BUG-2029
|
||||
Array(5).fill("正式核对:资料不足:缺少判断这类事件所需的资料。"));
|
||||
});
|
||||
|
||||
test("the writer receives clipped research conditions and formal boundaries for both timing sections", () => {
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
|
||||
import { SynastryReportView } from "../src/components/synastry/synastry-report-view.tsx";
|
||||
import { cleanSynastryChatReply, synastryReplyInternalWording } from "../src/lib/synastry-chat-fact-check.ts";
|
||||
import { userPrompt } from "../src/lib/synastry-full-sections.ts";
|
||||
import { eventTimingBlock } from "../src/lib/synastry-full-technical.ts";
|
||||
import {
|
||||
currentSynastryEvents, eventClassRows, followupSynastryEvents, READER_NO_EVENT_TIMING, readerEventNotice, readerSynastryEvents, SCAN_INTERVAL_NOTE,
|
||||
} from "../src/lib/synastry-full-timeline.ts";
|
||||
import { buildSynastryExportBlocks } from "../src/lib/synastry-report-export.ts";
|
||||
import { SYNASTRY_SCAN_NOTE, synastrySectionMaterial, withoutDatedSentences } from "../src/lib/synastry-report-material.ts";
|
||||
|
||||
// BUG-2029 (astrologer 2026-11-19, layering rule and Q19). Synthetic dossier, no real chart.
|
||||
const names = { a: "林甲", b: "王乙" };
|
||||
const dates = { start: "2027-03-01", end: "2027-10-01" };
|
||||
const person = { status: "activated", spans: [{ start: "2027-02-01", end: "2027-11-01" }] };
|
||||
const dossier = {
|
||||
relationship_event_timeline: {
|
||||
window: { start: "2026-11-15", end: "2031-11-15", years: 5 }, scan: { id: "synastry_research_scan", version: "v1" },
|
||||
event_classes: [
|
||||
{ event_class: "first_contact", formal_gate: { status: "blocked", reason: "no_first_contact_rule" } },
|
||||
{ event_class: "romantic_activation", formal_gate: { status: "not_established" },
|
||||
scan_status: "no_activation", research_candidates: [], person_a: { status: "not_activated" }, person_b: { status: "not_activated" } },
|
||||
{ event_class: "relationship_formation", formal_gate: { status: "not_established" },
|
||||
scan_status: "candidates_found", research_candidates: [dates], person_a: person, person_b: person },
|
||||
{ event_class: "public_formalization", formal_gate: { status: "blocked", reason: "public_formalization_rule_not_sourced" } },
|
||||
{ event_class: "legal_marriage", formal_gate: { status: "blocked", reason: "annual_layer_not_wired" },
|
||||
scan_status: "candidates_found", research_candidates: [dates], person_a: person, person_b: person },
|
||||
],
|
||||
},
|
||||
};
|
||||
const body = { sections: [], timeline: [], practices: [], gate: { ok: true as const, language: "zh" as const }, structure: "skill_v3" as const };
|
||||
|
||||
test("the stored rows keep the four states apart, in the astrologer's sentences; nothing says the charts lack a basis", () => {
|
||||
const rows = eventClassRows(dossier, names, "zh");
|
||||
assert.deepEqual(rows.map((row) => row.formalState), ["rule_not_built", "basis_not_built", "basis_not_built", "rule_not_built", "not_obtained"]);
|
||||
assert.deepEqual(rows.map((row) => row.scanState), ["blocked", "no_activation", "candidates_found", "blocked", "candidates_found"]);
|
||||
assert.equal(rows[1].formal, "正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。");
|
||||
assert.equal(rows[0].formal, "正式核对:本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。");
|
||||
assert.equal(rows[4].formal, "正式核对:这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。");
|
||||
// "Ran and found nothing" exists for the scan only, and has its own plain line.
|
||||
assert.equal(rows[1].research, "研究扫描:这五年里两人都没有相关运限");
|
||||
assert.equal(rows[2].conflict, SCAN_INTERVAL_NOTE.zh);
|
||||
// A rule that is not connected is never put down as a person's missing data.
|
||||
assert.deepEqual(rows[0].people, ["甲:这类事件的判断规则尚未接入", "乙:这类事件的判断规则尚未接入"]);
|
||||
assert.doesNotMatch(JSON.stringify(rows), /盘里都没有|没有针对这类事件的依据|证据链|核对规则/);
|
||||
// Missing inputs use her 「资料不足:缺少……。」 form.
|
||||
const blocked = eventClassRows({ relationship_event_timeline: { event_classes: [] }, event_resonance_gate: { status: "blocked", reason: "chart_or_current_dasha_missing" } }, names, "zh");
|
||||
assert.equal(blocked[1].formal, "正式核对:资料不足:缺少命盘或当前运限。");
|
||||
assert.equal(blocked[1].formalState, "missing_input");
|
||||
});
|
||||
|
||||
test("the reader's page and export show one plain sentence and no scan periods; the appendix keeps the intervals with her sentence", () => {
|
||||
const events = eventClassRows(dossier, names, "zh");
|
||||
const technical = [eventTimingBlock(dossier, names)!];
|
||||
const html = renderToStaticMarkup(<SynastryReportView reportId="sample" initialLanguage="zh" snapshot={{ ...body, names, events, technical }} />);
|
||||
const [page, appendix] = html.split('<details class="synastry-technical">');
|
||||
const area = page.slice(page.indexOf("synastry-events"));
|
||||
assert.match(area, /<h3>关系事件<\/h3><p>目前还不能给出有充分依据的时间段。<\/p><\/div>/);
|
||||
assert.doesNotMatch(page, /探索性结果|研究扫描|2027|尚未接入|尚未建立|资料不足|正式核对/);
|
||||
assert.match(page, /先看两个人各自走到的阶段,再看关系事件。/);
|
||||
assert.match(appendix ?? "", /成为伴侣<\/li><li>正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。<\/li><li>研究扫描:两人同时有相关运限:2027 年 3 月至 9 月;已找到探索性扫描区间,尚不能据此判断该事件会发生。/);
|
||||
|
||||
const exported = buildSynastryExportBlocks({
|
||||
title: "林甲 × 王乙", savedLine: "保存于 2026-11-19", language: "zh", order: ["timeline"], headings: { timeline: "九、关系应期" },
|
||||
sections: [], timeline: [], events: readerSynastryEvents(events, "zh", names),
|
||||
eventNotice: readerEventNotice(events, readerSynastryEvents(events, "zh", names), "zh"), eventNote: "备注", practices: [], technical: [],
|
||||
} as never).map((block: { text: string }) => block.text).join("\n");
|
||||
assert.match(exported, /### 关系事件\n\n目前还不能给出有充分依据的时间段。/);
|
||||
assert.doesNotMatch(exported, /2027|探索性|研究扫描|备注/);
|
||||
// A report with no event rows at all (an old layout) gets no sentence.
|
||||
assert.equal(readerEventNotice([], [], "zh"), "");
|
||||
// A formal candidate still shows as a row, with no notice.
|
||||
const candidate = eventClassRows({ relationship_event_timeline: { ...dossier.relationship_event_timeline, event_classes: [
|
||||
{ event_class: "relationship_formation", formal_gate: { status: "candidate_alignment_requires_event_history" },
|
||||
scan_status: "candidates_found", research_candidates: [dates], person_a: person, person_b: person }] } }, names, "zh");
|
||||
assert.equal(readerEventNotice(candidate, readerSynastryEvents(candidate, "zh", names), "zh"), "");
|
||||
assert.equal(READER_NO_EVENT_TIMING.zh, "目前还不能给出有充分依据的时间段。");
|
||||
});
|
||||
|
||||
test("the follow-up material gives the reader sentence, keeps scan intervals apart, and names no system gap", () => {
|
||||
const payload = { names, dossier, zh: { ...body, sections: [{ id: "progression", title: "关系如何推进",
|
||||
text: "把关系说定要慢一些。\n\n可参考的推进窗口在 2026 年底到 2028 年春,以及 2031 年的一段;前提是现实安排同步。公开与法律婚暂不给日期。",
|
||||
reasons: [{ basis: "甲的第 7 宫主木星落第 10 宫", plain: "甲看重日常安排。" }, { basis: "本节把 2026-11-18 作为可用推进窗口的起点。", plain: "所以先谈现实安排。" }] }] } };
|
||||
const material = synastrySectionMaterial({ payload, sectionId: "progression" as never });
|
||||
const events = material.events as Array<Record<string, string | undefined>>;
|
||||
assert.deepEqual(events.map((row) => row.answer), Array(5).fill("目前还不能给出有充分依据的时间段。"));
|
||||
assert.deepEqual(events.map((row) => row.scan_intervals), [undefined, undefined,
|
||||
"2027 年 3 月至 9 月(已找到探索性扫描区间,尚不能据此判断该事件会发生)", undefined,
|
||||
"2027 年 3 月至 9 月(已找到探索性扫描区间,尚不能据此判断该事件会发生)"]);
|
||||
assert.doesNotMatch(JSON.stringify(events), /尚未接入|判断规则|尚未建立|资料不足|年度资料|正式核对|研究扫描/);
|
||||
// Saved prose that named scan periods as windows does not reach the model.
|
||||
assert.equal(material.text, "把关系说定要慢一些。\n\n公开与法律婚暂不给日期。");
|
||||
assert.deepEqual(material.reasons, [{ basis: "甲的第 7 宫主木星落第 10 宫", plain: "甲看重日常安排。" }]);
|
||||
assert.ok((material.reading_notes as string[]).includes(SYNASTRY_SCAN_NOTE.zh));
|
||||
// Other sections keep their prose as saved.
|
||||
assert.equal(withoutDatedSentences("第一句。到 2027 年再看。第三句。"), "第一句。第三句。");
|
||||
const climate = synastrySectionMaterial({ payload: { ...payload, zh: { ...body, sections: [{ id: "climate", title: "结论总纲", text: "2027 年前后会更稳。", reasons: [] }] } }, sectionId: "climate" as never });
|
||||
assert.equal(climate.text, "2027 年前后会更稳。");
|
||||
// A candidate keeps its formal line for the model.
|
||||
const candidate = followupSynastryEvents(eventClassRows({ relationship_event_timeline: { ...dossier.relationship_event_timeline, event_classes: [
|
||||
{ event_class: "relationship_formation", formal_gate: { status: "candidate_alignment_requires_event_history" },
|
||||
scan_status: "both_activated_no_overlap", research_candidates: [], person_a: person, person_b: person }] } }, names, "zh"), "zh")
|
||||
.find((row) => row.eventClass === "relationship_formation")!;
|
||||
assert.match(candidate.answer, /^两人各自都符合这一类事件的条件,是候选/);
|
||||
assert.equal(candidate.conflict, "按现有依据是候选,但没有找到两人重叠的时间段。");
|
||||
});
|
||||
|
||||
test("developer terms and system gaps never stay in a reply; rows saved with the BUG-2022 wording read in the current wording", () => {
|
||||
assert.deepEqual(synastryReplyInternalWording("这条是恒真分支,方法版本不同。"), ["恒真", "方法版本"]);
|
||||
assert.equal(cleanSynastryChatReply("这一条的证据链还没有建立。"), "目前还不能给出有充分依据的判断。");
|
||||
assert.equal(cleanSynastryChatReply("公开关系这类事件目前没有判断规则。"), "公开关系这类事件目前还不能给出有充分依据的时间段。");
|
||||
const [row] = currentSynastryEvents([{ eventClass: "relationship_formation", title: "成为伴侣",
|
||||
formal: "正式核对:目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据",
|
||||
research: "研究扫描:两人同时有相关运限:2027 年 3 月至 9 月",
|
||||
conflict: "研究扫描找到的时间段仅为计算扫描结果,尚不能据此判断事件发生,不是两人的事件窗口。", people: ["甲:资料不足(公开关系的判断规则还没有出处)"] }],
|
||||
undefined, names, "zh");
|
||||
assert.equal(row.formal, "正式核对:目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。");
|
||||
assert.equal(row.conflict, SCAN_INTERVAL_NOTE.zh);
|
||||
assert.deepEqual(row.people, ["甲:这类事件的判断规则尚未接入"]);
|
||||
});
|
||||
|
||||
test("the writer is told to keep scan dates and periods out of the prose", () => {
|
||||
const prompt = userPrompt({ language: "zh", names, sectionId: "progression" as never, evidence: {}, structure: "skill_v3" });
|
||||
assert.match(prompt, /不写扫描到的日期或时间段,也不写「可参考的窗口」这类说法/);
|
||||
assert.doesNotMatch(prompt, /扫描日期由程序在本节末尾单独列出/);
|
||||
});
|
||||
@@ -368,11 +368,13 @@ evidence_card.backstage records, for the backend only, that global web evidence
|
||||
- 技法执行情况分两栏:「计算」照她回执的状态写;`ready_for_comparison` 写「输入已齐」,不写「已执行」(她 SKILL.md:105-107)。「在本报告中」是产品的 v1 映射:executed、ready_for_comparison 写「供写作参考」,parameter_sensitive、partial 写「只作观察」,blocked、not_applicable 写「未使用」并附理由。
|
||||
- 附录写一句核验说明:「本次依据已接入的星盘计算分析,未进行实时外部检索或针对本次判断的独立案例核验。」正文和追问对话不提。(原值:附录照实列「网上资料核对:未完成」「真实案例校准:未完成」两行。占星师 2026-11-19 上线前答复第 14 条、产品负责人同日同意,BUG-2014。合盘生成不读书籍资料库,所以不写「和资料库」;哪天接入了再补。)
|
||||
- 事件表(占星师 2026-11-19 第 15 条,BUG-2014):正式核对是候选的事件留在正文表里;只有研究扫描结果的事件放进可展开的「探索性结果」,开头写「仅为计算扫描结果,尚不能据此判断事件发生」,不放在事件标题下的正式表里;只说明缺输入、规则未建立的行不显示;首次接触没有独立规则,任何地方都不给时间段。两种核对状态照旧列在附录。追问材料(BUG-2022):每一节的材料都带两人各自的月亮星座、星宿和四分(`pair_moon`);带宫位标注的读法说明和「研究扫描的时间段是探索性结果,可以提、不能当成事件时间、也不要略过」的说明(`reading_notes`)。
|
||||
- 事件表的读者一层(占星师 2026-11-19 第二次答复的分层规则,BUG-2029;取代上一条里「可展开的探索性结果」和追问里提到扫描时间段的做法):研究扫描的结果默认不作为事件预测给读者看。页面正文和导出的读者部分不再有「探索性结果」一块;没有任何事件是正式候选时,「关系事件」下只写一句「目前还不能给出有充分依据的时间段。」,不写原因;正式核对是候选的事件照旧列在正文表里。扫描区间、状态和原始结果留在保存的事件行、技术附录「关系应期依据」和追问材料里;附录的研究扫描一栏在有区间时带她的原句「已找到探索性扫描区间,尚不能据此判断该事件会发生。」追问:问到某件事什么时候发生,先答目前还不能给出有充分依据的时间段,再说现在能判断的部分;不主动列扫描区间,不把缺口说成系统、规则或资料的问题,不让用户以为是自己的资料没填好;只有用户明确问有没有算出过可能的时间段,才说有探索性的扫描区间并列出,同时说明尚不能据此判断该事件会发生。追问材料里的事件行只带读者的话和单列的扫描区间;旧报告正文里把扫描区间写成「可参考的窗口」的句子不进追问材料。写作:正文不写扫描到的日期或时间段。
|
||||
- 事件状态的说法(占星师 2026-11-19 第 19 条,BUG-2029;只用于附录和保存的事件行,不念给读者):四种状态在数据里分开记(`formalState`:basis_not_built、rule_not_built、not_obtained、missing_input;扫描跑过没有命中记在 `scanState`:no_activation),不合并成「盘里没有」。`not_established` 写「目前尚未建立支持这类事件时间判断的完整依据,因此暂不提供时间段。」;没有规则写「本系统尚未接入这类事件所需的判断规则,目前无法给出有依据的时间段。」;法律婚姻缺年度资料写「这条判断所需的年度资料尚未取得,当前不能完成该时间段的核对。」(只有这一类判断需要年度资料;底稿分不出「年度层没接入」和「年度计算失败」,统一按没取得写);缺输入写「资料不足:缺少……。」。规则没接入不写成某个人资料不足。(原值,BUG-2022:`not_established` 写「目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」。这句不能用:上游门控在两人的证据都没有指向这类事件时给这个状态,其中包含证据被挡住或缺失的情况,不是「跑过、两张盘都没有」。)
|
||||
- 交点叫法(占星师 2026-11-19 第 16 条,BUG-2014):合盘统一用「罗睺 / 计都」,正文第一次出现写「罗睺(北交点)」「计都(南交点)」;计算参数里的平均交点 / 真交点照写。其他功能的替换另行处理。
|
||||
- 可见范围(她 Q1):合盘和个人报告、年运一样,结构是结论、主题叙述、证据附录。附录列参数与实际日期、必要的原始结构和周期边界、实际执行和使用情况、冲突、一句核验说明。补充方法(西方合盘、星宿文化、卜卦)实际执行了,附录写名称、来源传统和作用;执行了但没用于结论的单独列;没执行的不得写成已计算。补充方法不得写成印度占星依据,也不提高应期精度。卜卦没有真实提问时刻盘的,标 blocked。工程日志、令牌、私有路径、其他客户资料不进客户稿。旧的禁词和附录检查器跟着改,不得用删掉依据的办法通过检查。
|
||||
- 断言标签和证据等级(她 Q2):保留她的 6 个断言标签和真实调用状态,另加 A–D 等级上限,两轴分开,不从标签换算等级。等级上限由后端按她给的依赖表定,模型只能写到上限或更低;依赖在写作前冻结。没有对得上的案例不得给 A/B;无关层缺失不把整篇降为 D。依赖表落到字段路径后交她审。
|
||||
- 计数(她 Q3):Vimshottari 和 Narayana 保留两条调用记录,但不算两张独立票;同一事件的 MD/AD/PD 和衍生指标不重复计。两人对同一事件都要通过 promise、activation、manifestation、label 门控;通过也只算 `candidate_alignment_requires_event_history`。
|
||||
- 产品扫描(她 Q4):保留为具名、带版本的「研究扫描」,去掉「满两条线=多线」。研究候选不能绕过门控成为双人事件;和她的 gate 冲突时页面写明。`not_established` 写「目前无法给出有依据的时间段:两人各自的盘里都没有针对这类事件的依据」,`one_sided_or_incomplete` 写「单侧或证据不完整」。(原值:`not_established` 写「本证据链尚未建立」。BUG-2022:按她 2026-11-19 第 15 条第一类的说法「目前无法给出有依据的时间段」加关键缺口;状态本身和附录里两种状态并列不变。同批改成读者的话:`no_gate_for_class`「……:这类事件还没有判断规则」;被拦时「……:」加原因;「缺年度层,严格核对不能通过」改「缺少年度资料」;只有扫描结果的时间段,附录研究扫描行后加「(仅为计算扫描结果,尚不能据此判断事件发生)」;附录里的甲 / 乙改用报告里的两个名字。待她确认新说法。)
|
||||
- 产品扫描(她 Q4):保留为具名、带版本的「研究扫描」,去掉「满两条线=多线」。研究候选不能绕过门控成为双人事件;和她的 gate 冲突时页面写明。`not_established` 的说法见上面「事件状态的说法」(BUG-2029),`one_sided_or_incomplete` 写「单侧或证据不完整」。(原值:`not_established` 写「本证据链尚未建立」。BUG-2022:按她 2026-11-19 第 15 条第一类的说法「目前无法给出有依据的时间段」加关键缺口;状态本身和附录里两种状态并列不变。同批改成读者的话:`no_gate_for_class`「……:这类事件还没有判断规则」;被拦时「……:」加原因;「缺年度层,严格核对不能通过」改「缺少年度资料」;只有扫描结果的时间段,附录研究扫描行后加「(仅为计算扫描结果,尚不能据此判断事件发生)」;附录里的甲 / 乙改用报告里的两个名字。待她确认新说法。)
|
||||
- 事件类别(她 Q5):首次接触、心动、成为伴侣、公开化、法律婚姻分开,不合并接触和心动。公开化的社会轴没有书证规则前,公开化判定标 blocked,保留原始结构。年度层的 Tajika、太阳回归、Muntha 不是三张独立票。
|
||||
- 出生时间误差(她 Q6):只把变化一侧依赖它的层及用到这一侧的两盘结论标出,另一人不受影响。逐层核对(DK、UL、宫位、大运等),不因时间不稳机械认定每层都变。各候选分支已经算出且能展示差异的,用 parameter_sensitive;缺输入、分支没算或关键依赖没有结果的,用 blocked 并写原因。按候选时间算出并列给用户,不替用户选,不算在报告里分支(产品 2026-11-15)。默认前后 30 分钟按 M 节。
|
||||
- 用户章节(她 Q7):按 customer-report-shape 的 10 节,包括「十、现实建议」。内部判断顺序不作用户标题。
|
||||
|
||||
Reference in New Issue
Block a user