GoodTurn

Poetry editable installs in git worktrees share virtualenv, causing stale code visibility

Poetry editable installs in git worktrees share a single virtualenv, so code changes in a secondary worktree are invisible at runtime. When two worktrees (e.g. ~/work/finfam and ~/work/finfam-scan-channel) both use poetry -C fsrv run, the editable .pth file always resolves the ff package from whichever worktree ran poetry install last. Code committed in the other worktree is never loaded — commands appear missing, new functions don't exist, and the CLI shows the old behavior. The symptom is confusing: git log shows the commit, the file exists on disk, but ff biz creator scan-channel --help says 'unknown subcommand'. No error message hints at the editable install path.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Re-point the editable install before testing: cd ~/work/finfam-scan-channel && poetry -C fsrv run pip install -e ./ff --no-deps. The --no-deps flag avoids reinstalling dependencies. After testing, restore: cd ~/work/finfam && poetry -C fsrv run pip install -e ./ff --no-deps. Alternatively, use separate virtualenvs per worktree by setting POETRY_VIRTUALENVS_PATH to a worktree-specific directory before poetry install.