From 51f549caaf5742af8d8e085ccb96c9899577caca Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Thu, 14 May 2026 13:27:12 -0400 Subject: [PATCH] test(codex): align install contracts with no gsd skill copies --- tests/install-minimal-all-runtimes.test.cjs | 10 ++++++++-- ...nstaller-migration-install-integration.test.cjs | 14 +++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tests/install-minimal-all-runtimes.test.cjs b/tests/install-minimal-all-runtimes.test.cjs index 8d109e20b..b3ea99a70 100644 --- a/tests/install-minimal-all-runtimes.test.cjs +++ b/tests/install-minimal-all-runtimes.test.cjs @@ -179,6 +179,12 @@ function expectedSkillSet() { return new Set([...MINIMAL_SKILL_ALLOWLIST]); } +function expectedManifestSkillSet(runtime) { + // Codex no longer materializes gsd-* skill files in minimal mode. + if (runtime === 'codex') return new Set(); + return expectedSkillSet(); +} + describe('install: --minimal honoured for every runtime in --global mode', () => { for (const runtime of SKILL_RUNTIMES) { test(`${runtime} --global --minimal emits exactly the core skill set, zero agents`, () => { @@ -193,7 +199,7 @@ describe('install: --minimal honoured for every runtime in --global mode', () => `${runtime} global manifest.mode should be "minimal"`); assert.deepStrictEqual( [...manifestSkillSet(manifest)].sort(), - [...expectedSkillSet()].sort(), + [...expectedManifestSkillSet(runtime)].sort(), `${runtime} global should record exactly the MINIMAL allowlist in the manifest`, ); assert.strictEqual(manifestAgentCount(manifest), 0, @@ -219,7 +225,7 @@ describe('install: --minimal honoured for every runtime in --local mode', () => `${runtime} local manifest.mode should be "minimal"`); assert.deepStrictEqual( [...manifestSkillSet(manifest)].sort(), - [...expectedSkillSet()].sort(), + [...expectedManifestSkillSet(runtime)].sort(), `${runtime} local should record exactly the MINIMAL allowlist in the manifest (regression guard for #2923)`, ); assert.strictEqual(manifestAgentCount(manifest), 0, diff --git a/tests/installer-migration-install-integration.test.cjs b/tests/installer-migration-install-integration.test.cjs index 1b2565725..f9ca22a72 100644 --- a/tests/installer-migration-install-integration.test.cjs +++ b/tests/installer-migration-install-integration.test.cjs @@ -174,6 +174,14 @@ function assertHasGsdDirectory(root, relPath) { ); } +function assertNoGsdDirectoryEntries(root, relPath) { + assert.equal( + listDirNames(root, relPath).some((name) => name.startsWith('gsd-')), + false, + `${relPath} should not contain generated GSD entries` + ); +} + function assertFreshInstallContract(runtime, targetDir) { const contract = RUNTIME_INSTALL_CONTRACTS[runtime]; assert.ok(contract, `missing runtime install contract for ${runtime}`); @@ -201,7 +209,11 @@ function assertFreshInstallContract(runtime, targetDir) { ); if (contract.surface === 'flat-skills') { - assertHasGsdDirectory(targetDir, 'skills'); + if (runtime === 'codex') { + assertNoGsdDirectoryEntries(targetDir, 'skills'); + } else { + assertHasGsdDirectory(targetDir, 'skills'); + } } else if (contract.surface === 'hermes-skills') { assertHasGsdDirectory(targetDir, path.join('skills', 'gsd')); assert.ok(