Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test(dream-retriage): reset the CLI exit verdict after each test so a consent refusal (exit 3) never leaks into later files in the same process
garrytan26ecbb63a369
diff --git a/test/dream-retriage.test.ts b/test/dream-retriage.test.tsindex 68a8334d56..5fdf7562a2 100644--- a/test/dream-retriage.test.ts+++ b/test/dream-retriage.test.ts@@ -18,6 +18,7 @@ import { PGLiteEngine } from '../src/core/pglite-engine.ts';import { resetPgliteState } from './helpers/reset-pglite.ts';import { withEnv } from './helpers/with-env.ts';import { runDreamRetriage } from '../src/commands/dream-retriage.ts';+import { _resetCliExitVerdictForTests } from '../src/core/cli-force-exit.ts';import { runDream } from '../src/commands/dream.ts';import { TRIAGE_VERSION, CHARS_PER_TOKEN } from '../src/core/cycle/synthesize.ts';import { canonicalLookup } from '../src/core/model-pricing.ts';@@ -143,6 +144,7 @@ async function withoutAnthropicKey<T>(body: () => Promise<T>): Promise<T> {afterEach(() => {process.exitCode = 0;+ _resetCliExitVerdictForTests();});describe('dream retriage — dispatch + usage', () => {