fix(web): stop rectification interview when remaining minutes no longer split

Coverage-complete ties stayed in discrimination because whole-window D9/D24 follow-ups were treated as probes, and restated dates inserted duplicate evidence. Skip encoded remaining layers, ask leftover D4 or offer a provisional range, and dedupe dated rows by kind and date.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-25 19:02:35 +08:00
parent 946f11185e
commit a658ef8d2b
18 changed files with 1019 additions and 141 deletions
+19 -3
View File
@@ -104,6 +104,11 @@ DOMAIN_CATALOG: dict[str, dict[str, Any]] = {
},
}
# 入学年与高考通常同一学年或前后一年;存在性探针跳过邻近年,质量探针仍按精确年。
EXISTENCE_NEARBY_YEARS = {
"education": 1,
}
def _clock(value: str) -> int:
return int(value[:2]) * 60 + int(value[3:5])
@@ -505,6 +510,16 @@ def _event_years(events: Sequence[dict[str, Any]], domain: str) -> set[int]:
return years
def _existence_blocked_years(domain: str, known_years: set[int]) -> set[int]:
blocked = set(known_years)
span = int(EXISTENCE_NEARBY_YEARS.get(domain, 0))
if span <= 0:
return blocked
for year in known_years:
blocked.update(range(year - span, year + span + 1))
return blocked
def _quality_probes(
events: Sequence[dict[str, Any]],
domains: Sequence[str],
@@ -644,10 +659,11 @@ def discriminating_event_probes(
if domain not in DOMAIN_CATALOG:
continue
known_years = _event_years(events, domain)
blocked_years = _existence_blocked_years(domain, known_years)
boundary = sorted((vim_years | narayana_years) & set(range(lo, hi + 1)))
found = None
for year in boundary:
if year in known_years:
if year in blocked_years:
continue
found = _evaluate_year(
left, right, birth_date=birth_date, domain=domain, year=year, source="dasha_boundary",
@@ -656,7 +672,7 @@ def discriminating_event_probes(
break
if found is None:
midpoint = _age_band_year(birth_year, domain, now)
if midpoint is not None and midpoint not in known_years:
if midpoint is not None and midpoint not in blocked_years:
found = _evaluate_year(
left, right, birth_date=birth_date, domain=domain, year=midpoint, source="dasha_activation",
)
@@ -675,7 +691,7 @@ def discriminating_event_probes(
continue
known_years = _event_years(events, domain)
year = _age_band_year(birth_year, domain, now)
if year is None or year in known_years:
if year is None or year in _existence_blocked_years(domain, known_years):
continue
probes.append(_public_probe(
year=year,