When a run fails partway through, debugging it means reconstructing exactly what happened before it broke -- not the whole trace forever, just the prefix that actually ran. Steps that never executed (because an earlier one already failed) aren't part of the story and shouldn't be in the replay.
Write replay_until_failure(steps), where each step is (name, succeeded). Return the names of every step up to and including the first failed one, then stop. If every step succeeded, return every name.
No results yet
Run your code to check it against the examples, or submit to run every test.