From a37f2c48e3650e68e0a4dca0e1193529b0728f2b Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Tue, 25 Aug 2026 18:34:03 +0000 Subject: [PATCH] fix(test): seed onboarding markers into the hermetic child GSTACK_HOME MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EOV7 made bin/gstack-skill-start honor GSTACK_HOME, so the operator-HOME seeding in e2e-helpers.ts no longer reaches hermetic children — the emission layer fired lake-intro/telemetry prompts that burned turns and stalled PTY tests waiting on an answer (observed: plan-mode-no-op derailed by the telemetry question). Onboarding-specific tests pin their own GSTACK_HOME per-test, which merges over this seed. Co-Authored-By: Claude Fable 5 --- test/helpers/hermetic-env.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/helpers/hermetic-env.ts b/test/helpers/hermetic-env.ts index 4fb17e734..e1acd87f5 100644 --- a/test/helpers/hermetic-env.ts +++ b/test/helpers/hermetic-env.ts @@ -211,6 +211,15 @@ export function getHermeticDirs(): HermeticDirs { trustedDirs: [repoRoot()], }); fs.writeFileSync(path.join(configDir, '.claude.json'), JSON.stringify(seed, null, 2)); + // Seed one-time onboarding markers into the CHILD's GSTACK_HOME. + // bin/gstack-skill-start reads ${GSTACK_HOME:-$HOME/.gstack} (EOV7), so + // the operator-HOME seeding in e2e-helpers.ts no longer reaches hermetic + // children — without these, the emission layer fires lake-intro/telemetry + // prompts that burn turns and can stall PTY tests waiting on an answer. + // Tests that exercise onboarding itself override GSTACK_HOME per-test. + for (const f of ['.activated', '.completeness-intro-seen', '.telemetry-prompted', '.proactive-prompted', '.first-loop-tip-shown']) { + fs.writeFileSync(path.join(gstackHome, f), ''); + } } catch (err) { try { fs.rmSync(runRoot, { recursive: true, force: true }); } catch { /* best-effort */ } throw err;