fix(rectification): stop yearless ungrounded varga contrast from minting cards
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:
@@ -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"},
|
||||
|
||||
Reference in New Issue
Block a user