* fix(core): adopt orphaned orchestrator worktrees (#1641) * fix: address review feedback on worktree adoption - Normalize CRLF line endings in parseWorktreeList for cross-platform support - Collapse duplicate classifySpawnError payload blocks into single condition - Filter prunable/deleted worktree entries in findManagedWorkspace - Add GIT_TIMEOUT to git() helper for all execFileAsync calls - Add tests for prunable entries and CRLF parsing * fix: update test assertions for git() helper timeout All git() calls now pass timeout: GIT_TIMEOUT to execFileAsync. Update toHaveBeenCalledWith assertions to include the new option. postCreate sh -c calls remain unchanged (direct execFileAsync). * fix: mock existsSync in findManagedWorkspace tests The existsSync(entry.path) filter added for prunable worktree detection needs existsSync to return true for valid worktree paths in adoption tests. * fix: use mockReturnValueOnce to prevent existsSync mock leaking vi.clearAllMocks() does not reset mockReturnValue, only mock history. Using mockReturnValueOnce ensures existsSync stubs don't leak to subsequent tests and cause clearStaleWorktreePath to consume git mocks. --------- Co-authored-by: AO Bot <ao-bot@composio.dev> |
||
|---|---|---|
| .. | ||
| api-routes.test.ts | ||
| components.test.tsx | ||
| filesystem-browse-api.test.ts | ||
| get-attention-level.test.ts | ||
| helpers.ts | ||
| orchestrators.test.tsx | ||
| project-detail-route.test.ts | ||
| projects-route.test.ts | ||
| prompt-spawn.test.ts | ||
| server-only-mock.ts | ||
| services.test.ts | ||
| setup.ts | ||