piker/ai/prompt-io/opencode/20261028T165638Z_b95e7c79_r...

71 lines
2.8 KiB
Markdown

---
created_at: 2026-10-28T16:56:38Z
generated_by:
harness: opencode
provider: openai
model: openai/gpt-6.1-sol
git_ref: b95e7c79
scope: code
substantive: true
raw_file: 20261028T165638Z_b95e7c79_reconnect_logging.raw.md
---
## Prompt
The human reported that the live Binance Pong-in-LOCAL_CLOSING
error now logged a retry without crashing. They requested visible
re-establishment reporting under `pikerd -l info --pdb`, and asked
to check for existing downstream work before adding a fix.
## Response summary
The existing `Connection success` INFO message already identifies
handshake completion. Feed startup configured piker.data.feed,
while shared websocket diagnostics use ._util.log on piker.data.
Configure that actual emitter and prefer the daemon's verbosity
over a quieter client request for these shared transport tasks.
Add a readiness INFO message after fixture setup and a first-message
INFO report once per connection after actual relay. Include the URL
in the receive-timeout reset error. Do not call first raw websocket
traffic a parsed quote or proof of restored market-data freshness.
## Existing-work audit
Compared `_web_bs.py`, `_util.py`, `piker.log` and daemon logging
against the evaluated downstream tip and relevant all-ref histories.
`54da2973` contains logging/type cleanup, not this emitter fix.
`5adf77a9` / landing equivalents address package-name correctness,
but not configuration of the shared data emitter at feed startup.
All-ref searches for this actual emitter/readiness/first-relay
implementation found no existing commit. The dirty IB history
worktree has only an unrelated f-string correction in `_web_bs.py`;
the TIPC worktree has no dirty delta in these two feed/websocket
files. No downstream work was overwritten or imported wholesale.
## Files changed
- `piker/data/feed.py`: shared transport logger startup/verbosity.
- `piker/data/_web_bs.py`: readiness, first-relay and timeout URL.
- `tests/test_logging.py`: actual emitter/console startup regression.
- `tests/test_websocket.py`: recovery milestones on real loopback.
- This prompt provenance pair.
## Verification
The new logging regression against original b95e7c79 source fails:
the actual websocket emitter remains at WARNING and rejects INFO.
It passes with the logger wiring fix. Provider lookup is stopped
before network work, while logger factories and console emission
are real. Global logger state is restored after the check.
18 cases pass across tests/test_logging.py, tests/test_websocket.py
and tests/test_binance.py. git diff --check passes. Live verification
after restarting the daemon with these edits remains human-owned.
## Human edits
No direct manual source edits observed. The human supplied live
recovery evidence, selected INFO verbosity, requested downstream
reuse inspection, and retains live-test and commit ownership.