fix(quick-1): remove HIGH severity test overfitting in 4 test files

- frontmatter.test.cjs: delete FRONTMATTER_SCHEMAS describe block (4 tests asserting on lookup table shape)
- core.test.cjs: replace 12 per-profile per-agent matrix tests with 1 structural validation test
- commands.test.cjs: URL test uses URL.searchParams.get() instead of raw string includes
- state.test.cjs: date assertion uses before/after window to handle midnight boundary safely
This commit is contained in:
Ethan Hurst
2026-02-25 19:48:29 +10:00
parent 21c898b2cc
commit c9e73e9c94
4 changed files with 25 additions and 96 deletions

View File

@@ -142,69 +142,22 @@ describe('resolveModelInternal', () => {
);
}
describe('quality profile', () => {
beforeEach(() => {
writeConfig({ model_profile: 'quality' });
});
describe('model profile structural validation', () => {
test('all known agents resolve to a valid string for each profile', () => {
const knownAgents = ['gsd-planner', 'gsd-executor', 'gsd-phase-researcher', 'gsd-codebase-mapper'];
const profiles = ['quality', 'balanced', 'budget'];
const validValues = ['inherit', 'sonnet', 'haiku', 'opus'];
test('resolves gsd-planner correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'inherit');
});
test('resolves gsd-executor correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-executor'), 'inherit');
});
test('resolves gsd-phase-researcher correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-phase-researcher'), 'inherit');
});
test('resolves gsd-codebase-mapper correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-codebase-mapper'), 'sonnet');
});
});
describe('balanced profile', () => {
beforeEach(() => {
writeConfig({ model_profile: 'balanced' });
});
test('resolves gsd-planner correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'inherit');
});
test('resolves gsd-executor correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-executor'), 'sonnet');
});
test('resolves gsd-phase-researcher correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-phase-researcher'), 'sonnet');
});
test('resolves gsd-codebase-mapper correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-codebase-mapper'), 'haiku');
});
});
describe('budget profile', () => {
beforeEach(() => {
writeConfig({ model_profile: 'budget' });
});
test('resolves gsd-planner correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-planner'), 'sonnet');
});
test('resolves gsd-executor correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-executor'), 'sonnet');
});
test('resolves gsd-phase-researcher correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-phase-researcher'), 'haiku');
});
test('resolves gsd-codebase-mapper correctly', () => {
assert.strictEqual(resolveModelInternal(tmpDir, 'gsd-codebase-mapper'), 'haiku');
for (const profile of profiles) {
writeConfig({ model_profile: profile });
for (const agent of knownAgents) {
const result = resolveModelInternal(tmpDir, agent);
assert.ok(
validValues.includes(result),
`profile=${profile} agent=${agent} returned unexpected value: ${result}`
);
}
}
});
});