2.0 KiB
Prompt
Session-initiating instruction (driving all 7 commits in this series):
ok i want you to become the distributed runtime and concurrency expert for this project - namely acquire a deep understanding of tractor and how it’s used. then i want you to attempt to factor our current brokerd service daemon into 2 daemons: a brokerd which only hosts live/paper trading endpoint tasks [..] a new
datadsubdaemon which in a separate subactor serves all the data feed service tasks [..] give me a mega detailed plan on how to approach this, and a staged approach for the implementation.
Proximate driver for THIS commit: during the approved plan’s stage-0 test gate the agent discovered test subactors were writing into the user’s REAL ~/.config/piker/accounting/ files (a bogus paper fill landed in account.kraken.paper.toml) because the old test-dir override in config.get_app_dir() was commented out and could never work in spawned subactors anyway. Fix applied autonomously under the approved plan; no explicit per-fix user prompt.
Response summary
Restore pytest config-dir isolation by resolving the per-test tmp dir lazily (at conf-path access time) from tractor runtime-vars, which propagate down the actor tree; route all conf-path derivation through config.get_conf_dir() so the override is effective in every (sub)actor.
Files changed
piker/config.py— add_maybe_use_test_dir(); hook inget_conf_dir(); routeget_conf_path()+load()mkdir through itpiker/accounting/_ledger.py— derive ledger dir viaconfig.get_conf_dir()(not the global)piker/accounting/_pos.py— same for account files
Human edits
None — committed as generated.