Skip to content

Record task errors on CaseResult and dedupe repeated model ids - #7

Open
ruanmartinelli wants to merge 1 commit into
mainfrom
claude/record-task-errors
Open

Record task errors on CaseResult and dedupe repeated model ids#7
ruanmartinelli wants to merge 1 commit into
mainfrom
claude/record-task-errors

Conversation

@ruanmartinelli

Copy link
Copy Markdown
Owner

Two small robustness fixes in evaluate, both found while reading the case loop.

1. Task errors were silently dropped

When a task throws, the case is recorded as output: null, score: 0 — but the error message went nowhere. In a real eval that means "this model scored 0 on 4 cases" with no way to tell a bad completion apart from a rate-limit error or a missing API key. CaseResult now carries an optional error: string with the thrown message (non-Error throws are stringified). Purely additive to the report shape.

2. Duplicate model ids: wasted spend + silent overwrite

models: ['m1', 'm1'] re-ran every case (real model calls, real cost) only to overwrite its own byModel.m1 entry. There was even a test on main pinning this as a documented wart. Model ids are now deduplicated up front; that test now asserts the task runs once.

Tests

Updated the wart test, extended the thrown-task test to assert the recorded message, and added cases for the non-Error throw and the error-unset-on-success path. pnpm typecheck && pnpm test: 70 passing.

Note

Touches the same case loop as #6 (concurrency) — whichever merges first, the other rebases trivially; happy to do the rebase.

🤖 Generated with Claude Code

https://claude.ai/code/session_015XMPpi4PX2bWwAoMLaZZ4k


Generated by Claude Code

Two small robustness fixes in evaluate:

- When a task throws, the case was recorded with output: null and
  score 0 but the error itself vanished, making failures impossible to
  debug from the report. CaseResult now carries an optional error field
  with the thrown message (non-Error throws are stringified).

- A repeated model id in config.models re-ran every case only to
  overwrite its own byModel entry — wasted spend and a silently
  clobbered report. Model ids are now deduplicated up front.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015XMPpi4PX2bWwAoMLaZZ4k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants