mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-01 02:40:47 +02:00
refactor(test): mechanical sweep — 298 paid-test timeouts onto eval-budget tiers
69 files, both shapes (trailing bun-test budgets and runner timeout/timeoutMs options), ROUND-UP ONLY so nothing that passed can start failing: 75 → JUDGE_MS, 137 → CAPTURE_MS, 74 → CAPTURE_LONG_MS, 9 → PTY_MS, 3 → PTY_LONG_MS. Raw >=60s literal count in the paid scope: 395 → 97, of which 51 are non-timeout noise (fixture dates, run IDs) and 46 are enumerated justified holds (comment-carrying calibrated budgets, poll-loop constants, utility spawn waits, and the seven physical-ceiling 1_500_000 sites). The eval-budgets policy ratchet keeps the residue from regrowing. Known collapse: where an inner runner budget and its enclosing test budget now share a tier, the old stagger is gone — an overrun surfaces as a bun test timeout instead of a graceful runner timeout (diagnosability trade, not a correctness one). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
74ae357e0f
commit
6841183c35
+12
-11
@@ -1,4 +1,5 @@
|
||||
import { describe, test, expect, beforeAll, afterAll } from 'bun:test';
|
||||
import { JUDGE_MS } from './helpers/eval-budgets';
|
||||
import { runSkillTest } from './helpers/session-runner';
|
||||
import {
|
||||
ROOT, browseBin, runId, evalsEnabled,
|
||||
@@ -47,7 +48,7 @@ describeIfSelected('Skill E2E tests', [
|
||||
Report the results of each command.`,
|
||||
workingDirectory: tmpDir,
|
||||
maxTurns: 7,
|
||||
timeout: 60_000,
|
||||
timeout: JUDGE_MS,
|
||||
testName: 'browse-basic',
|
||||
runId,
|
||||
});
|
||||
@@ -56,7 +57,7 @@ Report the results of each command.`,
|
||||
recordE2E(evalCollector, 'browse basic commands', 'Skill E2E tests', result);
|
||||
expect(result.browseErrors).toHaveLength(0);
|
||||
expect(result.exitReason).toBe('success');
|
||||
}, 90_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('browse-snapshot', async () => {
|
||||
const result = await runSkillTest({
|
||||
@@ -69,7 +70,7 @@ Report the results of each command.`,
|
||||
Report what each command returned.`,
|
||||
workingDirectory: tmpDir,
|
||||
maxTurns: 9,
|
||||
timeout: 60_000,
|
||||
timeout: JUDGE_MS,
|
||||
testName: 'browse-snapshot',
|
||||
runId,
|
||||
});
|
||||
@@ -81,7 +82,7 @@ Report what each command returned.`,
|
||||
console.warn('Browse errors (non-fatal):', result.browseErrors);
|
||||
}
|
||||
expect(result.exitReason).toBe('success');
|
||||
}, 90_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('skillmd-setup-discovery', async () => {
|
||||
// P2 (v1.2.0): the browse SETUP/binary-discovery block moved from the root
|
||||
@@ -104,7 +105,7 @@ Then run: $B text
|
||||
Report whether it worked.`,
|
||||
workingDirectory: tmpDir,
|
||||
maxTurns: 10,
|
||||
timeout: 60_000,
|
||||
timeout: JUDGE_MS,
|
||||
testName: 'skillmd-setup-discovery',
|
||||
runId,
|
||||
});
|
||||
@@ -112,7 +113,7 @@ Report whether it worked.`,
|
||||
recordE2E(evalCollector, 'SKILL.md setup block discovery', 'Skill E2E tests', result);
|
||||
expect(result.browseErrors).toHaveLength(0);
|
||||
expect(result.exitReason).toBe('success');
|
||||
}, 90_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('skillmd-no-local-binary', async () => {
|
||||
// Create a tmpdir with no browse binary — no local .claude/skills/gstack/browse/dist/browse
|
||||
@@ -149,7 +150,7 @@ Report the exact output. Do NOT try to fix or install anything — just report w
|
||||
|
||||
// Clean up
|
||||
try { fs.rmSync(emptyDir, { recursive: true, force: true }); } catch {}
|
||||
}, 60_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('skillmd-outside-git', async () => {
|
||||
// Create a tmpdir outside any git repo
|
||||
@@ -182,7 +183,7 @@ Report the exact output — either "READY: <path>" or "NEEDS_SETUP".`,
|
||||
|
||||
// Clean up
|
||||
try { fs.rmSync(nonGitDir, { recursive: true, force: true }); } catch {}
|
||||
}, 60_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('operational-learning', async () => {
|
||||
const opDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-oplearn-'));
|
||||
@@ -286,7 +287,7 @@ Log the operational learning now. Then say what you logged.`,
|
||||
|
||||
// Clean up
|
||||
try { fs.rmSync(opDir, { recursive: true, force: true }); } catch {}
|
||||
}, 90_000);
|
||||
}, JUDGE_MS);
|
||||
|
||||
testConcurrentIfSelected('session-awareness', async () => {
|
||||
const sessionDir = fs.mkdtempSync(path.join(os.tmpdir(), 'skill-e2e-session-'));
|
||||
@@ -353,7 +354,7 @@ Since this is non-interactive, DO NOT actually call AskUserQuestion. Instead, wr
|
||||
Remember: _SESSIONS=4, so ELI16 mode is active. The user is juggling multiple windows and may not remember what this conversation is about. Re-ground them.`,
|
||||
workingDirectory: sessionDir,
|
||||
maxTurns: 8,
|
||||
timeout: 60_000,
|
||||
timeout: JUDGE_MS,
|
||||
testName: 'session-awareness',
|
||||
runId,
|
||||
});
|
||||
@@ -394,7 +395,7 @@ Remember: _SESSIONS=4, so ELI16 mode is active. The user is juggling multiple wi
|
||||
|
||||
// Clean up
|
||||
try { fs.rmSync(sessionDir, { recursive: true, force: true }); } catch {}
|
||||
}, 90_000);
|
||||
}, JUDGE_MS);
|
||||
});
|
||||
|
||||
// Module-level afterAll — finalize eval collector after all tests complete
|
||||
|
||||
Reference in New Issue
Block a user