fix(rectification): stop yearless ungrounded varga contrast from minting cards
Independent Staging Quality Gate / validate (push) Successful in 9m10s
Independent Staging Quality Gate / publish (push) Successful in 8m43s

Only sign-bound varga_style questions may omit a concrete period. Remaining-layer existence and quality probes now drop as yearless_ungrounded_contrast instead of scoring by group order.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-30 10:55:11 +08:00
co-authored by Cursor
parent 95f5851261
commit b43808b016
18 changed files with 741 additions and 138 deletions
+54
View File
@@ -59,6 +59,60 @@ class ProbeQuestionContractTests(unittest.TestCase):
self.assertFalse(result["ok"])
self.assertEqual(result.get("reason"), "forbidden_copy")
def test_yearless_ungrounded_contrast_is_rejected(self) -> None:
existence = is_renderable_probe({
"information_gain": 1.2,
"candidate_ids": ["05:00", "05:04"],
"expected_outcomes": [{}, {}],
"choice_kind": "existence",
"year": 0,
})
self.assertFalse(existence["ok"])
self.assertEqual(existence.get("reason"), "yearless_ungrounded_contrast")
quality = is_renderable_probe({
"information_gain": 1.2,
"candidate_ids": ["05:00", "05:04"],
"expected_outcomes": [{}, {}],
"choice_kind": "event_quality",
"year": 0,
})
self.assertFalse(quality["ok"])
self.assertEqual(quality.get("reason"), "yearless_ungrounded_contrast")
signed = is_renderable_probe({
"information_gain": 1.2,
"candidate_ids": ["05:00", "05:04"],
"expected_outcomes": [{}, {}],
"choice_kind": "varga_style",
"year": 0,
"style_options": [
{"label": "做事以照顾人为主,在意团队里的感受", "answer_class": "yes", "sign": "巨蟹座"},
{"label": "习惯带头,也不排斥站到台前", "answer_class": "weak_yes", "sign": "狮子座"},
],
})
self.assertTrue(signed["ok"])
unsigned = is_renderable_probe({
"information_gain": 1.2,
"candidate_ids": ["05:00", "05:04"],
"expected_outcomes": [{}, {}],
"choice_kind": "varga_style",
"year": 0,
"style_options": [
{"label": "做事以照顾人为主,在意团队里的感受", "answer_class": "yes"},
{"label": "习惯带头,也不排斥站到台前", "answer_class": "weak_yes"},
],
})
self.assertFalse(unsigned["ok"])
self.assertEqual(unsigned.get("reason"), "yearless_ungrounded_contrast")
dated = is_renderable_probe({
"information_gain": 1.2,
"candidate_ids": ["05:00", "05:04"],
"expected_outcomes": [{}, {}],
"choice_kind": "existence",
"year": 2016,
"year_label": "2016 年前后",
})
self.assertTrue(dated["ok"])
def test_duplicate_labels_uniquify_with_index(self) -> None:
completed = complete_style_options("varga_style", [
{"label": "相处主动热情", "answer_class": "yes"},