fix(rectification): invite-first collect, holdout at 4 events, Skill 10.0.23 (BUG-646–648)
Stop domain-wheel collecting and age-band years in prompts. Ask until the training gate, then discriminate until convergence, then deliver a range plus a concrete follow-up. Reserve holdout only with four dated events. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,10 +7,20 @@ export type DatedEventInput = Readonly<{
|
||||
precision: InferenceEvent["precision"];
|
||||
}>;
|
||||
|
||||
/** Reserve a holdout as soon as collection has two dated events.
|
||||
/** Reserve a holdout only when collection already has four dated events.
|
||||
* Discrimination still waits until 3 training events remain.
|
||||
*/
|
||||
export const MIN_EVENTS_TO_RESERVE_HOLDOUT = 2;
|
||||
export const MIN_EVENTS_TO_RESERVE_HOLDOUT = 4;
|
||||
|
||||
export type HoldoutReservationStatus = "reserved" | "not_reserved_min_events";
|
||||
|
||||
export function holdoutReservationStatus(events: readonly DatedEventInput[]): HoldoutReservationStatus {
|
||||
const dated = events.filter((item) => item.year !== null && item.precision !== "unknown");
|
||||
if (dated.length < MIN_EVENTS_TO_RESERVE_HOLDOUT) return "not_reserved_min_events";
|
||||
return splitHoldoutEvents(events).some((item) => item.usage === "holdout")
|
||||
? "reserved"
|
||||
: "not_reserved_min_events";
|
||||
}
|
||||
|
||||
/**
|
||||
* Domain-stratified holdout: keep at least one dated event out of training
|
||||
@@ -80,14 +90,16 @@ export function stickyHoldoutEvents(
|
||||
const previousHoldout = previous?.find((item) => item.usage === "holdout");
|
||||
if (previousHoldout && events.some((item) => item.id === previousHoldout.id)) {
|
||||
const dated = events.filter((item) => item.year !== null && item.precision !== "unknown");
|
||||
return events.map((item) => ({
|
||||
...item,
|
||||
usage: item.id === previousHoldout.id
|
||||
? "holdout" as const
|
||||
: dated.some((row) => row.id === item.id)
|
||||
? "training" as const
|
||||
: "unused" as const,
|
||||
}));
|
||||
if (dated.length >= MIN_EVENTS_TO_RESERVE_HOLDOUT) {
|
||||
return events.map((item) => ({
|
||||
...item,
|
||||
usage: item.id === previousHoldout.id
|
||||
? "holdout" as const
|
||||
: dated.some((row) => row.id === item.id)
|
||||
? "training" as const
|
||||
: "unused" as const,
|
||||
}));
|
||||
}
|
||||
}
|
||||
return splitHoldoutEvents(events);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user