piker/ai/prompt-io/claude/20260610T171259Z_59d5d9a6_p...

49 lines
1.5 KiB
Markdown
Raw Normal View History

.data: cut feed layer over to `datad` actors The topology flip: all data-feed consumers now route to the new `datad.<broker>` sibling daemon; `brokerd` becomes trading-only and is ONLY ever booted lazily by `emsd`'s `open_brokerd_dialog()` (see prior commit). Chart-only and paper sessions run with zero (live, credentialed) `brokerd` procs B) Deats, - `open_feed()` -> `maybe_spawn_datad()` (NB: imported relative-direct from `._daemon` to dodge a partial-init cycle via `piker.service`); flip the `open_feed_bus()` actor-name assert to `'datad'`; comment sweep. - slim `_setup_persistent_brokerd()` to a trading-only fixture: console logging + pinned-open ctx; the feed-bus alloc moves to `_setup_persistent_datad()` and backend `open_trade_dialog()` ctxs own their own task trees. (the `piker ledger` ad-hoc actor enters this same slimmed fixture - exactly what it needs.) - repoint data-flavoured spawn sites to `maybe_spawn_datad`: `.ui._app` symbol-search (+ rename `install_brokerd_search` -> `install_datad_search`), `.brokers.core.symbol_search()`, `.brokers.cli` `brokercheck`/`record`, legacy kivy `.ui.cli` + `option_chain`'s `wait_for_actor()`. - invert `tests.test_services` expectations: feed/EMS-paper flows must spawn `datad.kraken` and `paperboi.kraken` with an explicit negative assert that NO `brokerd.kraken` service task exists. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Prompt-IO: ai/prompt-io/claude/20260610T171259Z_59d5d9a6_prompt_io.md
2026-06-10 17:13:44 +00:00
---
model: claude-fable-5[1m]
service: claude
session: 32d15f9a-b2d3-4c26-bdc9-190219141a25
timestamp: 2026-06-10T17:12:59Z
git_ref: datad_service
diff_cmd: git log -1 -p --follow -- ai/prompt-io/claude/20260610T171259Z_59d5d9a6_prompt_io.md
scope: code
substantive: true
raw_file: 20260610T171259Z_59d5d9a6_prompt_io.raw.md
---
## Prompt
Same session-initiating `brokerd`-split instruction (see
`20260610T170859Z_75cefe10_prompt_io.md`); this is the
approved plan's "stage 3": the feed-layer hard cutover
(user-decided: no dual-mode runtime flag, each stage
lands fully working).
## Response summary
The topology flip: all data-feed consumers route to
`datad.<broker>`; the `brokerd` lifetime fixture slims
to trading-only; UI/CLI data-flavoured spawn sites
repointed; test expectations inverted incl. an explicit
negative assert that paper sessions spawn NO
`brokerd.<broker>`.
## Files changed
- `piker/data/feed.py``open_feed()` ->
`maybe_spawn_datad()`; `open_feed_bus()` actor-name
assert -> `'datad'`; `install_brokerd_search` ->
`install_datad_search`; comment sweep
- `piker/brokers/_daemon.py`
`_setup_persistent_brokerd()` slimmed (feed-bus
alloc moved to the datad fixture)
- `piker/ui/_app.py`, `piker/ui/cli.py`,
`piker/brokers/core.py`, `piker/brokers/cli.py`,
`piker/ui/kivy/option_chain.py` — spawn-site
repoints
- `tests/test_services.py` — datad assertions + the
no-`brokerd.kraken` negative check
## Human edits
None — committed as generated.