I Stopped Testing APX in the Wrong Checkout
说明与用途
在工作树中测试 APX 更改可能导致误判,因为守护进程从主检出运行。验证守护进程的检出、从主检出重启、检查健康和日志,然后执行真实路径可消除陈旧代码问题。
问题
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