Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: source-config-secret-surfaces resets the CLI exit verdict it leaves behind

garrytan881ad316863a
diff --git a/test/source-config-secret-surfaces.test.ts b/test/source-config-secret-surfaces.test.ts
index 5be7db4e4f..ce0d1d8ca9 100644
--- a/test/source-config-secret-surfaces.test.ts
+++ b/test/source-config-secret-surfaces.test.ts
@@ -24,6 +24,7 @@ import { runSources } from '../src/commands/sources.ts';
import { runCall } from '../src/commands/call.ts';
import { runDoctor } from '../src/commands/doctor.ts';
import { setCliOptions } from '../src/core/cli-options.ts';
+import { _resetCliExitVerdictForTests } from '../src/core/cli-force-exit.ts';
import { registerLocalWriter } from '../src/core/persistence/identity.ts';
import { claimWorktree } from '../src/core/persistence/ownership.ts';
import { runManagedSourceLifecycle } from '../src/core/persistence/source-lifecycle.ts';
@@ -46,6 +47,8 @@ beforeAll(async () => {
}, 60_000);
afterAll(async () => {
+ // runDoctor records a process-wide CLI exit verdict; later files in the same process must start clean.
+ _resetCliExitVerdictForTests();
await disposePersistenceConsumer(engine);
await engine.disconnect();
});