fix(web): type holdout followups and stop duplicate core re-exports
Staging publish next build failed after validate skipped production TypeScript, so holdout unions and the decision barrel never reached the image. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,7 +11,11 @@ export * from "./probes-from-engine.ts";
|
||||
export * from "./decision-fingerprint.ts";
|
||||
export * from "./compose-receipt.ts";
|
||||
export * from "./candidate-separation.ts";
|
||||
export * from "./decide-next-action.ts";
|
||||
export {
|
||||
decideNextAction,
|
||||
type DecideNextActionInput,
|
||||
type RectificationNextAction,
|
||||
} from "./decide-next-action.ts";
|
||||
export * from "./rectification-decision.ts";
|
||||
export * from "./credible-range.ts";
|
||||
export * from "./candidate-contrast-packet.ts";
|
||||
|
||||
@@ -85,9 +85,9 @@ export type MethodCoverage = Readonly<{
|
||||
}>;
|
||||
|
||||
export type MethodFollowup = Readonly<{
|
||||
method_id: "dasha_events" | "d9_relationship" | "d10_career" | "d4_home" | "d5_education" | "relatives" | "d2_finance" | "d30_health" | "appearance" | "marks" | "occupation" | "horary" | "active_focus" | "nakshatra_boundary" | "oos_blind" | "reverse_verify";
|
||||
method_id: "dasha_events" | "d9_relationship" | "d10_career" | "d4_home" | "d5_education" | "relatives" | "d2_finance" | "d30_health" | "appearance" | "marks" | "occupation" | "horary" | "active_focus" | "nakshatra_boundary" | "oos_blind" | "reverse_verify" | "holdout_validation";
|
||||
intent: string;
|
||||
ask_theme: "dated_event" | "relationship_style" | "career_style" | "home_change" | "education_style" | "family_event" | "finance_change" | "health_pressure" | "appearance" | "marks" | "occupation" | "horary" | "active_focus" | "nakshatra_trait" | "oos_blind";
|
||||
ask_theme: "dated_event" | "relationship_style" | "career_style" | "home_change" | "education_style" | "family_event" | "finance_change" | "health_pressure" | "appearance" | "marks" | "occupation" | "horary" | "active_focus" | "nakshatra_trait" | "oos_blind" | "holdout";
|
||||
domain: string | null;
|
||||
kind_hint: string | null;
|
||||
user_prompt_hint: string;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import test from "node:test";
|
||||
|
||||
import {
|
||||
@@ -351,3 +352,23 @@ test("final report does not claim executed techniques without calculationResultI
|
||||
assert.match(report, /\| D10 \| executed \|/);
|
||||
assert.doesNotMatch(report, /当前推荐/);
|
||||
});
|
||||
|
||||
test("core barrel re-exports decideNextAction without duplicating session helpers", () => {
|
||||
const index = readFileSync(new URL("../src/lib/rectification-agentic/core/index.ts", import.meta.url), "utf8");
|
||||
assert.match(
|
||||
index,
|
||||
/export \{\s*decideNextAction,\s*type DecideNextActionInput,\s*type RectificationNextAction,\s*\} from "\.\/decide-next-action\.ts"/,
|
||||
);
|
||||
assert.doesNotMatch(index, /export \* from "\.\/decide-next-action\.ts"/);
|
||||
assert.match(index, /export \* from "\.\/rectification-decision\.ts"/);
|
||||
});
|
||||
|
||||
test("MethodFollowup unions include holdout validation kinds used by next_followup", () => {
|
||||
const source = readFileSync(new URL("../src/lib/rectification-agentic/v9/method-followup.ts", import.meta.url), "utf8");
|
||||
const methodId = source.match(/export type MethodFollowup = Readonly<\{[\s\S]*?method_id: ([^;]+);/)?.[1] ?? "";
|
||||
const askTheme = source.match(/export type MethodFollowup = Readonly<\{[\s\S]*?ask_theme: ([^;]+);/)?.[1] ?? "";
|
||||
assert.match(methodId, /"holdout_validation"/);
|
||||
assert.match(askTheme, /"holdout"/);
|
||||
assert.match(source, /ask_theme: "holdout"/);
|
||||
assert.match(source, /method_id: "holdout_validation"/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user