Skip to content

Commit 91523c8

Browse files
committed
test(scenarios): give the two skill-evals --regrade command tests a measured 30 s budget
The first --regrade command test to run pays a load-bound cost the rest of the file does not: 2356 ms on a light Test Core shard and 6218 / 9728 ms on the shard beside plugin-security, against vitest's 5 s default (36-168 ms locally). Both tests on the full executeRound + regradeRound path take a named 30 s timeout; every assertion is kept, no retry, skip or package-wide testTimeout. Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0e46840 commit 91523c8

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

‎packages/qa/scenarios/test/skill-evals/skill-evals.test.ts‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ import { renderSummaryMarkdown, summariseRound } from '../../src/skill-evals/sum
2828
const scratch = mkdtempSync(join(tmpdir(), 'skill-evals-test-'));
2929
afterAll(() => rmSync(scratch, { recursive: true, force: true }));
3030

31+
// The two `--regrade` command tests run a full round, then `regradeRound`; the first of them to run in a
32+
// worker pays a load-bound cost the rest of the file does not. Measured, not vitest's 5 s default:
33+
// 36-168 ms locally, 2356 ms on a light Test Core shard (merge-queue job 134557796904), 6218 ms and
34+
// 9728 ms on the shard beside plugin-security (jobs 134498092500, 134551614597), where the second
35+
// one took 141 ms. 30 s is ~3x the slowest observed, the budget of this package's stand-in suites.
36+
const REGRADE_COMMAND_TEST_TIMEOUT_MS = 30_000;
37+
3138
/** A two-bundle catalog in the shape every `skills/BUNDLE/evals/*.json` uses. */
3239
function writeCatalog(): string {
3340
const root = mkdtempSync(join(scratch, 'skills-'));
@@ -400,7 +407,7 @@ describe('--regrade grades an old answer only against the case that ran', () =>
400407
expect(md).toContain('1 case(s) changed since the round, set apart: not regraded and out of every pass rate below: `alpha-skill/cases#2`');
401408
expect(md).toContain('2 record(s) carry no case hash');
402409
expect(md).not.toContain('| alpha-skill/cases#2 |');
403-
});
410+
}, REGRADE_COMMAND_TEST_TIMEOUT_MS);
404411
});
405412

406413
describe('trigger cases: graded on whether the with-skill turn loaded the bundle, reported beside the behaviour cases', () => {
@@ -527,7 +534,7 @@ describe('trigger cases: graded on whether the with-skill turn loaded the bundle
527534
const round = JSON.parse(readFileSync(join(dir, 'round.json'), 'utf8')) as { regraded: { added: string[] }; summary: { triggers: { cases: Array<{ key: string; tally: { pass: number; fail: number } }> } } };
528535
expect(round.regraded.added).toEqual([]);
529536
expect(round.summary.triggers.cases.map((t) => [t.key, t.tally.pass, t.tally.fail])).toEqual([['beta-skill/triggers#1', 0, 1], ['beta-skill/triggers#2', 1, 0]]);
530-
});
537+
}, REGRADE_COMMAND_TEST_TIMEOUT_MS);
531538
});
532539

533540
describe('`files`: what a case needs on disk, placed in the turn\'s project on both arms', () => {

0 commit comments

Comments
 (0)