At the end of Break Out of a Fix Loop, you went back to the last good commit: the play-test weekend log is committed, no fix attempt remains, and the impossible average is back. If your agent named a cause, it’s in your notes as a lead to check.
In this lesson, you’ll hand the same bug over the way you’d want it handed to you: the command that shows it, the output it gives, and what it should say instead. You’ll ask for hypotheses and a failing test before any fix, and accept a fix only when the proposed cause explains everything that’s wrong. Start by collecting the symptoms.
Collect Every Symptom
To ask for a cause that explains every symptom, you need to know the symptoms. Run your report command on The Lighthouse Keeper’s Study again, and this time read the whole line with the impossible average. Here’s the run on the reference version from the course downloads, at the commit that adds the play-test weekend log:
$ npm run report -- rooms/lighthouse-keepers-study.json
> [email protected] report
> node playtest-report.js rooms/lighthouse-keepers-study.json
the foghorn code: estimate 10, average 64.5, hints 012
the keeper's logbook: estimate 9, average 15.0, hints 3
the tide-table cipher: estimate 10, average 12.8, hints 5
the locked sea chest: estimate 8, average 10.8, hints 3
the brass telescope: estimate 6, average 6.5, hints 1
the lamp-room door: estimate 5, average 4.5, hints 0
The first line’s hints figure, 012, is wrong too, because the two teams that reached the foghorn code used 1 and 2 hints. If your own project words its lines differently, copy yours.
Next, work out the figures that are right. Open playtests/lighthouse-keepers-study.json, find every record with the ID foghorn, and calculate the average and total hints by hand. Two teams reached it, taking 12 and 9 minutes with 1 and 2 hints, so the line should read average 10.5, hints 3. That’s your expected result. You don’t need to know why the report disagrees.
If your notes from the last lesson name a cause, test it against the new symptom. A cause that explains the average but not the hints figure is at most half the story. Put it in your brief as a hypothesis to check.
Write a Brief That Carries the Evidence
In Break Out of a Fix Loop, you described the bug in a sentence or two. Watch out: An agent can read the whole codebase and even run the program, but from a description alone it has to guess which figure you mean and what right looks like. So it often changes a likely-looking cause, and nothing shows whether that was your bug.