piker/piker/tsp
Gud Boi 025d3573e1 Handle valid null frames and 0-bar cases in backfill
Add guards for empty-array and zero-bar-diff cases in the TSP backfill
loops to avoid crashes and allow graceful loop termination.

In `maybe_fill_null_segments()`,
- add `array.size == 0` guard in `maybe_fill_null_segments()` to detect
  valid (venue closure) gaps from the backend; add a warning + bp
  + break for this case.
- add TODO that we should likely be filling nulls with the close price
  for the gap's duration.

In `start_backfill()`,
- expand the "0 bars after diff" warning msg with
  `backfill_until_dt` and `end_dt_param` context.
- mask the  `await tractor.pause()` and add a `break` to avoid blocking
  the backfill loop.

(this commit msg was generated in some part by
[`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-03-11 15:51:41 -04:00
..
__init__.py Mv `markup_gaps()` to new `.tsp._annotate` mod 2026-02-22 22:08:34 -05:00
_anal.py Use `__name__` for loggers across most sub-mods 2026-02-23 12:22:48 -05:00
_annotate.py Use `get_fonts()`, add `show_txt` flag to gap annots 2026-02-22 22:08:35 -05:00
_dedupe_smart.py Add vlm-based "smart" OHLCV de-duping & bar validation 2026-02-22 22:08:34 -05:00
_history.py Handle valid null frames and 0-bar cases in backfill 2026-03-11 15:51:41 -04:00