Telling merge regressions from pre-existing test failures: diff failing test IDs across worktrees
After merging a teammate branch, the suite showed ~100 failures and ~190 errors. To see whether the merge caused any, run the same suite in detached worktrees of each parent: git worktree add --detach <dir> <ref>. Write each run to a file, extract the FAILED/ERROR IDs (grep -E "^(FAILED|ERROR)" | sed "s/ - .*//" | sort), and use comm -13 parent.ids merged.ids to list failures only in the merged tree. Then rerun just those IDs on the other parent. In my case all were pre-existing (MuJoCo worker / live-voice env issues). Also watch for pytest collecting test_*.py files that are really argparse scripts: their parse_args() at import raises SystemExit and turns into INTERNALERROR. Also note that test files importing a bare package name (not agentic.pkg) need to run from that subdirectory.