Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Read a Failed Eval Check

In this lesson, the pull-request check you wired up in Run Evals on Every Pull Request failed for the first time, on a teammate’s change that sends the model only the reports for the place a hiker asks about. You read the failure case by case against main’s stored results, to tell whether the change made answers worse, the run was noise, or a case is flaky.

Key Points

  • A red check is a question, not a verdict. The check marked two lines below their floor: the overall rate at 79.2% against its 93% floor, and the Valbrune ford at 5 of 12 against 75%. That alone can’t say whether the change made answers worse, the run was unlucky, or one case is flaky. Rerunning until the check turns green can’t tell you either. The stored results can.
  • Every check saves a results file named after its commit. Each check runs every case three times. Main had three files from unchanged checks, so nine verdicts per case. The pull request’s commit had one file, three verdicts per case.
  • Compare the two commits case by case. evals/diff.js is your compare script from earlier, reading each commit’s saved files instead of two versions. A file with failed calls is left out, and the script says which and why. It also counts each check on its own, keeping each case’s worst and best. It pairs the cases with shareChanges() from your tests, then marks two things separately:
  • Flaky on main: the case passed more than 20% and less than 80% of its runs on main, with nothing changed.
  • Worse: even the branch’s best check passed the case less often than main’s worst check. Main’s own spread is the yardstick, and a case can be both. Both labels are leads to read, not verdicts.
  • Worse cases point at the cause, and the answers confirm it. Three cases went from eight or nine of nine on main to none of three. reportsFor() keeps a report only when the question contains the first word of its place’s name: the German question asks about “hütte 3”, with no “hut”; the ford question never says “Valbrune”; and “hut 4” pulls in the hut reports, never the ford’s. Their saved answers say there’s no recent report.
  • A broken safety case blocks a change on its own. Two of those cases are ford hazard questions. A hiker would hear “no report” while the warden’s latest report says the water is above knee height and the crossing isn’t recommended.
  • Counts alone can’t blame or clear a flaky case. The dog question at the ford failed once in the branch’s three runs, but it also failed twice in nine on main with nothing changed, so read its saved answer: it had both ford reports, and the judge failed it for the same reason as on main.
  • Flaky on main doesn’t clear a case either. The Italian question asking if hut 6 is open was flaky on main too, yet it never passes on the branch: “rifugio” has no “hut”, so the Hut 6 report is never sent. It’s a safety case too, and the Hut 6 slice still passed its tripwire, so a broken safety case blocks the change even when its slice passes. The other flaky lines stayed within main’s range, which is noise.
  • Check that the drop holds, and count every run. One check is a small sample. A second check on the pull request’s commit failed again, and the four worse cases stood at 0 of 6, with answers that show why. The Wednesday dinner question dropped from 9 of 9 to 5 of 6, which the script doesn’t mark. Its failed answer had the Hut 3 report, so the change didn’t break it.
  • Rerun for evidence, never until green. Rerunning for evidence is fine when every run counts. Rerunning until one passes throws the failures away.
  • Worse, noise or flaky:
  • A case is worse when even the branch’s best check passed it less often than main’s worst check. Rerun, and when its answers show why, block the change. A broken safety case blocks it on its own, even when its slice passes.
  • If a red check shows only flaky lines within main’s range, the run was noise.
  • A case that’s flaky with nothing changed needs its answers read. Quarantine it only as a tracked decision, with an owner and a review date, like the Hut 6 slice. It stays in the report, and you still read its safety lines.

These runs are from December 1, 2026. Your numbers will differ, but these cases should still drop for the same reason.

Final Code

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

00:00 Your eval check runs on every pull request, and today it fails for the first time. A teammate opened a pull request that sends the model only the reports for the place a hiker asks about, to save tokens.

00:13 The output marks two lines below their floor. The overall rate is 79%, and the Valbrune ford passed 5 of 12.

00:23 Did the change make answers worse? Was the run unlucky? Is one case flaky? Rerunning until the check turns green can’t tell you. The stored results can.

00:34 Every check saved a results file named after its commit. Each check runs every case three times. Main has three files, so nine verdicts per case. The pull request’s commit has one file, so three.

00:49 This script is your compare script from earlier, reading each commit’s saved files instead of two versions. A file with failed calls is left out, and the script says so.

01:00 It also counts each check on its own, keeping a case’s worst and best. It marks a case flaky on main when it passed some runs there and failed others. Separately, it marks a case worse when even the branch’s best check passed it less often than main’s worst.

01:16 Both labels are leads to read, not verdicts.

01:22 Run it with main’s commit first, then the pull request’s. Three cases passed 8 or 9 of 9 on main, and 0 of 3 now. Look at the new code. It keeps a report only when the question contains the first word of its place’s name.

01:38 The German one asks about hütte 3, with no “hut”. The ford one never says Valbrune. And “hut 4” pulls in the hut reports, never the ford’s. Their saved answers say there’s no recent report.

01:52 Two of them are ford hazard questions. A hiker would hear “no report” while the warden says don’t cross. A broken safety case blocks the change on its own.

02:04 The ford had one more failure: the dog question failed once in three runs. Your turn: pause the video and predict. Did the change cause that failure? The counts can’t say.

02:17 It failed twice on main with nothing changed, so read its saved answer. It had both ford reports, and the judge failed it for the same reason as on main. That failure isn’t the change’s.

02:30 But flaky on main doesn’t clear a case. The Italian question asks if hut 6 is open, a safety case too. It never passes now. Rifugio has no “hut”. Yet the Hut 6 slice still passed its tripwire.

02:43 A broken safety case blocks the change even when its slice passes. The other flaky lines are noise, within main’s range.

02:53 One check is a small sample, so run the pull request’s commit once more. It fails again, and its file joins the first.

03:02 Now all four cases stand at 0 of 6, and their answers show why. The dinner question dropped to 5 of 6, which the script doesn’t mark. Its failed answer had the Hut 3 report, so the change didn’t break it.

03:15 Rerunning for evidence is fine when every run counts. Rerunning until one passes throws the failures away.

03:24 Read a failed check case by case, against main. A case is worse when even the branch’s best check passed it less often than main’s worst. Rerun, and when its answers show why, block the change.

03:37 A broken safety case blocks it alone, even when its slice passes.

03:42 If a red check shows only flaky lines within main’s range, the run was noise. A case flaky with nothing changed needs its answers read. Quarantine it only as a tracked decision, with an owner and a review date, like Hut 6.

03:58 It stays in the report, and you still read its safety lines.

04:03 The change goes back with the four broken questions. In Exercise: Gate a Pull Request on Evals, you’ll sort recorded failures into worse, noise or flaky yourself.

Become a Member to join the conversation.