test(codex): align install contracts with no gsd skill copies

This commit is contained in:
Tom Boucher
2026-05-14 13:27:12 -04:00
parent 1d6284a718
commit 51f549caaf
2 changed files with 21 additions and 3 deletions

View File

@@ -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(