fix(rectification): keep clock-stamped events out of window intercept (BUG-631, BUG-632)
Independent Staging Quality Gate / validate (push) Successful in 12m36s
Independent Staging Quality Gate / publish (push) Successful in 2m11s

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:
Jesse_Chen
2026-09-10 09:23:35 +08:00
co-authored by Cursor
parent 2de2aa0b71
commit 719ff55a09
19 changed files with 395 additions and 24 deletions
+18 -1
View File
@@ -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":