fix(web): restore rectification discriminator cards and stop-offer path
Coverage-complete ties never persisted A/B/C/D because contrast probes were stamped with an answered education quality probe, remaining minutes were asked as window D10 signs, and 「没有了」 missed the stop pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -262,6 +262,58 @@ class EventProbesTest(unittest.TestCase):
|
||||
self.assertTrue(any(item["domain"] == "relocation" for item in probes))
|
||||
self.assertLessEqual(len(probes), 3)
|
||||
|
||||
def test_enrollment_quality_does_not_block_dasha(self) -> None:
|
||||
built = {
|
||||
"static_contexts": [
|
||||
_context("05:13", d4_asc=0, sun_house=4, sun_varga_sign=3),
|
||||
_context("05:14", d4_asc=1, sun_house=10, sun_varga_sign=9),
|
||||
]
|
||||
}
|
||||
probes = discriminating_event_probes(
|
||||
_request(events=[{
|
||||
"id": "00000000-0000-4000-8000-000000000001",
|
||||
"domain": "education",
|
||||
"summary": "2016年9月进入大学",
|
||||
"date": "2016-09-01",
|
||||
"precision": "month",
|
||||
}]),
|
||||
built,
|
||||
scan=window_scan(built),
|
||||
candidate_times=["05:13", "05:14"],
|
||||
representative_time="05:13",
|
||||
precision_current="d5_refine",
|
||||
today=date(2026, 8, 22),
|
||||
)
|
||||
self.assertTrue(probes)
|
||||
self.assertTrue(any(item["source"] in {"dasha_activation", "dasha_boundary"} for item in probes))
|
||||
self.assertTrue(any(item["domain"] == "relocation" for item in probes))
|
||||
|
||||
def test_representatives_prefer_remaining_candidate_times(self) -> None:
|
||||
built = {
|
||||
"static_contexts": [
|
||||
_context("04:47", d4_asc=0, sun_house=4, sun_varga_sign=3),
|
||||
_context("04:48", d4_asc=1, sun_house=10, sun_varga_sign=9),
|
||||
_context("05:00", d4_asc=0, sun_house=4, sun_varga_sign=3),
|
||||
_context("05:06", d4_asc=1, sun_house=10, sun_varga_sign=9),
|
||||
_context("05:07", d4_asc=1, sun_house=10, sun_varga_sign=9),
|
||||
]
|
||||
}
|
||||
probes = discriminating_event_probes(
|
||||
_request(),
|
||||
built,
|
||||
scan=window_scan(built),
|
||||
candidate_times=["05:00", "05:06", "05:07"],
|
||||
representative_time="05:00",
|
||||
precision_current="d4_refine",
|
||||
today=date(2026, 8, 22),
|
||||
)
|
||||
self.assertTrue(probes)
|
||||
row = next(item for item in probes if item["source"] in {"dasha_activation", "dasha_boundary"})
|
||||
times = {row.get("left_time"), row.get("right_time")}
|
||||
self.assertTrue(times <= {"05:00", "05:06", "05:07"})
|
||||
self.assertIn("05:00", times)
|
||||
self.assertTrue(times & {"05:06", "05:07"})
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user