Files
cloudflare-os/scripts/evals
Ashish Kumar Singh fcfcd4f45f Fix eval comparisons, show failed checks, and drop a workerd workaround (#584)
* Measure eval runs on the pull request's merge commit

The eval workflow compared pull_request.base.sha with the raw head. A
branch cut before a change on main then showed that change as its own:
#570, cut before #525, showed the old eval tasks as added and the new
ones as removed, and Bonk's diff showed the same. base.sha can also be
older than the main GitHub merges into.

Plan the merge commit against its first parent, and have the review job
run from that parent and diff the same pair.

* Count only eval code as an eval task's definition

Any non-test file in integration-tests, or a workshop-evals manifest,
changed every task's definition, which blanks the comparison: #578
(README, mock model, fixture gatekeeper), #568 (the Worker-inputs table)
and #569 (zod catalog specs). Only the eval package's TypeScript defines
or scores a trial. A change to the rest still reruns the tasks.

* Show which checks failed in the eval comment

The comment showed only each task's pass rate, so a drop gave no hint
where trials failed. It now lists, in a collapsed table, each check that
failed on either side, counted over the trials that reached its turn. A
turn the agent didn't finish shows as agent.<outcome>, since it has no
checks to fail.

Trials that failed for infrastructure reasons no longer count against
the score, which shows them instead, for example "89% (1 run error)".
Such rows were already left out of the verdict, so no verdict changes.

A value both sides share is now shown once instead of as "X -> X", so a
reused result reads as one set of numbers.

* Stop waiting for the session drop in close()

close() waited for the Workshop to drop the session after deleting the
workspace, because an abort that found no client left crashed local
workerd 1.20260831.1. #567 moved to workerd 1.20260921.1, which fixed
it (likely cloudflare/workerd#7370). With the wait removed, the crash
probe from #525 crashed workerd in 10 of 12 Gadget closes on #567's
parent and in none on #567. On this commit it crashed in none of 48.

The settleRestart doc gave the crash as its reason. Its callers are
tests that check a change did not restart the workspace, so the doc
now says that.
2026-09-28 14:55:47 -05:00
..