Skip to content

feat: add strict ADJUSTED_LAST history contract - #298

Merged
Pigbibi merged 1 commit into
mainfrom
codex/qsl-p3-soxl-stage-a-qpk-acquisition-authority-guard-20260806
Aug 5, 2026
Merged

feat: add strict ADJUSTED_LAST history contract#298
Pigbibi merged 1 commit into
mainfrom
codex/qsl-p3-soxl-stage-a-qpk-acquisition-authority-guard-20260806

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a public strict IBKR daily-history API that makes exactly one ADJUSTED_LAST request
  • require a fixed UTC cutoff, explicit duration, exact expected sessions, and fail closed on qualification, request, empty, malformed, duplicate, missing, or unexpected data
  • return sanitized request provenance without bars; retain the existing legacy ADJUSTED_LAST -> TRADES helper unchanged

Bounded slice

The preflight found two separate responsibilities, so the authorized work is frozen as ordered slices:

  1. This PR: strict ADJUSTED_LAST acquisition request contract (shared predecessor)
  2. Sole successor: mandate nonce/replay/atomic single-use/terminal invalidation authority guard

This PR does not implement the successor, a PIT packager, a provider execution path, GCS resources, or any persistence/locking framework.

Tests-first evidence

  • RED: focused collection failed because StrictAdjustedHistoryError and fetch_strict_adjusted_historical_price_candles did not exist
  • GREEN: 15 passed, 4 subtests passed in tests/test_ibkr_market_data.py
  • full suite: 900 passed, 1 skipped, 80 subtests passed
  • Ruff: passed
  • compileall: passed
  • exact three-path scope and dependency-file checks: passed

Authority boundary

  • offline fake adapter tests only; no credential/session/provider/API/data call
  • no real backtest, promotion acceptance, paper/shadow/live, broker/order/capital action
  • no production dependency change

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit d1ce759 into main Aug 5, 2026
1 check passed
@Pigbibi
Pigbibi deleted the codex/qsl-p3-soxl-stage-a-qpk-acquisition-authority-guard-20260806 branch August 5, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant