load_m1_window rustdoc: None is file-level, not bar-level (in-coverage-empty window returns Some(empty)) #18
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?
Found by the cycle-0011 fieldtest (docs/specs/fieldtest-0011-ingest.md).
aura_ingest::load_m1_window's rustdoc states "None if the symbol has no data in [from_ms, to_ms]". Empirically None is file-level: it occurs only when no data-server file overlaps the window (e.g. a far-future window) or the symbol is unknown. A narrow window inside a loaded file's coverage that happens to contain zero bars returns Some(M1Columns { ..empty vecs.. }), NOT None.
A downstream consumer matching None to mean "no bars here" is wrong for the in-coverage-empty case; it must also check cols.close.is_empty().
Fix: one rustdoc line on load_m1_window — either document precisely (None only when no overlapping file / unknown symbol; in-coverage-empty returns Some with empty columns, check .close.is_empty()), or collapse the empty case into None so Some/None cleanly means has-bars / has-none. Decide which is the intended contract and tighten rustdoc (+ ledger if the contract is load-bearing).
No functional defect in the boundary; correctness-of-docs only.