You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): keep calendar-edge dates from failing a note's index
@effective:9999-12 constructed date(10000, 1, 1) and raised, and nothing
in the chain caught it: not the qualifier reader, not the observation
parser, not entity_parser. A note whose second observation carried that
qualifier failed the whole document parse — its other observations and
all its relations went with it.
Auditing the rest of the successor arithmetic found a worse instance the
report did not name: _instant_value calls astimezone(UTC), which raises
OverflowError when the offset shift crosses the calendar edge.
OverflowError is not a ValueError, so it escaped even the existing
except clause, and the same bounds reach the search router — where
ValueError maps to 400 and this was a 500. Three spellings were
reachable, including an underflow at 0001-01-01.
Terminal periods now render as the unbounded range they represent
(@effective:9999 -> [9999-01-01,), @effective:9999-12 ->
[9999-12-01,)); a year beyond the calendar stays content, and an instant
that leaves the calendar in UTC is refused at the bound rather than
thrown. The other six arithmetic sites were audited and are safe, each
for a stated reason.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014pmKq6bqCi6Zp6BTHuZjrp
Signed-off-by: phernandez <paul@basicmachines.co>
0 commit comments