Repository navigation
fix(evals): follow-ups to the TUI overhaul - #3164
miguelg719 wants to merge 4 commits into
Conversation
The row has just released its provider slot, so the retry re-acquired at once and called the provider again milliseconds after the 429, usually wasting the single retry. Wait PROVIDER_RETRY_DELAY_MS (10 s) first, like the Browserbase create-429 path already does.
The per-harness tool default was folded into coreToolSurface, so it overrode core.tool for core runs too; an agent-mount-only default made every core run fail rejectAgentMountOnlyCoreTool. Resolve it as benchToolSurface and apply it only when the run has bench tasks.
… log Async work a row leaves behind (timers, child output) keeps its row context. Its lines reopened the row's log file (leaking the handle) and, with -v, could print over the summary; late phases could redraw the row. Drop both once the row is done, and close the log in a finally so a row that throws still flushes its file.
The live board hides the cursor; esc, Ctrl+C and SIGTERM in 'evals run' mode call process.exit without stopping it, leaving the shell's cursor hidden. Register a process exit hook while the cursor is hidden.
|
There was a problem hiding this comment.
2 issues found across 12 files
Confidence score: 3/5
- In
providerConcurrency.ts, a non-TTY run with no other live handles can exit during the unreferenced 10-second wait, skipping the retry. Keep the retry timer referenced until it fires. - In
run.ts, mixed core/bench runs can give core rows the harness default tool when building their context. Keep the bench default separate and apply it only to bench rows.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/evals/framework/providerConcurrency.ts">
<violation number="1" location="packages/evals/framework/providerConcurrency.ts:604">
P2: The default `sleep` unrefs its timer, so a non-TTY run with no other live handles can exit during this new 10-second wait and skip the retry. Keep the retry timer referenced until it fires.</violation>
</file>
<file name="packages/evals/tui/commands/run.ts">
<violation number="1" location="packages/evals/tui/commands/run.ts:465">
P2: Mixed core/bench runs overwrite `core.tool` with the harness default, and core rows then pass that value to `buildCoreContext`. Keep the bench default separate and apply it only when planning bench rows.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| // Back off before the retry. A provider row has just released its slot, | ||
| // so without a wait it re-acquires at once and calls the provider again | ||
| // milliseconds after the 429. | ||
| await sleep( |
There was a problem hiding this comment.
P2: The default sleep unrefs its timer, so a non-TTY run with no other live handles can exit during this new 10-second wait and skip the retry. Keep the retry timer referenced until it fires.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/evals/framework/providerConcurrency.ts, line 604:
<comment>The default `sleep` unrefs its timer, so a non-TTY run with no other live handles can exit during this new 10-second wait and skip the retry. Keep the retry timer referenced until it fires.</comment>
<file context>
@@ -594,10 +598,16 @@ export async function runGatedRow(options: RunGatedRowOptions): Promise<TaskResu
+ // Back off before the retry. A provider row has just released its slot,
+ // so without a wait it re-acquires at once and calls the provider again
+ // milliseconds after the 429.
+ await sleep(
+ source === "browserbase"
+ ? (options.browserbaseRetryDelayMs ?? BROWSERBASE_RETRY_DELAY_MS)
</file context>
| // The harness's tool default applies to bench rows only; core-tier runs | ||
| // keep core.tool (or --tool). | ||
| if (options.benchToolSurface && tasks.some((task) => task.tier === "bench")) { | ||
| options = { ...options, coreToolSurface: options.benchToolSurface }; |
There was a problem hiding this comment.
P2: Mixed core/bench runs overwrite core.tool with the harness default, and core rows then pass that value to buildCoreContext. Keep the bench default separate and apply it only when planning bench rows.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At packages/evals/tui/commands/run.ts, line 465:
<comment>Mixed core/bench runs overwrite `core.tool` with the harness default, and core rows then pass that value to `buildCoreContext`. Keep the bench default separate and apply it only when planning bench rows.</comment>
<file context>
@@ -459,6 +459,12 @@ export async function runCommand(
+ // The harness's tool default applies to bench rows only; core-tier runs
+ // keep core.tool (or --tool).
+ if (options.benchToolSurface && tasks.some((task) => task.tier === "bench")) {
+ options = { ...options, coreToolSurface: options.benchToolSurface };
+ }
+
</file context>
Follow-up to the evals TUI overhaul (#3087, #3088, #3089, #3090, all merged).
Summary
Four small fixes from a whole-stack review, each in code the stack adds or touches:
PROVIDER_RETRY_DELAY_MS(10 s, abort-aware) first, like the Browserbase create-429 path.harnesses.<h>.toolstays out of core-tier runs (feat(evals): config v2 with local overrides and one .env loader #3088). The per-harness tool default was folded intocoreToolSurface, so it overrodecore.toolfor core runs too; an agent-mount-only default made every core run fail. It's nowbenchToolSurface, applied only when the run has bench tasks.-v, and late phases could redraw the row. The log now closes in afinally, so a row that throws still flushes its file.evals runmode callprocess.exitwith the cursor hidden; the board now registers an exit hook while it hides it.Test plan
vitest packages/evals/tests: 1210 passing (the three Playwright-backed integration files need a local browser)fmt:checkSummary by cubic
Follow-up fixes to the evals TUI overhaul (#3087–#3090), each driven by a whole-stack review and covered by a regression test that fails with the fix reverted.
Bug Fixes
PROVIDER_RETRY_DELAY_MS) before retrying, instead of re-acquiring their slot and calling the provider again milliseconds after the 429.harnesses.<h>.toolno longer overridescore.toolfor core-tier runs; the per-harness tool default applies only when the run has bench tasks.Written for commit 0e11a0a. Summary will update on new commits.