Track Binance invalid-symbol recovery in Taken

Record `piker-binance-invalid-fqme-backpressure` as a bounded
pre-landing follow-up for the Binance series after PR94.

Preserve the observed invalid `.usdm.` then corrected `.usdtm.`
sequence, local relay-send timeout evidence and websocket fixes.
Separate the suspected metadata/history identity mismatch from
a demonstrated root cause; reconnect success alone does not
qualify fresh market-data delivery.

Require same-daemon reproduction, real task/relay ownership
coverage, a baseline-failing regression and human live validation
before landing. Keep execution and verification checkboxes open.

This commit contains only the newly requested task. Older pending
E2E/Polars entries and diagnostic artifacts remain outside it.
No existing task or checkbox acceptance state is changed.

(this patch was generated in some part by `opencode` using
`gpt-6.1-sol` (`openai`))
wkt/federated_project_stores
Gud Boi 2026-10-28 14:52:17 -04:00
parent 687087616e
commit 4c13012e0c
1 changed files with 67 additions and 0 deletions

View File

@ -649,3 +649,70 @@ Return results to source piker, task piker-chart-disconnect-reattach-e2e:
order authorization, linked to the separate native-crash concern. order authorization, linked to the separate native-crash concern.
Use guarded store updates for evidence. Preserve all human-owned task Use guarded store updates for evidence. Preserve all human-owned task
and checkbox states; passing tests and commits are not acceptance. and checkbox states; passing tests and commits are not acceptance.
* TODO Repair Binance invalid-FQME startup and corrected-feed backpressure
:PROPERTIES:
:ID: piker-binance-invalid-fqme-backpressure
:CREATED: [2026-10-28]
:CARRIED: 0
:REPO: /home/goodboy/repos/piker
:CATEGORY: piker.data
:TAKEN_APPEND_OP: piker-binance-invalid-fqme-20261028
:TAKEN_APPEND_REQUEST: 819279545db3aa512eb3238c2450b2b86d6e0cef1e9bc3d09c7d22825470bf8e
:END:
Diagnose and fix the invalid .usdm. -> corrected .usdtm. chart startup
sequence before landing the Binance fix series after PR94.
Next action: reproduce that exact sequence on one persistent daemon
and identify the consumer which stops draining websocket relays.
Context:
The human treats this as lower urgency than the restored valid-symbol
path, but explicitly wants it diagnosed and solved before landing.
Current source: wkt/land_binance_usdm_feed at 7952eb06.
Input: zecusdt.usdm.perp.binance, followed by
zecusdt.usdtm.perp.binance on the same daemon.
The Pong-in-LOCAL_CLOSING reader error is now contained by b95e7c79;
032580bf exposes handshake, ready and first-relay reporting.
7952eb06 distinguishes receive starvation from local forwarding stalls.
Live evidence: brokerd.binance@2029589 reports timeout waiting on
local relay send for the ZEC bookTicker socket, 16s deadline,
count 4, reset after 3. Messages reached the websocket reader; the
local relay did not finish forwarding them. Reconnecting does not
establish resumed data delivery when the consumer remains stalled.
[[file:../../land_binance_usdm_feed/piker/data/_web_bs.py][Websocket relay and reconnect ownership]]
[[file:../../land_binance_usdm_feed/piker/brokers/binance/feed.py][Binance startup and market metadata]]
[[file:../../land_binance_usdm_feed/piker/data/feed.py][Persistent feed allocation and sampling]]
[[https://pikers.dev/pikers/piker/pulls/94][PR94 prerequisite landing]]
Concerns:
get_mkt_info() accepts USDM through its broad usd substring check,
but retains USDM in MktPair; Client.bars() indexes canonical USDTM
pair keys. Quote streaming starts before history/sampler startup.
This is a plausible late-failure path, not proof of orphaned tasks
or the precise cause of the corrected-feed stall.
Execution:
- [ ] Preserve the first invalid-input traceback and actor/task IDs.
- [ ] Reproduce invalid then valid startup in the same daemon; compare
with valid-only cold startup and repeated detach/reattach.
- [ ] Trace ownership of websocket producers, merged relays, backend
quote channels, history tasks and sampler consumers after failure.
- [ ] Add a failing regression at the real lifetime boundary before
changing FQME validation/canonicalization or failed-startup cleanup.
- [ ] Fix the demonstrated cause; do not mask it by increasing buffers,
retrying healthy sockets or suppressing unrelated failures.
Verification:
- [ ] Require fresh parsed quotes and sampler/chart progress after the
corrected request; handshake/ready messages alone are insufficient.
- [ ] Check sibling-feed survival, last-consumer cleanup, repeated
invalid/valid attempts and cancellation during startup/recovery.
- [ ] Run tests/test_websocket.py and tests/test_binance.py, then the
human-operated live invalid/valid chart journey on the saved tip.
Handback:
Return the root failure, exact reproduction, source commits, baseline
and fixed regression results, live recovery evidence and remaining
limitations to this task. Live feeds, broker operations, commits and
task acceptance need their own authorization. Preserve existing states.