piker/ai/prompt-io/opencode/20260903T192742Z_aadfd1cf_p...

52 lines
1.9 KiB
Markdown
Raw Normal View History

---
model: openai/gpt-5.6-sol
service: opencode
session: 8737d0a9-98da-4fa1-ba35-ca8a3a42bbc9
timestamp: 2026-09-03T19:27:42Z
git_ref: wkt/replay_provider_e2e
scope: code
substantive: true
raw_file: 20260903T192742Z_aadfd1cf_prompt_io.raw.md
---
## 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.