Partner workout: reviewing a turn kept apart from personal records
Even after we let each phone own its own state, partner workout defects kept coming back. Before the transport, we had to look again at the premise that the turn is computed from personal records.
In September we connected two phones, and in October we replicated shared progress and then handed it to the host's phone. On November 17 we had each phone own its own state. The direction of not keeping the same fact twice was right, but in that structure the turn was computed from the two people's set counts and the turns they had passed. This time we doubt that premise.
Set records can be fixed or deleted later. But should turns that have already passed go back to that time too? Personal records and the shared turn are different facts. Right now, when a personal record changes, shared progress is affected too. The values that decide which exercise to do now and whose turn it is are also scattered across 19 places.
A shared fact needs a place of its own
The first option is to keep shared progress as one value. That value holds the run number, the exercise, who goes first, the turns that have passed and whether it's finished. The second option is for the phone of the person who'll do a set to create its ID before the set starts. If a set has no name until it ends, a request that arrives in the meantime has to guess which set it points to from some other value.
We suggest leaving out, for now, the option of moving even the Bluetooth sending to native. If we increase to two the places that own a run just to solve the transport problem too, we may create a new boundary like the one we're trying to shrink.
We tried to break it first
We built a small Rust program that holds only the core rules. Within the scope of 2 runs, 2 turn passes, 6 set IDs per person and at most 10 steps, we examined 2,417,373 states and 5,705,261 actions. It found no rule violation, and it caught all eight rules we broke on purpose.
The first draft of the design wasn't right to begin with. The program found a way to lose a record in five steps, and we fixed the design to match. That's why we built a small model before implementing.
Still, this result doesn't let us say the whole partner workout is correct. We didn't check the real engine, the screen, Bluetooth or the server. The start countdown, rest, record edits, recovery after reopening the app, the lock screen and the watch aren't in it either. We didn't look at sequences longer than 10 steps.
We haven't settled on the final structure. Every partner workout feature has to stay, and only the structure can change. Here too, before we believe the new structure is right, we need to ask again what it takes for granted.
The whole design, in one paperWritten from that day’s point of view, using the documents and change history of the time. Published 2026.12.01.
