load_m1_window panics on a wide upper bound (to_ms = i64::MAX) instead of treating it as unbounded #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced while trying to load each asset's full history through the ingest boundary.
Reproduction
Root cause
load_m1_windowforwards itsfrom_ms/to_msstraight toDataServer::stream_m1_windowed, which maps each bound throughunix_ms_to_year_month(chrono) for coarse file-level filtering.i64::MAXms overflowschrono::DateTime::from_timestamp_millis, whose.expect(...)then panics. The panic originates in data-server, but aura-ingest is the boundary that exposes it.Why it bites
There is no way to express an open upper bound through
load_m1_windowtoday: the signature is(from: i64, to: i64), so 'everything up to the latest bar' forces a sentinel, and the natural sentinel (i64::MAX) crashes.stream_m1_windoweditself already takesOption<i64>(None = unbounded) -- the aura-side wrapper threw that away.Direction (not prescriptive)
Either thread
Option<i64>throughload_m1_window(None = unbounded, matching the underlying API), or clamp a too-large bound to a sane ceiling at the boundary. RED-first per the bug-fix discipline. (Upstream data-server hardening ofunix_ms_to_year_monthis a separate, external concern.)Workaround used in the probe:
to_ms = 2_051_222_400_000(2035-01-01).