fix: add regression-test-presence gate + missing tests for #2429/#2279 (#2563)
lint-fix-has-regression-test.cjs: new gate that fails if a fix(#NNNN) or feat(#NNNN) commit has zero behavioral test files (*.test.cjs, excluding auto-generated fixtures/baselines) in its diff. Wired into lint:ci so it runs before PR creation. Missing regression tests added: - #2429: codex local scope does not set $HOME/.agents skills home; global scope does (tests/runtime-artifact-layout.test.cjs) - #2279: map-codebase instructions say to overwrite existing dates, not just replace [YYYY-MM-DD] placeholders (tests/commands.test.cjs)
This commit is contained in:
@@ -101,6 +101,24 @@ describe('resolveRuntimeArtifactLayout — codex', () => {
|
||||
assert.strictEqual(layout.kinds[0].prefix, 'gsd-');
|
||||
assert.strictEqual(typeof layout.kinds[0].stage, 'function');
|
||||
});
|
||||
|
||||
test('#2429: codex local scope does not set $HOME/.agents skills home override', () => {
|
||||
const layout = resolveRuntimeArtifactLayout('codex', FAKE_DIR, 'local');
|
||||
const skills = layout.kinds.find(k => k.kind === 'skills');
|
||||
assert.ok(skills, 'codex local must have a skills kind');
|
||||
assert.strictEqual(skills.home, undefined,
|
||||
'codex local skills must NOT have a home override (would redirect to $HOME/.agents instead of project-local)');
|
||||
});
|
||||
|
||||
test('#2429: codex global scope DOES set $HOME/.agents skills home override', () => {
|
||||
const layout = resolveRuntimeArtifactLayout('codex', FAKE_DIR, 'global');
|
||||
const skills = layout.kinds.find(k => k.kind === 'skills');
|
||||
assert.ok(skills, 'codex global must have a skills kind');
|
||||
assert.ok(typeof skills.home === 'string' && skills.home.length > 0,
|
||||
'codex global skills MUST have a home override ($HOME/.agents)');
|
||||
assert.ok(skills.home.includes('.agents'),
|
||||
'codex global skills home should point to .agents directory');
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolveRuntimeArtifactLayout — copilot', () => {
|
||||
|
||||
Reference in New Issue
Block a user