I Stopped Testing APX in the Wrong Checkout
Описание и применение
Проверка кода APX в worktree может вводить в заблуждение, поскольку демона запускается из основной ветки. Проверка, откуда запущен демона, перезапуск из основной ветки, проверка состояния и последующее тестирование реального пути устраняют ложные отрицательные результаты.
Задача
Testing APX changes in a worktree can lead to false negatives because the daemon runs from the main checkout, not the worktree, causing developers to waste time debugging stale code.
Результат
By ensuring the daemon runs from the main checkout and verifying a fresh restart, developers avoid false negatives and reduce debugging time.
Рабочий процесс
- Patch code in a worktree
- Run unit tests in the worktree
- Check which checkout the daemon is running from using
ps -o command -p $(pgrep -f 'src/host/daemon/index.js' | head -1) - Restart the daemon from the main checkout with
apx restart - Verify the restart with
curl -s 127.0.0.1:7430/api/healthandapx daemon logs --tail 30 - Exercise the real code path (e.g.,
apx exec, API call, or UI interaction)
Доказательства
The daemon is the product. The CLI, the web panel, Telegram, and the other surfaces all talk to that one long-running process.
Restarting from the wrong directory is how I end up testing stale code while feeling productive.
Only after that do I exercise the real path I changed.
- Дата записи: 2026-09-14T11:45:21.264Z