PLANOMADEach piece covers one technical decision: the problem at the time, the options we considered, why we chose one, and its limits. Later changes are added at the end with their dates.
A partner workout looks like a turn-based game, but a set that has been done cannot be undone. We survey methods from turn-based games and distributed systems, and lay out what four designs solved, the assumption that blocked them in the end, and the structure we are now examining.
After handling an action, the engine doesn’t know what changed, so it rereads and compares the state needed by the screen, lock screen, watch and widgets. We look at the cause and the alternatives.
When a replay fails, we check whether that sequence can really happen before changing the engine. If it can’t, we fix the model and the replay.
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.
We turned Bluetooth on from the partner-finding screen, and nothing happened. The app learned that Bluetooth was off, then could no longer hear that it had come back on.
Where an expanded card appears differed from the space it actually occupies. We ran four experiments, separate from the app, to see whether we could make it simpler without the library.
To show the departing screen briefly, we kept adding timers and conditions. Before fixing the motion, we first looked at how many places were deciding the same screen.
Types, lint, generated files and replay checks all passed. Then we tapped through the app by hand and found six problems a person could run into.
REDDY and REDDY TRAINER share many rules, but each was also building code it didn’t need. They keep one source and get separate builds.
A record the app can read may still contain fields it doesn’t know. We keep those fields when the record is saved.
We tried to resend and recover automatically every time something failed. But the more we resolved automatically, the more the app had to remember and reconcile.
In October we set out to take product rules out of the server. We are changing direction: data that several people use at once is settled on the server.
Our patches to third-party libraries came to 11,074 lines. We checked whether each one was still needed and looked for ways to do without it.
Since November 5, the engine has gone through every area after each input, so one button press also runs 13 unrelated areas. We are removing this pass.
While records arrive in parts, one that hasn’t arrived yet can look like one that doesn’t exist. To tell them apart, the app now starts only after it has read all of the account’s records.
Passing a replay is not proof that a problem can’t happen. We sort verification results into three levels by their evidence.
When the app was reopened after closing mid-workout, it occasionally stopped on a black screen. We followed the order of events at launch to find the cause.
Even when a save was canceled, the state in memory and the requests could already have changed. Instead of adding a way to undo them, we decide every rejection before changing state.
Until now, saving the watch’s records required the phone. We treat the watch as a separate device on the account, so it can save records without the phone.
Even with the host’s phone deciding progress, the same facts were on both phones. We assign each fact to one phone, and each phone manages its own state.
We found 107 in the app and 53 in shared code. Rather than fixing them one at a time, we first looked at why problems like these can keep happening.
Although indexes existed, 36 queries were scanning every record. Indexes and queries now come from one declaration.
A model can be right while the real code behaves differently. We check the app's rules on the real engine, and the server's rules on real SQL.
Old and new versions of the app can’t understand all of each other’s records. Records a version can’t read are skipped, not changed or deleted, so they don’t stop the whole app.
The server remembered only the number of the last write it had applied. The model found a sequence in which this overwrites a record.
If a button press also has to process the server’s response, the device has to wait on the network. We separate what happens at the press from what happens afterwards.
In October we worked from the old code and rebuilt its old structure as well. This time we define the data to store first, then rebuild the engine.
Handwritten tests cover only the sequences people think of. To find the ones we missed, we replay sequences made by a model on the real code.
We deleted a file and uploaded another under the same name, and the first delete request may only be arriving now. The name alone can't tell us which file it meant to delete.
We stored the time eaten, the order of foods and the meal each belonged to separately, then matched them up again. We decide which is the source and change how they are stored.
Each time the ad changed, the previous SDK object was left behind. Commands no longer carry a result; what happens in the SDK is reported separately.
We wanted a request to reach the server only after the save was committed. We handed that job to Crux and took it back out the same day.
The engine answers within a few milliseconds in the same app, but screens waited for it asynchronously. We make these reads synchronous.
The code that merged shared progress from two phones kept getting more complex. Only the host’s phone now changes shared progress, so there is nothing to merge.
We set out to make the app’s code far less than half its size. Working toward that number made it harder to tell the code to cut from the features to keep.
When a screen decides which buttons to show, the watch and lock screen have to make the same decision themselves. We move these decisions, and the text on screen, into the Rust engine.
In August we removed checks that looked at the shape of the code, but similar scripts came back. We move the rules in those scripts to where they belong.
We kept handwritten lists of the screens to reread when a record changed. We now compute them from the tables SQLite reads and writes.
We connected two phones in September, but a workout done together still wasn't one thing. This time, instead of messages, we let the two phones share the progress itself.
The same product rules were in the app, the server functions and the database. Instead of keeping three copies in step, we move them out of the server.
Reading the whole app turned up 1,424 findings. Many came from the same problems, and some marked as fixed had not been fixed.
We inserted invisible characters to keep Korean words from breaking in the middle, but that changed the original text. We use the operating system’s line breaking instead.
Partner workout uses Bluetooth as its first path, so two phones side by side can exchange records without waiting for the server.
Server functions ran close to the person making the request, but the database was in Seoul. We run the functions in the Seoul region to avoid repeated long trips.
Code alone doesn’t show how the live server behaves. These are the problems we found by checking it directly, and how we fixed them.
The old score could rise even when the weight went down, and halving the rest doubled the growth. We redefine growth and change the formula.
To know the database’s current structure, we had to follow 25 change files in order. We combined them into one file and compared it with the live server.
To use the shared code, an app also had to download unrelated server, website and app files. We move the shared code into its own repository.
Code meant to guard against mismatched versions stopped the app. We checked whether the versions could differ at all, and simplified how commands and answers are exchanged.
An app that had passed every check froze on its first screen. The checks looked at the shape of the code, not at how the app behaved.
REDDY rewrote its whole JSON file each time it saved one record. A failed save could affect every record, so we are moving to SQLite.
After we fixed a crash in one place, another appeared elsewhere. Instead of fixing each one separately, we compared them to find a common cause.
UniFFI exports Rust functions to the app one by one, so the more functions we have, the bigger the boundary between Rust and React Native gets. We needed a way to keep the boundary small no matter how many functions there are.
Skip let us share screens, but didn’t reduce the time it took to change them. We are choosing React Native for our screens again.
We wanted one passkey account for several apps, but the API we needed wasn’t documented. After comparing the alternatives, we decided to verify passkeys on our own server.
The screens we built with React Native didn’t reach the quality we needed. We are testing whether SwiftUI screens can also run on Android through Skip.
With native development, every new app needs two sets of screens. We are trying React Native so we can maintain one.
We are moving MOMENT from Flutter to a Rust core. The documents said “done” and 910 tests passed, but comparing it with the original showed missing features.
Figures come from the documents, change history and measurements of the time. Each article counts in its own way, so line counts cannot be compared with one another. Security, customer and business details are left out.