piker/ai/prompt-io/opencode/20260826T222600Z_5f631e19_p...

47 lines
1.7 KiB
Markdown
Raw Normal View History

---
model: openai/gpt-5.6-sol
service: opencode
session: unavailable
timestamp: 2026-08-26T22:26:00Z
git_ref: 5f631e19
scope: code
substantive: true
raw_file: 20260826T222600Z_5f631e19_prompt_io.raw.md
---
## Prompt
Diagnose and fix the hanging Binance USD-M perpetual feed for
`NVDAUSDT.USDTM.PERP.BINANCE` by comparing piker with Binance's current
API and changelog. Ensure unsupported or silent websocket feeds fail
loudly into `datad` and chart consumers instead of blocking startup.
## Response summary
Migrates Binance USD-M market data from the retired legacy websocket to
the split public and market routes, handles Binance's new aggregate-trade
schema, and introduces bounded connection and first-data startup. Direct
stream URLs avoid reconnect-time subscription-ACK races, while targeted
tests preserve routing and fail-loud behavior.
## Files changed
- `piker/brokers/binance/feed.py` - route, merge, normalize, and bound
Binance quote streams.
- `piker/brokers/binance/venues.py` - define current USD-M websocket
endpoints.
- `piker/data/_web_bs.py` - support bounded websocket context startup.
- `tests/test_binance.py` - cover routes, schemas, and startup failures.
- `ai/prompt-io/opencode/20260826T222600Z_5f631e19_prompt_io.raw.md` -
retain the generated-output record.
- `ai/prompt-io/opencode/20260826T222600Z_5f631e19_prompt_io.md` - record
structured provenance for the code changes.
## Human edits
The human explicitly required fail-loud behavior rather than merely
updating the endpoint, and supplied a direct CLI reproduction proving
both `datad.binance` and the chart caller blocked. Those requirements
drove the connection and first-data deadlines and their regressions. The
changes remain uncommitted for human review.