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
+13 -4
View File
@@ -197,19 +197,28 @@ class DiscriminatorContractTest(unittest.TestCase):
self.assertGreaterEqual(MIN_DISCRIMINATOR_EVENTS, 3)
self.assertGreaterEqual(MIN_DISCRIMINATOR_DOMAINS, 2)
def test_training_gate_needs_four_events_when_one_is_holdout(self) -> None:
def test_training_gate_opens_at_three_events_when_holdout_is_not_reserved(self) -> None:
two = _gate_events()[:2]
three = _gate_events()[:3]
four = _gate_events()
# 原值: 3 件留 holdout 后门关;4 件才开
# 新值: 3 件全训练、门开;4 件才留 1 件 holdout
# 原因: BUG-647
self.assertFalse(discriminator_gate_open(two))
self.assertFalse(discriminator_gate_open(three))
self.assertTrue(discriminator_gate_open(three))
two_count, _, _ = training_scoreable_stats(two)
three_count, three_domains, _ = training_scoreable_stats(three)
four_count, four_domains, _ = training_scoreable_stats(four)
self.assertLess(two_count, MIN_DISCRIMINATOR_EVENTS)
self.assertLess(three_count, MIN_DISCRIMINATOR_EVENTS)
self.assertGreaterEqual(three_count, MIN_DISCRIMINATOR_EVENTS)
self.assertGreaterEqual(four_count, MIN_DISCRIMINATOR_EVENTS)
self.assertGreaterEqual(three_domains, MIN_DISCRIMINATOR_DOMAINS)
self.assertGreaterEqual(four_domains, MIN_DISCRIMINATOR_DOMAINS)
from scripts.rectification.case_holdout import holdout_event_ids, holdout_reservation_status
self.assertEqual(holdout_reservation_status(three), "not_reserved_min_events")
self.assertEqual(len(holdout_event_ids(three)), 0)
self.assertEqual(holdout_reservation_status(four), "reserved")
self.assertEqual(len(holdout_event_ids(four)), 1)
built = {
"static_contexts": [
_context("05:13", d4_asc=0, sun_house=4, sun_varga_sign=3),
@@ -232,7 +241,7 @@ class DiscriminatorContractTest(unittest.TestCase):
representative_time="05:13",
today=date(2026, 8, 22),
)
self.assertEqual(three_probes, [])
self.assertTrue(three_probes)
self.assertTrue(four_probes)
self.assertGreater(three_domains, 0)