From 2dccbefefe03fc063e6ffcd18de07f13c0fadd60 Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 31 Aug 2026 21:01:51 -0700 Subject: [PATCH] Tests: fix pre-existing release-guard staging on the swap branch release.test.mjs was already red on the swap branch: release.mjs imports check-engine-release.mjs and fetch-engine.mjs (the D4 engine release-order guard), which the temp work tree never staged, so every dry run failed to resolve the module instead of exercising the guard. Stage both modules and set IMPECCABLE_SKIP_ENGINE_CHECK=1 so the guard does not probe the network; this suite predates the guard and only covers the version/changelog/artifact checks. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01WaJv2c4oN8wS7Ttq4XRqyx --- tests/release.test.mjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/release.test.mjs b/tests/release.test.mjs index 4cbc3f999..63cdc8d99 100644 --- a/tests/release.test.mjs +++ b/tests/release.test.mjs @@ -49,6 +49,10 @@ function runRelease(cwd, ...args) { cwd, encoding: 'utf-8', timeout: 60000, + // The D4 engine release-order guard would otherwise probe the network for + // published engine assets; these guards predate it and only exercise the + // version/changelog/artifact checks, so take its documented escape hatch. + env: { ...process.env, IMPECCABLE_SKIP_ENGINE_CHECK: '1' }, }); return { code: 0, stdout, stderr: '' }; } catch (err) { @@ -80,6 +84,13 @@ describe('release.mjs guards', () => { fs.mkdirSync(path.join(workDir, 'scripts')); fs.copyFileSync(RELEASE_SCRIPT, path.join(workDir, 'scripts', 'release.mjs')); + // release.mjs imports ./check-engine-release.mjs and ./fetch-engine.mjs + // (and check-engine-release.mjs imports fetch-engine.mjs), so stage them + // too or the dry runs fail to resolve the modules instead of exercising + // the guard. + for (const dep of ['check-engine-release.mjs', 'fetch-engine.mjs']) { + fs.copyFileSync(path.join(REPO_ROOT, 'scripts', dep), path.join(workDir, 'scripts', dep)); + } write('.claude-plugin/plugin.json', JSON.stringify({ name: 'impeccable', version: '1.2.3' })); write('.claude-plugin/marketplace.json', JSON.stringify({ plugins: [{ name: 'impeccable', version: '1.2.3' }] })); write('package.json', JSON.stringify({ name: 'impeccable', version: '9.9.9' }));