Record IB disconnect and logger-routing evidence

Preserve the live REPL observations, callback failure and logger
ancestry in the existing Taken teardown task. Separate the proposed
logger binding from unverified reconnect and resynchronization work.
Leave all task states unchanged.

(this patch was generated in some part by `Codex` using
`GPT-6` (`OpenAI`))
wkt/federated_project_stores
Gud Boi 2026-11-10 19:06:05 -05:00
parent eca2c481d7
commit 5e03f25e99
1 changed files with 57 additions and 0 deletions

View File

@ -828,6 +828,63 @@ idle peer EOF, debugger, multi-consumer and SHM-owner cleanup concerns.
Return a scoped cause/fix/regression report here and coordinate the Return a scoped cause/fix/regression report here and coordinate the
independent native crash with =piker-qt6-chart-teardown-sigsegv=. independent native crash with =piker-qt6-chart-teardown-sigsegv=.
**** IB disconnect and logger evidence, 2026-11-10
Human runtime observation at 15:30: both =datad.ib= and =brokerd.ib=
reported peer closure. Gateway appeared healthy afterward; neither
its restarting nor successful subscription recovery is established.
Runtime paths were =wkts/history_segment_refill= for Piker and
=../tractor/wkts/ipc_fault_regressions= for Tractor. This evidence is
from the in-use runtime, not the rebased landing candidates.
PDB in =relay_client_proxy_messages()= at =api.py:2050= confirmed:
- =msg= was =('disconnected', ConnectionError('Peer closed connection.'))=.
- =proxy._aio_ns.ib.client.clientId= was =6132=.
- =proxy._aio_ns.ib.isConnected()= was =False=.
The existing =efa72980f8e54bd233b1632480d921f236451d8b= change,
"Raise on IB socket disconnects in proxy and trades", already makes
socket disconnects fail explicitly. The trade receiver separately
raised =ConnectionError('IB trade-event socket disconnected')=.
The proxy relay still has a reconnect TODO; suppressing these errors
would not restore subscriptions.
Several =TrioTaskExited= owner-exit signals received asyncio cleanup
acknowledgements. However, =signal_trio_when_done()= also raised the
trade ConnectionError from its asyncio completion callback, and debug
requests overlapped with "Local task already has active debug request".
This supports a callback/debugger teardown regression investigation;
it does not establish that every pending task leaked.
***** Logger routing
PDB showed =piker.ib_async.client= with no handlers and propagation
enabled. Its ancestors =piker.ib_async=, =piker= and the root logger
also had no handlers. =piker.brokers.ib= had a =StreamHandler= at
level 0 with propagation enabled, but is outside that ancestry.
This explains why the client ERROR can reach logging's fallback
handler as a bare "Peer closed connection." line. The later formatted
per-proxy warnings are a separate relay path.
Proposed, not applied: in =NonShittyIB.__init__()=, bind the client's
logger through =get_logger(name=f'{__name__}.client')= so its name is
=piker.brokers.ib.api.client= and reaches the backend handler.
Verify actor-aware formatting and duplicate emission behavior; avoid
adding a global root handler merely to cover this namespace mismatch.
This formatting correction alone will not deduplicate proxy relays.
***** Next execution and handback
Reproduce authoritative socket EOF with a local/fake IB bridge and
check callback exception handling, debugger ownership, bounded owner
cleanup and sibling-consumer continuity. Keep the logger correction
separately reviewable from reconnect behavior. Subscription and account
resynchronization remain prerequisites for automatic recovery; never
blindly replay orders. Return the reproducer, exact runtime revisions,
scoped patch and regression results to this task before commit-planning
an implementation. The evidence addition itself is ready for a scoped
commit plan; task acceptance markers remain human-owned.
*** Chart lifecycle, E2E and order-bootstrap ownership *** Chart lifecycle, E2E and order-bootstrap ownership
:PROPERTIES: :PROPERTIES:
:ID: piker-workstream-chart-lifecycle :ID: piker-workstream-chart-lifecycle