fix(rectification): refresh remaining probes and targeted collect before delivering range (BUG-653/654)
Dated-choice exhaustion is not convergence. Refresh probes from remaining active candidates, then ask a targeted collect, then deliver. Skill 10.0.24. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +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", "column_times", "minute_step", "blocks",
|
||||
"refresh_probes",
|
||||
}) | _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
|
||||
@@ -170,6 +171,7 @@ class RectificationRequest(TypedDict):
|
||||
asked_probe_keys: NotRequired[list[str]]
|
||||
dropped_asked_probe_keys: NotRequired[int]
|
||||
column_times: NotRequired[list[str]]
|
||||
refresh_probes: NotRequired[bool]
|
||||
minute_step: NotRequired[int]
|
||||
blocks: NotRequired[list[dict[str, Any]]]
|
||||
|
||||
@@ -369,6 +371,11 @@ def normalize_rectification_request(body: Any, *, today: date | None = None) ->
|
||||
seen_times.add(item)
|
||||
cleaned_times.append(item)
|
||||
cleaned_request["column_times"] = cleaned_times
|
||||
if "refresh_probes" in body:
|
||||
if body.get("refresh_probes") is not True and body.get("refresh_probes") is not False:
|
||||
raise ValueError("refresh_probes must be a boolean")
|
||||
if body.get("refresh_probes") is True:
|
||||
cleaned_request["refresh_probes"] = True
|
||||
if "minute_step" in body:
|
||||
minute_step = body.get("minute_step")
|
||||
if isinstance(minute_step, bool) or not isinstance(minute_step, int) or not 1 <= minute_step <= 15:
|
||||
|
||||
Reference in New Issue
Block a user