fix(rectification): downgrade yearless personality probes to tie-breakers (BUG-629)
Ask dated dasha probes first; D9/D10 and nakshatra wait until that pool is empty, score at half weight, and never eliminate. Skill 10.0.21. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
type TransitionSignLookup,
|
||||
} from "./sign-from-transitions.ts";
|
||||
import {
|
||||
PROBE_WEIGHT,
|
||||
SCORE_DELTA,
|
||||
STRONG_CONFLICT_ELIMINATION_COUNT,
|
||||
type AnswerClass,
|
||||
@@ -16,11 +17,17 @@ import {
|
||||
export type ProbeApplyResult = Readonly<{
|
||||
scores: Readonly<Record<string, number>>;
|
||||
eliminated_ids: readonly string[];
|
||||
kind: "informative" | "low_information";
|
||||
kind: "informative" | "low_information" | "tie_break";
|
||||
deltas: Readonly<Record<string, number>>;
|
||||
strong_conflict_counts: Readonly<Record<string, number>>;
|
||||
}>;
|
||||
|
||||
export function isYearlessPersonalityProbe(
|
||||
probe: Pick<ConflictProbe, "choice_kind" | "source">,
|
||||
): boolean {
|
||||
return probe.choice_kind === "varga_style" || probe.source === "nakshatra_boundary";
|
||||
}
|
||||
|
||||
export type ProbeDirectionContext = Readonly<{
|
||||
probe?: ConflictProbe;
|
||||
transitions?: readonly TransitionSignLookup[];
|
||||
@@ -181,15 +188,19 @@ export function applyProbeOutcome(
|
||||
};
|
||||
}
|
||||
const context: ProbeDirectionContext = { probe, transitions: options.transitions };
|
||||
const yearless = isYearlessPersonalityProbe(probe);
|
||||
const weight = yearless ? PROBE_WEIGHT.yearless : PROBE_WEIGHT.dated;
|
||||
for (const [id, score] of Object.entries(scores)) {
|
||||
const direction = directionFor(id, outcome, probe.choice_kind, context);
|
||||
if (direction === "conflict") conflictCounts[id] = (conflictCounts[id] ?? 0) + 1;
|
||||
if (direction === "conflict" && !yearless) {
|
||||
conflictCounts[id] = (conflictCounts[id] ?? 0) + 1;
|
||||
}
|
||||
if (eliminated.has(id)) {
|
||||
next[id] = score;
|
||||
deltas[id] = 0;
|
||||
continue;
|
||||
}
|
||||
const delta = SCORE_DELTA[direction];
|
||||
const delta = SCORE_DELTA[direction] * weight;
|
||||
deltas[id] = delta;
|
||||
next[id] = score + delta;
|
||||
}
|
||||
@@ -210,7 +221,7 @@ export function applyProbeOutcome(
|
||||
return {
|
||||
scores: next,
|
||||
eliminated_ids: [...eliminated],
|
||||
kind: changed ? "informative" : "low_information",
|
||||
kind: yearless ? "tie_break" : (changed ? "informative" : "low_information"),
|
||||
deltas,
|
||||
strong_conflict_counts: conflictCounts,
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ export type InferenceTransitionSnapshot = Readonly<{
|
||||
entropyBefore?: number | null;
|
||||
entropyAfter?: number | null;
|
||||
eliminatedCandidateIds?: readonly string[];
|
||||
roundKind?: "informative" | "low_information" | null;
|
||||
roundKind?: "informative" | "low_information" | "tie_break" | null;
|
||||
}>;
|
||||
|
||||
const CLOCK = /^(?:[01]\d|2[0-3]):[0-5]\d$/;
|
||||
@@ -34,7 +34,7 @@ const EVENT_USAGES = new Set(["training", "holdout", "unused"]);
|
||||
const ANSWER_CLASSES = new Set(["yes", "weak_yes", "no", "unsure"]);
|
||||
const PROBE_CHOICE_KINDS = new Set(["existence", "varga_style", "event_quality"]);
|
||||
const ANSWER_SOURCES = new Set(["choice", "evidence", "declined"]);
|
||||
const ROUND_KINDS = new Set(["informative", "low_information"]);
|
||||
const ROUND_KINDS = new Set(["informative", "low_information", "tie_break"]);
|
||||
const SCORE_DIRECTIONS = new Set(["support", "weak_support", "neutral", "weak_conflict", "conflict"]);
|
||||
|
||||
function isRecord(value: unknown): value is Readonly<Record<string, unknown>> {
|
||||
|
||||
@@ -47,6 +47,12 @@ export const SCORE_DELTA: Readonly<Record<ScoreDirection, number>> = {
|
||||
conflict: -2,
|
||||
};
|
||||
|
||||
/** Dated distinguish probes keep full SCORE_DELTA. Yearless personality is tie-break only. */
|
||||
export const PROBE_WEIGHT = {
|
||||
dated: 1,
|
||||
yearless: 0.5,
|
||||
} as const;
|
||||
|
||||
export type InferenceCandidate = Readonly<{
|
||||
id: string;
|
||||
time: string;
|
||||
@@ -116,7 +122,7 @@ export type RoundTrace = Readonly<{
|
||||
entropy_after: number;
|
||||
eliminated_ids: readonly string[];
|
||||
winner_id: string | null;
|
||||
kind: "informative" | "low_information";
|
||||
kind: "informative" | "low_information" | "tie_break";
|
||||
}>;
|
||||
|
||||
export type InferenceState = Readonly<{
|
||||
|
||||
Reference in New Issue
Block a user