test: hermetic update-check, onboarding gate sequencing, seeding parity

The contract test's child did a live git ls-remote + curl to github.com on
every bun run test (update_check config now gates it off); the headless
test gets a fresh GSTACK_HOME so the suppression is actually exercised; a
new OV6 test drives the script three times to pin ack-at-emit and gate
sequencing; hermetic seeding covers the config-keyed privacy gate; the
EVALS_HERMETIC=0 debug seeding reaches marker parity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-25 20:50:15 +00:00
co-authored by Claude Fable 5
parent 6161b8ae1e
commit 4f432f521c
3 changed files with 75 additions and 11 deletions
+6 -1
View File
@@ -267,10 +267,15 @@ export async function finalizeEvalCollector(evalCollector: EvalCollector | null)
// Pre-seed preamble state files so E2E tests don't waste turns on lake intro + telemetry prompts.
// These are one-time interactive prompts that burn 3-7 turns per test if not pre-seeded.
// NOTE: since gstack-skill-start honors GSTACK_HOME (EOV7), hermetic children read the
// temp GSTACK_HOME that hermetic-env.ts seeds (the canonical marker list lives there);
// this operator-HOME seeding only serves EVALS_HERMETIC=0 debug runs.
if (evalsEnabled) {
const gstackDir = path.join(os.homedir(), '.gstack');
fs.mkdirSync(gstackDir, { recursive: true });
for (const f of ['.completeness-intro-seen', '.telemetry-prompted', '.proactive-prompted']) {
// Marker list kept at parity with hermetic-env.ts's child-GSTACK_HOME seed
// (the canonical set for the emission layer's gates).
for (const f of ['.activated', '.completeness-intro-seen', '.telemetry-prompted', '.proactive-prompted', '.first-loop-tip-shown']) {
const p = path.join(gstackDir, f);
if (!fs.existsSync(p)) fs.writeFileSync(p, '');
}
+4
View File
@@ -220,6 +220,10 @@ export function getHermeticDirs(): HermeticDirs {
for (const f of ['.activated', '.completeness-intro-seen', '.telemetry-prompted', '.proactive-prompted', '.first-loop-tip-shown']) {
fs.writeFileSync(path.join(gstackHome, f), '');
}
// The privacy stop-gate is config-keyed, not marker-keyed: on machines
// with gbrain installed it fires whenever artifacts_sync_mode is off and
// the consent prompt is unrecorded — same PTY-stall class as the markers.
fs.writeFileSync(path.join(gstackHome, 'config.yaml'), 'artifacts_sync_mode_prompted: true\n');
} catch (err) {
try { fs.rmSync(runRoot, { recursive: true, force: true }); } catch { /* best-effort */ }
throw err;