1.5 KiB
Prompt
Same session-initiating brokerd-split instruction (see 20260610T170859Z_75cefe10_prompt_io.md); this is the approved plan’s “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 emsd’s 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.py—open_brokerd_dialog()re-sig + inneracquire_live_portal();Router.maybe_open_brokerd_dialog()dropsportalparam;open_trade_relays()drops thefeed.portalslookuppiker/accounting/cli.py— keyword-formportal=override kept for thepiker ledgerad-hoc actor
Human edits
None — committed as generated.