1.9 KiB
Prompt
Continue Phase 2 of the human-facing E2E plan by implementing a protocol-faithful offline replay provider. Use normal backend discovery, datad, history, quote, search, and typed Tractor control contracts with versioned fixtures, deterministic ordering, no network, no positive sleeps, and no log parsing.
During review, explain the provider’s purpose and placement, evaluate a general package-entry-point backend mechanism, then park replay when the human prioritizes real-backend chart E2E instead.
Response summary
Adds a versioned offline market-data provider implementing normal Piker backend endpoint shapes. Typed control commands advance, pause, resume, snapshot, and inject declared failures while preserving deterministic transcripts. Focused tests validate fixture symbology and finite, repeatable OHLCV history behavior.
Files changed
piker/brokers/replay.py- implement replay scenario, provider, and control protocol machinery.tests/_inputs/replay/basic-v1.json- provide deterministic history and quote input.tests/_inputs/replay/failure-v1.json- provide an acknowledged fault point.tests/replay/test_contract.py- validate scenario and history contracts.
Human edits
The human challenged the original replay-first premise, questioned why test machinery lived beside production backends, proposed dynamic registration, and selected standard package entry points as the future direction for external backend support. The human directly added a source note questioning replay placement, then explicitly placed replay on hold and requested that the completed experiment be committed only as parked work with plugin migration recorded for possible resumption.