fix(rectification): keep clock-stamped events out of window intercept (BUG-631, BUG-632)
Dated life events with clock times were swallowed as birth-window replies, and compare columns still stopped at the first nine candidates after the hour-window cap. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -51,6 +51,23 @@ def _decimal(value: Any, default: str = "0") -> Decimal:
|
||||
return Decimal(default)
|
||||
|
||||
|
||||
def _column_times_for_packet(
|
||||
request: RectificationRequest,
|
||||
candidate_decisions: Sequence[dict[str, Any]],
|
||||
) -> list[str]:
|
||||
decision_times = [
|
||||
str(item.get("time") or "")[:5]
|
||||
for item in candidate_decisions
|
||||
if str(item.get("time") or "")[:5]
|
||||
]
|
||||
requested = request.get("column_times")
|
||||
if not isinstance(requested, list) or not requested:
|
||||
return decision_times
|
||||
wanted = {str(item)[:5] for item in requested if isinstance(item, str)}
|
||||
subset = [time for time in decision_times if time in wanted]
|
||||
return subset or decision_times
|
||||
|
||||
|
||||
_AUDIT_LABELS = {
|
||||
"d1-rashi": ("D1 本命盘", "本轮已按该分钟重算本命宫位。"),
|
||||
"d2-hora": ("D2 财帛分盘", "本轮已对照财帛主题。"),
|
||||
@@ -588,7 +605,7 @@ def build_decision_receipt(
|
||||
candidate_times=grid_times,
|
||||
cluster_width_minutes=width,
|
||||
include_discriminators=int(request.get("minute_step") or 1) <= 1,
|
||||
column_times=[item["time"] for item in candidate_decisions],
|
||||
column_times=_column_times_for_packet(request, candidate_decisions),
|
||||
)
|
||||
if packet["dasha_agreement"]["status"] == "conflict":
|
||||
if overall_confidence == "high":
|
||||
|
||||
Reference in New Issue
Block a user