Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: isolate cleanup tests from detached repository audits

[._.]/ Adam Eivy0d92ba9ef6f6
diff --git a/server/services/cleanupAgentWorktree.test.js b/server/services/cleanupAgentWorktree.test.js
index 3c9c52c8b6..d2b6648d96 100644
--- a/server/services/cleanupAgentWorktree.test.js
+++ b/server/services/cleanupAgentWorktree.test.js
@@ -2,11 +2,15 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
// --- Mock every dependency agentWorktreeCleanup.js pulls in transitively ---
+// Cleanup launches this audit without awaiting it. Its own suite covers the
+// probes; keep its daemon/provider graph out of these cleanup workflow tests.
+vi.mock('./agentRepoStateVerification.js', () => ({
+ verifyAgentRepoState: vi.fn().mockResolvedValue(undefined)
+}));
+
vi.mock('../lib/childProcess.js', () => ({
spawn: vi.fn(),
execSync: vi.fn(),
- // codeReview also reaches memoryStats through the local daemon managers.
- exec: vi.fn(),
// `execFile` is pulled in transitively by codeReview.js → lmStudioManager
// (via `resolveReviewLoopOptions`'s dependency graph), even though this
// test never exercises it directly.