fix(rectification): anchor candidate windows to civil dates across midnight
Independent Staging Quality Gate / validate (push) Successful in 13m27s
Independent Staging Quality Gate / publish (push) Failing after 1h0m1s

Carry explicit local date intervals instead of inferring the day from clock
order. Cluster width, delivery, adoption, and reports keep the actual civil
date; adopted date is stored separately from the reported birth_date.

Algorithm identity is scoring-9 / spec-v5. Scoring weights, confirmation
thresholds, and Skill version are unchanged. Isolated Linux final-3 gates
passed; four pre-existing Python failures remain. This is not a production
release.
This commit is contained in:
jesse-ux
2026-09-21 02:55:00 +08:00
parent 3be740f84d
commit b85c4a686a
115 changed files with 106484 additions and 315 deletions
+5 -1
View File
@@ -53,7 +53,7 @@ _EVENT_PROVENANCE_FIELDS = frozenset({
_REQUEST_FIELDS = frozenset({
"birth_date", "start_time", "end_time", "lat", "lon", "tz", "events",
"ayanamsa", "node_mode", "asked_probe_keys", "declined_domains", "column_times", "minute_step", "blocks",
"refresh_probes",
"refresh_probes", "candidate_intervals",
}) | _REQUEST_PROVENANCE_FIELDS
ASKED_PROBE_KEY_MAX_LENGTH = 200
_EVENT_FIELDS = frozenset({"id", "domain", "event_kind", "date_start", "date_end", "precision", "summary"}) | _EVENT_PROVENANCE_FIELDS
@@ -175,6 +175,7 @@ class RectificationRequest(TypedDict):
refresh_probes: NotRequired[bool]
minute_step: NotRequired[int]
blocks: NotRequired[list[dict[str, Any]]]
candidate_intervals: NotRequired[list[dict[str, str]]]
JsonObject = dict[str, Any]
@@ -406,4 +407,7 @@ def normalize_rectification_request(body: Any, *, today: date | None = None) ->
cleaned_request["minute_step"] = minute_step
if "blocks" in body:
cleaned_request["blocks"] = _normalize_blocks(body, start_time, end_time)
if "candidate_intervals" in body:
from scripts.rectification.candidate_window import candidate_intervals
cleaned_request["candidate_intervals"] = candidate_intervals(body)
return cast(RectificationRequest, cleaned_request)