mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-17 10:25:33 +02:00
fix: use agent capture budgets for deploy evals
Multi-turn deploy and benchmark sessions were incorrectly limited to the single-call judge timeout. Use the existing capture tier and leave outer-test cleanup headroom, with a free policy regression test. Keep all behavioral assertions and frontier models unchanged. Co-Authored-By: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
1f678a5b81
commit
eb4fd65ed3
@@ -40,6 +40,13 @@ describe('eval budget tiers', () => {
|
|||||||
expect(Math.max(...values)).toBe(PTY_LONG_MS);
|
expect(Math.max(...values)).toBe(PTY_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('deploy workflow sessions use capture budgets, not single-call judge budgets', () => {
|
||||||
|
const source = fs.readFileSync(path.join(ROOT, 'test/skill-e2e-deploy.test.ts'), 'utf8');
|
||||||
|
expect(source).not.toContain('JUDGE_MS');
|
||||||
|
expect([...source.matchAll(/timeout:\s*CAPTURE_MS/g)]).toHaveLength(6);
|
||||||
|
expect([...source.matchAll(/\},\s*CAPTURE_LONG_MS\);/g)]).toHaveLength(6);
|
||||||
|
});
|
||||||
|
|
||||||
test('no paid-test timeout literal exceeds the ceiling tier', () => {
|
test('no paid-test timeout literal exceeds the ceiling tier', () => {
|
||||||
const out = spawnSync('git', ['ls-files', 'test/*.test.ts'], { cwd: ROOT, encoding: 'utf-8', timeout: 30_000 });
|
const out = spawnSync('git', ['ls-files', 'test/*.test.ts'], { cwd: ROOT, encoding: 'utf-8', timeout: 30_000 });
|
||||||
const files = out.stdout.split('\n').filter((f) => f && isPaidTestFile(f));
|
const files = out.stdout.split('\n').filter((f) => f && isPaidTestFile(f));
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { describe, test, expect, beforeAll, afterAll } from 'bun:test';
|
import { describe, test, expect, beforeAll, afterAll } from 'bun:test';
|
||||||
import { JUDGE_MS, CAPTURE_MS } from './helpers/eval-budgets';
|
import { CAPTURE_MS, CAPTURE_LONG_MS } from './helpers/eval-budgets';
|
||||||
import { runSkillTest } from './helpers/session-runner';
|
import { runSkillTest } from './helpers/session-runner';
|
||||||
import {
|
import {
|
||||||
ROOT, browseBin, runId, evalsEnabled,
|
ROOT, browseBin, runId, evalsEnabled,
|
||||||
@@ -68,7 +68,7 @@ Do NOT use AskUserQuestion. Do NOT run gh or fly commands.`,
|
|||||||
workingDirectory: landDir,
|
workingDirectory: landDir,
|
||||||
maxTurns: 20,
|
maxTurns: 20,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'land-and-deploy-workflow',
|
testName: 'land-and-deploy-workflow',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -86,7 +86,7 @@ Do NOT use AskUserQuestion. Do NOT run gh or fly commands.`,
|
|||||||
|
|
||||||
const reportDir = path.join(landDir, '.gstack', 'deploy-reports');
|
const reportDir = path.join(landDir, '.gstack', 'deploy-reports');
|
||||||
expect(fs.existsSync(reportDir)).toBe(true);
|
expect(fs.existsSync(reportDir)).toBe(true);
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Land-and-Deploy First-Run E2E ---
|
// --- Land-and-Deploy First-Run E2E ---
|
||||||
@@ -149,7 +149,7 @@ Just demonstrate the first-run dry-run output.`,
|
|||||||
workingDirectory: firstRunDir,
|
workingDirectory: firstRunDir,
|
||||||
maxTurns: 20,
|
maxTurns: 20,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'land-and-deploy-first-run',
|
testName: 'land-and-deploy-first-run',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -168,7 +168,7 @@ Just demonstrate the first-run dry-run output.`,
|
|||||||
const reportContent = fs.readFileSync(path.join(reportDir, reportFiles[0]), 'utf-8');
|
const reportContent = fs.readFileSync(path.join(reportDir, reportFiles[0]), 'utf-8');
|
||||||
const hasPlatform = reportContent.toLowerCase().includes('fly') || reportContent.toLowerCase().includes('first-run-app');
|
const hasPlatform = reportContent.toLowerCase().includes('fly') || reportContent.toLowerCase().includes('first-run-app');
|
||||||
expect(hasPlatform).toBe(true);
|
expect(hasPlatform).toBe(true);
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Land-and-Deploy Review Gate E2E ---
|
// --- Land-and-Deploy Review Gate E2E ---
|
||||||
@@ -227,7 +227,7 @@ Show what the readiness gate output would look like.`,
|
|||||||
workingDirectory: reviewDir,
|
workingDirectory: reviewDir,
|
||||||
maxTurns: 15,
|
maxTurns: 15,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'land-and-deploy-review-gate',
|
testName: 'land-and-deploy-review-gate',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -247,7 +247,7 @@ Show what the readiness gate output would look like.`,
|
|||||||
const hasReviewMention = reportContent.toLowerCase().includes('review') ||
|
const hasReviewMention = reportContent.toLowerCase().includes('review') ||
|
||||||
reportContent.toLowerCase().includes('not run');
|
reportContent.toLowerCase().includes('not run');
|
||||||
expect(hasReviewMention).toBe(true);
|
expect(hasReviewMention).toBe(true);
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Canary skill E2E ---
|
// --- Canary skill E2E ---
|
||||||
@@ -295,7 +295,7 @@ Just create the directory structure and report files showing the correct schema.
|
|||||||
workingDirectory: canaryDir,
|
workingDirectory: canaryDir,
|
||||||
maxTurns: 15,
|
maxTurns: 15,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'canary-workflow',
|
testName: 'canary-workflow',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -308,7 +308,7 @@ Just create the directory structure and report files showing the correct schema.
|
|||||||
const reportDir = path.join(canaryDir, '.gstack', 'canary-reports');
|
const reportDir = path.join(canaryDir, '.gstack', 'canary-reports');
|
||||||
const files = fs.readdirSync(reportDir, { recursive: true }) as string[];
|
const files = fs.readdirSync(reportDir, { recursive: true }) as string[];
|
||||||
expect(files.length).toBeGreaterThan(0);
|
expect(files.length).toBeGreaterThan(0);
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Benchmark skill E2E ---
|
// --- Benchmark skill E2E ---
|
||||||
@@ -358,7 +358,7 @@ Just create the files showing the correct schema and report format.`,
|
|||||||
workingDirectory: benchDir,
|
workingDirectory: benchDir,
|
||||||
maxTurns: 15,
|
maxTurns: 15,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'benchmark-workflow',
|
testName: 'benchmark-workflow',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -373,7 +373,7 @@ Just create the files showing the correct schema and report format.`,
|
|||||||
const files = fs.readdirSync(baselineDir);
|
const files = fs.readdirSync(baselineDir);
|
||||||
expect(files.length).toBeGreaterThan(0);
|
expect(files.length).toBeGreaterThan(0);
|
||||||
}
|
}
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Setup-Deploy skill E2E ---
|
// --- Setup-Deploy skill E2E ---
|
||||||
@@ -419,7 +419,7 @@ Just detect the platform and write the config.`,
|
|||||||
workingDirectory: setupDir,
|
workingDirectory: setupDir,
|
||||||
maxTurns: 15,
|
maxTurns: 15,
|
||||||
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
allowedTools: ['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
||||||
timeout: JUDGE_MS,
|
timeout: CAPTURE_MS,
|
||||||
testName: 'setup-deploy-workflow',
|
testName: 'setup-deploy-workflow',
|
||||||
runId,
|
runId,
|
||||||
});
|
});
|
||||||
@@ -435,7 +435,7 @@ Just detect the platform and write the config.`,
|
|||||||
expect(content.toLowerCase()).toContain('fly');
|
expect(content.toLowerCase()).toContain('fly');
|
||||||
expect(content).toContain('my-cool-app');
|
expect(content).toContain('my-cool-app');
|
||||||
expect(content).toContain('Deploy Configuration');
|
expect(content).toContain('Deploy Configuration');
|
||||||
}, CAPTURE_MS);
|
}, CAPTURE_LONG_MS);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Module-level afterAll — finalize eval collector after all tests complete
|
// Module-level afterAll — finalize eval collector after all tests complete
|
||||||
|
|||||||
Reference in New Issue
Block a user