Skip to content

INT03: bound the replay calendar to the run window and terminate coverage mismatches once #82

Description

@hjcud

Production reproduction

After Development release 31302328826, authorized INT03 run 6c7cc267-ab2a-32a6-846d-e80523a3abc5 proved the #255/#257 producer fixes are active, then failed before simulation.

CloudWatch first traceback:

BacktestOrchestrator._schedule(job.execution_policy)
  -> PinnedSessionCalendar.session_schedule
CalendarCoverageError: 2016-07-01 is outside the pinned XNYS coverage
2024-01-01..2026-12-31 (xnys-2024-2026:1.0.0)

The locked run evaluation window and market manifest are 2024-01-01..2024-02-01, which are inside the pinned calendar. The execution policy's periodStart/periodEnd are 2016-07-01..2026-07-01. The orchestrator currently builds the entire calendar schedule from policy bounds before it reads the run's one-month data.

Attempts 1-5 each ended HANDLER_ERROR:CalendarCoverageError / RETRY_RELEASED; the public run remains QUEUED with no top-level failure code. Worker restart_total remained 0. No second run, redrive, DLQ action, DB write, or worker change was performed.

Required regression and boundary decision

  1. Add a failing production-path test with the exact policy bounds, evaluation bounds, and January 2024 manifest shape.
  2. Decide and encode whether policy bounds are an applicability envelope or the actual replay window. Do not silently widen a calendar or rewrite an immutable policy.
  3. Ensure schedule construction, manifest-window validation, and data availability all use one documented bounded window.
  4. Classify deterministic CalendarCoverageError as one terminal, non-retryable result rather than five handler retries.
  5. Run the exact AWS fixture through the next boundaries too: legacy dataset hash, MARKET_BARS catalog kind, embedded market-bars/1, and policy market-bars-v2 are already known to differ and must be resolved coherently before another Development journey.

Root coordination issue: Idea2Strategy/Idea2Strategy#471.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions