jevsnes.git / research / fixtures / README.md
1# Chapter 23: fixtures, evidence in a jar
2
3When something goes wrong in a running game, the moment passes. Link walks
4on, the bot re-plans, and an hour later all anyone has is a memory of "he
5just stood there". This folder keeps the moment. A fixture is what a running
6window said about itself at the time something went wrong, saved as it came
7out of the tool that produced it, so that the defect can be argued about
8with the real thing in front of you.
9
10A fixture here is **evidence, not a test input**. Nothing in the build reads
11these files; a person does. When a fixture leads to a test, the test lives
12beside the code it tests and rebuilds the situation in that crate's own
13terms, citing the fixture in its doc comment. That way a fixture can be
14deleted without breaking anything, and a test never ends up testing a JSON
15parser.
16
17> **Aside: the one that is here.** On 2026-09-20 the window stood
18> motionless in overworld area 43 for four minutes, with the player-control
19> flag on the whole time. The decision record shows Jev choosing the right
20> direction, over and over. The defect was underneath: the empty button
21> press that followed each choice counted as "Link is not moving", so every
22> plan was thrown away one decision after it was made. It is kept because it
23> is a perfect example of a bug that looks like the model's fault and is not.
24
25> **Try it.** `jq '.' research/fixtures/live-stall-area43.json | head -40`
26> and see what a decision record from the old Rust brain looked like.
27
28## For the people who maintain it
29
30### In this folder
31
32| Path | What it is |
33| --- | --- |
34| [live-stall-area43.json](live-stall-area43.json) | The live window on 2026-09-20, motionless in overworld area 43 at (1667, 3041) for four minutes with `control: true`. The decision record shows Jev choosing `goal_up`, the right answer, over and over. What was wrong: the empty press that follows a choice counted as "Link is not moving", so the plan was binned one decision after it was made. It produced the test `the_live_stall` in `packages/brain`, which was deleted with the Rust brain on 2026-09-21; the fixture is kept as the record of the defect. |
35| [README.md](README.md) | This chapter. |
36| [CLAUDE.md](CLAUDE.md) | How to capture one, for agents. |
37
38← Previous: [Chapter 22, research/](../) · Up: [research](../) · Next: [Chapter 24, tools/](../../tools/) →