test(confidence-engine): capture structural frontier priority regression
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { makeNode, makeGraph } from "@/lib/graph/schema.js";
|
||||
import { formulateQuestionForTarget, buildFocusedDeconstructPrompt, validateFocusedDeconstructSchema } from "@/lib/graph/focused-investigation.js";
|
||||
import { FOCUSED_DECONSTRUCT_REGRESSION_CASES, validateRegressionFixtureIntegrity } from "./focused-deconstruct-regression-cases.mjs";
|
||||
|
||||
// ── helpers ──────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -230,3 +231,40 @@ describe("validateFocusedDeconstructSchema", () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// ── Regression fixture integrity (zero live calls) ──────────────────────────
|
||||
|
||||
describe("FOCUSED_DECONSTRUCT_REGRESSION_CASES fixture integrity", () => {
|
||||
it("has exactly 7 cases", () => {
|
||||
expect(FOCUSED_DECONSTRUCT_REGRESSION_CASES.length).toBe(7);
|
||||
});
|
||||
|
||||
it("all IDs are unique", () => {
|
||||
const ids = FOCUSED_DECONSTRUCT_REGRESSION_CASES.map((c) => c.id);
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
});
|
||||
|
||||
it("contains the new structural-frontier case ID", () => {
|
||||
const ids = FOCUSED_DECONSTRUCT_REGRESSION_CASES.map((c) => c.id);
|
||||
expect(ids).toContain("structural-frontier-over-working-example-detail");
|
||||
});
|
||||
|
||||
it("preserves all six original case IDs", () => {
|
||||
const ids = FOCUSED_DECONSTRUCT_REGRESSION_CASES.map((c) => c.id);
|
||||
for (const origId of [
|
||||
"nearest-frontier-wins",
|
||||
"no-genuine-assumption",
|
||||
"genuine-evidence-sufficiency-assumption",
|
||||
"juxtaposition-must-not-create-link",
|
||||
"tentative-observation-fidelity",
|
||||
"genuine-dependency-frontier",
|
||||
]) {
|
||||
expect(ids).toContain(origId);
|
||||
}
|
||||
});
|
||||
|
||||
it("validateRegressionFixtureIntegrity reports zero errors", () => {
|
||||
const errors = validateRegressionFixtureIntegrity();
|
||||
expect(errors).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user