piker/piker
Gud Boi ff136ecb84 Reuse persistent feeds by resolved market endpoint
A chart could open a dated IB future through search, detach, then
request its continuous alias against the same datad. Lookup by the
request spelling missed the existing feed and tried to allocate a
second history writer on its SHM. Failed startup could leave the
quote producer running without a sampler to drain its channel.

Resolve metadata before allocation and key `_FeedsBus.feeds` only
by canonical, broker-qualified FQME. Recheck under the allocation
lock and return the existing `Flume` without starting another
producer. Require `get_mkt_info()` rather than trying provisional
quote subscriptions to discover endpoint identity.

Split the decision/lifetime from allocation:
- `maybe_allocate_persistent_feed()` resolves/reuses, or opens a
  feed-local `trio` nursery for a new endpoint;
- `allocate_persistent_feed()` starts quote/history children and
  returns the descriptor, writable buffers and sampling inputs;
- the `maybe_` parent publishes and starts back the `Flume`, then
  handles readiness, buffer seeding and the blocking sampler call;
- cancel/join the local children when that operating body exits,
  including normal sampler return and failed history startup.

Preserve startup ordering, explain task/scope ownership, qualify
request-name logging and configure the shared data logger itself.
This is lifetime cleanup, not independent restart supervision.

Human verified the alias reopen fix and found full Binance boots
with/without the patch felt comparable on AC; no latency benchmark
or startup-speedup claim is implied. Regression suites are retained
for a separate test commit.

(this patch was generated in some part by `opencode` using
`openai/gpt-6-astra` (`openai`))
2026-11-01 18:15:46 -05:00
..
accounting .clearing: lazily spawn `brokerd` from `emsd` 2026-06-10 13:12:59 -04:00
brokers Fix IB metadata lookup without a supplied proxy 2026-10-31 19:49:25 -04:00
clearing Preserve IB order state through notices and late fills 2026-10-30 18:50:06 -04:00
cli brokerd: slim RPC caps + `ib` client-id offset 2026-06-10 13:14:24 -04:00
data Reuse persistent feeds by resolved market endpoint 2026-11-01 18:15:46 -05:00
fsp Clamp negative provider volume before FSP updates 2026-09-15 12:47:07 -04:00
service Fix package logger names for daemon startup 2026-10-21 16:07:53 -04:00
storage Own gap overlays in chart-local `GapOverlayMngr` 2026-08-14 19:03:11 -04:00
testing Pass a config `tmp_dir: Path` to the runtime when testing 2023-03-09 15:37:43 -05:00
toolz Delegate `.toolz.open_crash_handler()` to `tractor.devx` 2024-01-16 10:26:38 -05:00
tsp Retry incomplete IB schedule coverage 2026-09-24 20:20:20 -04:00
ui Adjust to `trio>=0.34.0` invalid `Event` truthy checks 2026-10-30 15:33:39 -04:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Start `piker.service` sub-package 2023-03-09 15:37:42 -05:00
_cacheables.py Move `._cacheables.open_cached_client()` into `.brokers` pkg mod 2023-06-27 13:41:47 -04:00
calc.py Retry incomplete IB schedule coverage 2026-09-24 20:20:20 -04:00
config.py Fix `pytest` config-dir isolation in subactors 2026-06-10 13:10:09 -04:00
log.py Fix package logger names for daemon startup 2026-10-21 16:07:53 -04:00
types.py Point `.types.Struct` to `tractor.msg.pretty_struct` 2026-02-22 16:07:53 -05:00