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:
Jesse_Chen
2026-09-11 01:43:02 +08:00
co-authored by Cursor
parent cb04529728
commit dd8f35f7ba
70 changed files with 2576 additions and 1183 deletions
@@ -1,7 +1,7 @@
import assert from "node:assert/strict";
import test from "node:test";
import { holdoutEventIds, splitHoldoutEvents } from "../src/lib/rectification-agentic/core/split-holdout.ts";
import { holdoutEventIds, holdoutReservationStatus, splitHoldoutEvents } from "../src/lib/rectification-agentic/core/split-holdout.ts";
test("holdout fallback reserves a month-or-better event, not a trailing year event", () => {
const events = splitHoldoutEvents([
@@ -24,3 +24,17 @@ test("singleton-domain holdout still prefers that domain when training would sta
]);
assert.deepEqual([...holdoutEventIds(events)], ["edu"]);
});
test("three dated events stay in training and do not reserve a holdout", () => {
const events = splitHoldoutEvents([
{ id: "edu", domain: "education", year: 2016, precision: "month" },
{ id: "job", domain: "career", year: 2018, precision: "month" },
{ id: "love", domain: "relationship", year: 2021, precision: "year" },
]);
// 原值: 3 件留 1 件 holdout,训练只剩 2,训练门关
// 新值: 不足 4 件不留 holdout,3 件全进训练
// 原因: 用户给了门槛件数却被 holdout 卡住(BUG-647
assert.equal(holdoutEventIds(events).size, 0);
assert.equal(events.filter((item) => item.usage === "training").length, 3);
assert.equal(holdoutReservationStatus(events), "not_reserved_min_events");
});