diff --git a/v3/@claude-flow/cli/__tests__/doctor-memory-driver-3321.test.ts b/v3/@claude-flow/cli/__tests__/doctor-memory-driver-3321.test.ts index 0f1250e41c..36c4c95d43 100644 --- a/v3/@claude-flow/cli/__tests__/doctor-memory-driver-3321.test.ts +++ b/v3/@claude-flow/cli/__tests__/doctor-memory-driver-3321.test.ts @@ -13,6 +13,10 @@ let workdir: string; let dbPath: string; async function runDoctor() { + // Full-suite isolation (#4643): this worker may already have imported + // doctor.ts before the current test registered its vi.doMock. Re-import a + // fresh module so the mock applies to its Memory Integrity check. + vi.resetModules(); const { doctorCommand } = await import('../src/commands/doctor.js'); const result = await doctorCommand.action!({ flags: { component: 'memory' }, args: [], config: {},