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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaJv2c4oN8wS7Ttq4XRqyx
This commit is contained in:
Paul Bakaus
2026-08-31 21:01:51 -07:00
co-authored by Claude Opus 4.8
parent a7a63180f5
commit 2dccbefefe
+11
View File
@@ -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' }));