fix(rectification): offer representative time once event-fit is enough
Keep unique-top and width on confirmation only, and stop lagna-frame follow-ups from blocking cards on an already-scored cluster. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -264,3 +264,40 @@ def test_indistinguishable_width_matches_public_span() -> None:
|
||||
{"time": "04:47", "rank": 3, "tied_minute_count": 25},
|
||||
])
|
||||
assert width >= 25
|
||||
|
||||
|
||||
def test_fourteen_minute_tied_cluster_proposes_but_does_not_confirm() -> None:
|
||||
extra = [{
|
||||
"id": "00000000-0000-4000-8000-000000000004",
|
||||
"domain": "family",
|
||||
"summary": "家人变化",
|
||||
"event_kind": "family_event",
|
||||
"precision": "day",
|
||||
"date_start": "2020-01-01",
|
||||
"date_end": "2020-01-01",
|
||||
}]
|
||||
rows = [
|
||||
{
|
||||
"time": f"{15 + ((50 + offset) // 60):02d}:{(50 + offset) % 60:02d}",
|
||||
"score": 20,
|
||||
"evidence": [],
|
||||
"missing_layers": [],
|
||||
}
|
||||
for offset in range(14)
|
||||
]
|
||||
decisions = build_candidate_decisions(rows, result_id="00000000-0000-4000-8000-000000000099")
|
||||
receipt = build_decision_receipt(
|
||||
_request(extra_events=extra),
|
||||
decisions,
|
||||
{"missing_layers": ["KP_cusps"], "matrix": {}},
|
||||
_diagnostics(),
|
||||
)
|
||||
exact = receipt["gates"]["exact_confirmation"]
|
||||
assert receipt["selection_allowed"] is True
|
||||
assert receipt["propose_allowed"] is True
|
||||
assert receipt["gates"]["unique_top"]["passed"] is False
|
||||
assert exact["indistinguishable_width_minutes"] >= 14
|
||||
assert exact["adjacent_passed"] is False
|
||||
assert exact["engine_granted"] is False
|
||||
assert receipt["confirmation_allowed"] is False
|
||||
assert "adjacent_minutes_indistinguishable" in receipt["confirmation_reasons"]
|
||||
|
||||
Reference in New Issue
Block a user