fix(rectification): centralize delivery authority
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { OPEN_ENGINE_CAPABILITY_CEILING } from "./rectification-v9-test-support.ts";
|
||||
|
||||
import { applyChoiceWithoutEvidence } from "../src/lib/rectification-agentic/v9/inference-adapter.ts";
|
||||
import { applyHoldoutAnswer, buildInferenceState } from "../src/lib/rectification-agentic/core/build-state.ts";
|
||||
import { unionStillValidRange } from "../src/lib/rectification-agentic/core/credible-range.ts";
|
||||
@@ -155,6 +157,7 @@ test("hidden case walks collection through holdout to a range or representative
|
||||
score: item.posterior_score,
|
||||
}));
|
||||
const afterAnswers = decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
candidateScores: scores,
|
||||
holdoutValidation: "not_started",
|
||||
@@ -166,6 +169,7 @@ test("hidden case walks collection through holdout to a range or representative
|
||||
assert.equal(holdoutPassed.holdout_passed, true);
|
||||
assert.deepEqual(posteriorMap(holdoutPassed.candidates), posteriorMap(answered.state.candidates));
|
||||
const closed = decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
candidateScores: holdoutPassed.candidates.map((item) => ({
|
||||
time: item.time,
|
||||
@@ -223,6 +227,7 @@ test("holdout failure returns to candidate discrimination", () => {
|
||||
}],
|
||||
});
|
||||
const next = decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
candidateScores: failed.candidates.map((item) => ({ time: item.time, score: item.posterior_score })),
|
||||
discriminatorProbe: selectDiscriminatorProbe(retryPacket),
|
||||
@@ -277,6 +282,7 @@ test("mutated years and domains do not keep asking exam-quality copy", () => {
|
||||
|
||||
test("user stop is an unvalidated range, not a holdout pass", () => {
|
||||
const stopped = decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
userStopped: true,
|
||||
candidateScores: [
|
||||
@@ -293,6 +299,7 @@ test("user stop is an unvalidated range, not a holdout pass", () => {
|
||||
|
||||
test("tied candidates without a high-information probe offer a range instead of inventing left/right", () => {
|
||||
const next = decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
trainingGateOpen: true,
|
||||
candidateScores: [
|
||||
@@ -378,6 +385,7 @@ test("case A: two then three events keep collecting; four training events may di
|
||||
})),
|
||||
});
|
||||
return decideRectification({
|
||||
engineCeiling: OPEN_ENGINE_CAPABILITY_CEILING,
|
||||
methodCoverageAll: true,
|
||||
trainingGateOpen: state.events.filter((item) => item.usage === "training").length >= 3
|
||||
&& new Set(state.events.filter((item) => item.usage === "training").map((item) => item.domain)).size >= 2,
|
||||
|
||||
Reference in New Issue
Block a user