* fix(#2777): remove stale codex local home metadata * chore(#2777): add changeset for codex local layout metadata --------- Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
This commit is contained in:
@@ -3720,6 +3720,26 @@ describe('ADR-1016 phase 5a: validateArtifactLayout unit tests', () => {
|
||||
});
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('#2777: home override is accepted globally and rejected locally', () => {
|
||||
const entry = {
|
||||
kind: 'skills',
|
||||
destSubpath: 'skills',
|
||||
prefix: 'gsd-',
|
||||
nesting: 'flat',
|
||||
recursive: false,
|
||||
converter: null,
|
||||
home: '.agents',
|
||||
};
|
||||
|
||||
assert.deepEqual(validateArtifactLayout('test', { global: [entry], local: [] }), []);
|
||||
|
||||
const errors = validateArtifactLayout('test', { global: [], local: [entry] });
|
||||
assert.ok(
|
||||
errors.some((error) => error.includes('artifactLayout.local[0].home') && error.includes('project-scoped')),
|
||||
'Expected local home override rejection, got: ' + JSON.stringify(errors),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
// ── 24d-extra. FIX 3: tightened validateRuntimeBody / validateConfigHome ──────
|
||||
|
||||
@@ -23,6 +23,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const { resolveRuntimeArtifactLayout, findInstallSourceRoot } = require('../gsd-core/bin/lib/runtime-artifact-layout.cjs');
|
||||
const capabilityRegistry = require('../gsd-core/bin/lib/capability-registry.cjs');
|
||||
const installProfiles = require('../gsd-core/bin/lib/install-profiles.cjs');
|
||||
const { install } = require('../bin/install.js');
|
||||
const { createTempDir, cleanup } = require('./helpers.cjs');
|
||||
@@ -121,6 +122,19 @@ describe('resolveRuntimeArtifactLayout — codex', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('keeps every built-in local artifact layout project-scoped (#2777)', () => {
|
||||
for (const [runtime, descriptor] of Object.entries(capabilityRegistry.runtimes)) {
|
||||
const localEntries = descriptor.runtime?.artifactLayout?.local ?? [];
|
||||
for (const entry of localEntries) {
|
||||
assert.strictEqual(
|
||||
Object.prototype.hasOwnProperty.call(entry, 'home'),
|
||||
false,
|
||||
`${runtime} local artifact layout entry '${entry.kind}' must not declare home`,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
describe('resolveRuntimeArtifactLayout — copilot', () => {
|
||||
test('returns correct layout for copilot', () => {
|
||||
const layout = resolveRuntimeArtifactLayout('copilot', FAKE_DIR);
|
||||
|
||||
Reference in New Issue
Block a user