fix(consult): keep career row hints off the planet nature
Career significator and house-lord rows now carry one presentation sentence. Values stay the same. A second three-repeat biography run still has one field conflict, so this is not accepted. Not pushed.
This commit is contained in:
@@ -7,7 +7,7 @@ import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { buildEvidenceCard } from "../src/lib/consultation-evidence-card.ts";
|
||||
import { assembleJudgmentTable, JUDGMENT_TABLE_LABELS } from "../src/lib/consultation-judgment-table.ts";
|
||||
import { assembleJudgmentTable, judgmentTableModelView, JUDGMENT_TABLE_LABELS } from "../src/lib/consultation-judgment-table.ts";
|
||||
import type { ConsultationDomain } from "../src/lib/consultation-domain-registry.ts";
|
||||
import { createConsultationPlan } from "../src/lib/consultation-plan.ts";
|
||||
import {
|
||||
@@ -129,6 +129,47 @@ test("the judgment table copies leaves and does not turn the count into a verdic
|
||||
assert.deepEqual((rahu.co_tenants as { value: string[] }).value, ["Mars"]);
|
||||
const blocked = rows.find((row) => row.id === "jaimini");
|
||||
assert.equal(blocked?.kind, "blocked");
|
||||
const house = rows.find((row) => row.id === "house:10");
|
||||
assert.equal(house?.reading, undefined);
|
||||
assert.equal(lord.reading, JUDGMENT_TABLE_LABELS.careerSignificatorReading);
|
||||
assert.equal(rahu.reading, JUDGMENT_TABLE_LABELS.careerSignificatorReading);
|
||||
});
|
||||
|
||||
// Assertion change:
|
||||
// 原值: 事业判断表的行星行没有呈现句;重复出现的行星只留 id、角色、引用和受冲计数。
|
||||
// 新值: 事业的自然代表星、Jaimini 代表星、大运主星、Narayana 主星和宫主行带同一句呈现文字。婚恋表不带。重复行仍丢掉度数,但留下这句。行星的星座、宫位、旺弱不变。
|
||||
// 原因: 清单句之后仍有 1 次按星性写方向。模型读的是事业宫主行。只加呈现文字,不改取值(TASK-consult-career-type-residual-20261009)。
|
||||
test("career significator rows name strength only, and other domains stay unchanged", () => {
|
||||
const career = assembleJudgmentTable({
|
||||
...facts,
|
||||
factors: [
|
||||
...facts.factors,
|
||||
{ id: "jaimini:AmK", kind: "planet", planet: "Saturn", citation: "jaimini", role: "AmK" },
|
||||
{ id: "jaimini:DK", kind: "planet", planet: "Saturn", citation: "jaimini", role: "DK" },
|
||||
{ id: "vimshottari:md", kind: "planet", planet: "Sun", citation: "vim", role: "Vimshottari MD" },
|
||||
{ id: "narayana:lord", kind: "planet", planet: "Sun", citation: "narayana", role: "Narayana MD lord" },
|
||||
],
|
||||
});
|
||||
const rows = career.rows as Array<Record<string, unknown>>;
|
||||
for (const id of ["house:10:lord", "natural:Saturn", "jaimini:AmK", "jaimini:DK", "vimshottari:md", "narayana:lord"]) {
|
||||
assert.equal(rows.find((row) => row.id === id)?.reading, JUDGMENT_TABLE_LABELS.careerSignificatorReading, id);
|
||||
}
|
||||
const lord = rows.find((row) => row.id === "house:10:lord") as Record<string, unknown>;
|
||||
assert.equal(lord.planet, "Sun");
|
||||
assert.equal((lord.d1_sign as { value: string }).value, "Aries");
|
||||
assert.equal((lord.d1_house as { value: number }).value, 10);
|
||||
assert.equal((lord.d1_dignity as { value: string }).value, "落陷(Debilitated)");
|
||||
const marriage = assembleJudgmentTable({ ...facts, domain: "marriage" });
|
||||
const marriageEncoded = JSON.stringify(marriage);
|
||||
assert.equal(marriageEncoded.includes(JUDGMENT_TABLE_LABELS.careerSignificatorReading), false);
|
||||
assert.equal((marriage.rows as Array<Record<string, unknown>>).find((row) => row.id === "house:10:lord")?.planet, "Sun");
|
||||
const view = judgmentTableModelView(career) as { rows: Array<Record<string, unknown>> };
|
||||
const repeat = view.rows.find((row) => row.id === "vimshottari:md");
|
||||
assert.equal(repeat?.planet, "Sun");
|
||||
assert.equal(repeat?.role, "Vimshottari MD");
|
||||
assert.equal(repeat?.reading, JUDGMENT_TABLE_LABELS.careerSignificatorReading);
|
||||
assert.equal(repeat?.d1_sign, undefined);
|
||||
assert.equal(repeat?.d1_dignity, undefined);
|
||||
});
|
||||
|
||||
test("a card without facts keeps the old section, and facts attach one table", () => {
|
||||
@@ -219,6 +260,11 @@ test("engine facts make a model card without internal paths", () => {
|
||||
assert.equal(encoded.includes("core_chart."), false, `${chart} ${domain}`);
|
||||
assert.equal(encoded.includes("\"check\""), false, `${chart} ${domain}`);
|
||||
assert.equal(encoded.includes("两个及以上"), false);
|
||||
assert.equal(
|
||||
encoded.includes(JUDGMENT_TABLE_LABELS.careerSignificatorReading),
|
||||
domain === "career",
|
||||
`${chart} ${domain}`,
|
||||
);
|
||||
assert.ok(encoded.length <= 20_000, `${chart} ${domain} ${encoded.length}`);
|
||||
const rows = (card.domain_sections[domain as ConsultationDomain]?.judgment_table?.rows ?? []) as Array<Record<string, unknown>>;
|
||||
const hasAspect = rows.some((row) => (
|
||||
|
||||
Reference in New Issue
Block a user