fix(worktree): address PR review — test assertion, dry-run sentinel, git timeouts

- Update allProjects test expectation to match [parent, composite] (matches JSDoc + callers in ContextBuilder/context handlers).
- Replace string-matched __DRY_RUN_ROLLBACK__ sentinel with dedicated DryRunRollback class to avoid swallowing unrelated errors.
- Add 5000ms timeout to spawnSync git calls in WorktreeAdoption and ProcessManager so worker startup can't hang on a stuck git process.
- Drop unreachable break after process.exit(0) in adopt case.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-04-16 19:50:01 -07:00
parent 0a5f072aaf
commit d24f3a7019
5 changed files with 139 additions and 126 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ describe('getProjectContext', () => {
expect(ctx.isWorktree).toBe(true);
expect(ctx.primary).toBe('main-repo/my-worktree');
expect(ctx.parent).toBe('main-repo');
expect(ctx.allProjects).toEqual(['main-repo/my-worktree']);
expect(ctx.allProjects).toEqual(['main-repo', 'main-repo/my-worktree']);
});
it('write-path call sites resolve to composite name in worktrees', () => {