Walking would occasionally lock. The body kept travelling, the character stopped moving, and only a reload cleared it. It arrived with a screenshot of a figure folded into a shape no animation produces, which turned out to be a second bug wearing the first one's clothes.
The jump is a one-shot clip. The engine decides whether to leave a state by testing, on each frame, whether the playhead crossed an exit point since the previous frame. For a clip that loops this is forgiving, because the playhead comes round again. For a clip that ends it is not: once a one-shot finishes, the engine pins its clock, and an exit that was never crossed can never be crossed afterwards.
That is a known shape, and the code handled it. On the frame the mover reports the feet are down, a recovery function moves the playhead back onto the landing, which puts the clock below the exit point and makes it reachable again. The comment above it explains all of this clearly and correctly.
The function had never run. Not once, in any browser, since the day it was written.
It asked the animation layer which state was active using a property name that belongs to an object one level down, which the layer does not hand out. So the comparison was against nothing, the guard above it returned early every time, and the body of the function was unreachable code wearing a detailed explanation of what it did.
What makes this worth writing down is not the mistake. It is that three separate things had to be true for it to survive, and each of them is a thing you would describe as good practice.
The first: the interface that described the object marked the field optional, with a sentence explaining that the code should decline rather than guess when the engine does not say. Reasonable in isolation, and it meant a field that was never present was legal. The compiler had nothing to object to.
The second: the test stub was shaped like the mistake. It offered the same wrong name the code read, so the two agreed with each other and the suite was green. A test that mirrors the implementation rather than the thing being implemented will pass forever and prove nothing.
The third: nothing asserted the engine. Every fact about which property exists lived in a hand-written description of a library rather than in anything that reads the library.
So the fix is one word, and the work is the other three. The field is required now, so absence is a compile error rather than a shrug. The stub exposes only what the real object exposes, which turned two passing tests red before anything else was touched. And a test now reads the library's own prototype and asserts which property is there, so the next rename arrives as a failure instead of as a freeze six months later.
The folded figure was unrelated, and it was the same shape of problem. Pulling up onto a ledge ends with the feet off the floor, and the code that hands control back was waiting on a call that only happens once the feet are down. On that one path it never came, so the pose was held and the body walked away underneath it. That module had no tests at all, which is why it was the one with the bug in it.
Both are fixed, and both now have tests that were watched failing first. The second part is the part that counts: a guard nobody has seen fail is a guess.