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

1.5 KiB
Raw Blame History

Prompt

Same session-initiating brokerd-split instruction (see 20260610T170859Z_75cefe10_prompt_io.md); this is the approved plans “stage 2”: decouple the clearing layer from feed.portals BEFORE the feed cutover so live trading works at every stage boundary. User-decided constraint applied: post-split brokerd is trading-only and spawned LAZILY only by emsds open_brokerd_dialog() path.

Response summary

Kill the single coupling forcing feed + trading eps into one actor (Router.open_trade_relays() pulling its trades portal from feed.portals[brokermod]): open_brokerd_dialog() now (maybe) spawns/finds brokerd.<broker> itself and ONLY when a live trades-ep will actually open; paper mode never touches it. Pre-cutover this is a pure refactor (registry lookup finds the same feed-spawned daemon).

Files changed

  • piker/clearing/_ems.pyopen_brokerd_dialog() re-sig + inner acquire_live_portal(); Router.maybe_open_brokerd_dialog() drops portal param; open_trade_relays() drops the feed.portals lookup
  • piker/accounting/cli.py — keyword-form portal= override kept for the piker ledger ad-hoc actor

Human edits

None — committed as generated.