The old (commented-out) `get_app_dir()` override gated on `'pytest' in sys.modules` which can NEVER work in spawned subactors (fresh procs, no pytest import); as a result test `paperboi`/daemon actors were writing into the user's REAL `~/.config/piker/accounting/` files.. friggin yikes. Deats, - add `config._maybe_use_test_dir()` which lazily (at conf-path access time, NOT import time) reads the `piker_test_dir` entry from `tractor.runtime._state._runtime_vars['piker_vars']` as pre-loaded by `open_piker_runtime()` from the `tests.conftest._open_test_pikerd()` overrides. - hook it in `get_conf_dir()` and route `get_conf_path()` + `load()`'s mkdir through `get_conf_dir()`. - route `.accounting._ledger` / `._pos` dir derivation through `config.get_conf_dir()` (was reading the `_config_dir` global directly, bypassing the override); also `mkdir(parents=True, exist_ok=True)` for nested tmp-dir creation. (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/20260610T170859Z_75cefe10_prompt_io.md |
||
|---|---|---|
| .. | ||
| claude | ||