From 0f165cbed0edb6800a2fc6edda56b1027a11e621 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 11 Jun 2026 20:38:18 -0700 Subject: [PATCH] test: strip ambient Conductor env in memory-cache-injection hook harness Same dev-in-Conductor leak fixed for question-preference-hook: this suite's runHook copies process.env, so running it inside Conductor flipped the defer-path memoryContext assertions into the [conductor] prose deny. Strip CONDUCTOR_* so the cases characterize non-Conductor behavior. (CI is headless, so this only bit local Conductor runs.) Co-Authored-By: Claude Fable 5 --- test/memory-cache-injection.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/memory-cache-injection.test.ts b/test/memory-cache-injection.test.ts index 3330f8d2a..3ab6a2144 100644 --- a/test/memory-cache-injection.test.ts +++ b/test/memory-cache-injection.test.ts @@ -43,6 +43,11 @@ function runHook(stdin: object): { stdout: string; stderr: string; status: numbe env.GSTACK_STATE_ROOT = stateRoot; env.GSTACK_QUESTION_LOG_NO_DERIVE = '1'; delete env.GSTACK_HOME; + // These cases assert the defer-path memoryContext injection. Strip ambient + // Conductor markers so running inside Conductor (CONDUCTOR_WORKSPACE_PATH/PORT + // set) doesn't flip the hook into the [conductor] prose deny instead of defer. + delete env.CONDUCTOR_WORKSPACE_PATH; + delete env.CONDUCTOR_PORT; const res = spawnSync(HOOK, [], { env, input: JSON.stringify({ ...stdin, cwd: fixtureCwd }),