mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-15 09:25:28 +02:00
Preserve frontier models and quality thresholds while fixing truncated judge output, ordered section expansion, consent checks, QA scoring, and ship audit gates. Add regression coverage and refresh generated docs. Co-Authored-By: OpenAI Codex <noreply@openai.com>
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import { generateQAMethodology } from '../scripts/resolvers/utility';
|
|
import { HOST_PATHS } from '../scripts/resolvers/types';
|
|
|
|
const methodology = generateQAMethodology({
|
|
skillName: 'qa', tmplPath: '', host: 'claude', paths: HOST_PATHS.claude,
|
|
});
|
|
const rubric = methodology.split('## Health Score Rubric')[1].split('## Framework-Specific Guidance')[0];
|
|
|
|
describe('QA health rubric scoring contract', () => {
|
|
test('console bands have no overlapping boundary at ten errors', () => {
|
|
expect(rubric).toContain('4-10 errors');
|
|
expect(rubric).toContain('11+ errors');
|
|
expect(rubric).not.toContain('10+ errors');
|
|
expect(rubric).toContain('Exclude warnings');
|
|
});
|
|
|
|
test('defines severity, categories, and duplicate handling', () => {
|
|
for (const severity of ['Critical', 'High', 'Medium', 'Low']) {
|
|
expect(rubric).toContain(`**${severity}:**`);
|
|
}
|
|
expect(rubric).toContain('one primary category');
|
|
expect(rubric).toContain('same root cause');
|
|
expect(rubric).toContain('client-side routes');
|
|
});
|
|
|
|
test('defines partial coverage and weighted rounding', () => {
|
|
expect(rubric).toContain('untested');
|
|
expect(rubric).toContain('provisional');
|
|
expect(rubric).toContain('15% = 0.15');
|
|
expect(rubric).toContain('Round only the final score');
|
|
});
|
|
});
|