piker/ai/prompt-io/codex/20260924T232405Z_441358e2_s...

1.6 KiB
Raw Blame History

Prompt

User: “do it”, approving the proposed bounded wider-window retry for incomplete schedule coverage and its MNQ regression test. Previous live qualification showed a one-day request began after the gap’s left edge; a wider query covered it and excluded the one-hour venue closure.

Response summary

Added bounded backwards widening under one timeout, preserving actual coverage and fixed end bounds. Added captured-response allocation, unknown-coverage, and retry-timeout tests, and updated API documentation. 39 selected tests and Ruff passed. Live data was not changed.

Files changed

  • piker/brokers/ib/api.py — bounded schedule coverage retries.
  • tests/providers/test_ib_schedule.py — captured MNQ and retry regressions.
  • docs/history_segment_backfill.rst — retry contract and limits.

Human edits

The user established schedule-driven allocation, explicit unknown coverage, and avoiding reindexing as the design constraints, supplied the MNQ gap, and authorized this focused coverage fix. No direct human source edits occurred during this patch; review is pending.

Follow-up review

The user requested factoring and documenting the repeated 86400 conversion. Added piker.calc.SECONDS_PER_DAY, documented elapsed versus calendar/session days once, and reused it in the IB query and reservation span check. Named the client retry limit locally. Schedule tests: 11 passed; Ruff passed after this adjustment.