Files
Jyotisha/frontend/tests/consultation-spectrum-parity.test.ts
T
Jesse_Chen 80969c9b31
Independent Staging Quality Gate / validate (push) Successful in 9m12s
Independent Staging Quality Gate / publish (push) Has been cancelled
fix(consult): attach transit windows and VedAstro minute snapshots
Consult only copied Sade Sati and never searched trigger dates; V9 score left official minute identity unevaluated. Search a 90-day slow-planet window and run two-candidate snapshots with timeout staying not_evaluated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:08:17 +08:00

38 lines
2.0 KiB
TypeScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
import test from "node:test";
const root = resolve(fileURLToPath(new URL("../..", import.meta.url)));
test("web consult compute and projection keep the live skill's locally computed spectrum", () => {
const skill = readFileSync(resolve(root, "SKILL.md"), "utf8");
const attach = readFileSync(resolve(root, "scripts/jyotish_api_server.py"), "utf8");
const workflow = readFileSync(resolve(root, "frontend/src/mastra/consultation-workflow.ts"), "utf8");
const instructions = readFileSync(resolve(root, "frontend/src/mastra/index.ts"), "utf8");
assert.match(skill, /共同基础:D1、功能性吉凶星、相关 Yoga、Vimshottari 与 Narayana Dasha、行运、Shadbala、Ashtakavarga/);
assert.match(skill, /事业至少 `D10 \+ A10`/);
assert.match(skill, /婚恋至少 `D9 \+ UL`/);
for (const layer of ["yogas", "chara_dasha", "transits", "arudha_padas", "narayana_dasha"]) {
assert.match(attach, new RegExp(`modules\\['${layer}'\\]`), layer);
}
assert.match(attach, /_compact_yoga_entry/);
assert.match(attach, /_compact_chara_dasha/);
assert.match(attach, /_join_foreground_vedastro/);
assert.match(attach, /skip_vedastro_main_entry_overview': defer_optional_external_evidence/);
assert.doesNotMatch(attach, /defer_optional_external_evidence = False/);
assert.match(workflow, /yogas: context\.local_layers\.yogas/);
assert.match(workflow, /arudha_padas: context\.local_layers\.arudha_padas/);
assert.match(workflow, /chara_dasha: context\.local_layers\.chara_dasha/);
assert.match(attach, /_search_consultation_transit_triggers/);
assert.match(attach, /search_transit_triggers/);
assert.match(workflow, /transits: context\.local_layers\.transits/);
assert.match(workflow, /must_use_layers/);
assert.match(instructions, /must_use_layers is the executed shortlist/);
assert.doesNotMatch(instructions, /AGENTS\.md/);
});