mirror of https://github.com/garrytan/gstack.git
test: harden question-preference-hook harness against ambient Conductor env
runHook copied all of process.env into the hook subprocess, so running the suite inside Conductor (CONDUCTOR_WORKSPACE_PATH/PORT set) would leak those markers. Strip them so the existing cases deterministically characterize NON-Conductor behavior before the Conductor branch lands. Baseline: 15 pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
f5f7e32505
commit
ba640b2fb5
|
|
@ -72,6 +72,12 @@ function runHook(stdin: object, cwd?: string): {
|
|||
}
|
||||
env.GSTACK_STATE_ROOT = stateRoot;
|
||||
delete env.GSTACK_HOME;
|
||||
// Strip ambient Conductor markers so these cases characterize NON-Conductor
|
||||
// behavior deterministically — otherwise running the suite inside Conductor
|
||||
// (CONDUCTOR_WORKSPACE_PATH/PORT set) would flip every defer into the
|
||||
// [conductor] prose deny. The Conductor cases below opt back in explicitly.
|
||||
delete env.CONDUCTOR_WORKSPACE_PATH;
|
||||
delete env.CONDUCTOR_PORT;
|
||||
env.GSTACK_QUESTION_LOG_NO_DERIVE = '1';
|
||||
const res = spawnSync(HOOK, [], {
|
||||
env,
|
||||
|
|
|
|||
Loading…
Reference in New Issue