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

2.0 KiB
Raw Blame History

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 its 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 datad subdaemon 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 plans stage-0 test gate the agent discovered test subactors were writing into the users 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 in get_conf_dir(); route get_conf_path() + load() mkdir through it
  • piker/accounting/_ledger.py — derive ledger dir via config.get_conf_dir() (not the global)
  • piker/accounting/_pos.py — same for account files

Human edits

None — committed as generated.