Weight log: how the build went
What happened when an AI got nothing but the brief: versions it found, three rounds of fixes, 43 tests, an APK without internet access, the emulator check and the way onto a phone.
One run, one brief
Part ten has the whole brief for the Weight log app. This is what happened when an AI (Claude Code) got it. The AI built the app in one run from this one brief. I prepared the brief with the help of AI and checked the result. I did not write the code.
The brief demands a truthful build log: the time, the exact command, the result and, for an error, an excerpt of the message and the fix. Everything in this article comes from that log and from the guide the AI wrote for the app. Where the log says nothing, I say nothing here either.
The run used the Slovak brief. The English one in part ten has not been tested by a build, which is why commands and folders here are the Slovak ones.
Two things differed from the brief as published. Part 0 had a different path to the project folder; nothing else in the text of the brief was changed. And the run had one extra operating instruction: start the emulator without a window so it would not get in the way on screen. The brief asks for an emulator with a window. The AI followed the instruction and wrote it into the log as a deviation from the brief.
The first entry in the log is timed 19:21, the last 19:42.
What the AI found on the machine
The brief says versions are not guessed from memory. So the first step was to find out what was on the computer:
- the variables
ANDROID_HOMEandJAVA_HOMEwere empty, the Android SDK was in its default location, - Android platforms 35, 36 and 37.0, build tools 35.0.0 and 36.0.0,
- two Javas: 25 from Android Studio, and 21,
- downloaded Gradle 8.13 and 9.3.1,
- one virtual device,
Medium_Phone_API_37.0.
A virtual device existed, so the brief’s “When to stop” point did not apply and the build could go on.
Versions: the newest, but not blindly
Next the AI looked up the current stable versions directly in the library repositories and in the compatibility documentation. It wrote the decisions with their reasons into the log:
| What | Version | Why |
|---|---|---|
| Android Gradle Plugin | 9.5.2 | newest stable; 9.6 was only an alpha |
| Gradle | 9.7.1 | the newest was 9.9.2, but the Kotlin plugin is verified with Gradle up to 9.7 and the Android Gradle Plugin needs at least 9.6 |
| Kotlin | 2.4.21 | newest stable |
| Compose BOM | 2026.09.00 | the newest, 2026.11.01, did not work, see below |
| compileSdk, targetSdk, minSdk | 37, 37, 26 | the highest on the machine; minSdk from the brief |
For Kotlin, the AI found in the documentation that from version 9 the Android Gradle Plugin has Kotlin support built in and the separate plugin is not combined with it. The brief mentions this only in general terms; the AI looked up the specifics itself.
One detail shows why checking the machine matters. The computer had Gradle 9.3.1 downloaded, too old for the chosen plugin. So the AI first used it to generate the Gradle launcher (the wrapper) set to version 9.7.1, and only then wrote the build files, which the older Gradle would not have loaded.
Order of work
The AI followed the order the brief prescribes: check the machine and versions, the Gradle skeleton, calculations with tests, first test run, storage, screens, building the APK and the emulator check.
Before the first run, while reading its own code, it noticed two typos in the tests and fixed them. Nothing was run at that point.
Three rounds of fixes
The first attempt to run the tests failed on a mistake in the AI’s own command (a wrong path for the output file), not in the project. Then came three rounds that concerned the project:
- A syntax error in
start.sh. The zsh shell could not handle the quotes inside an expression that read the test counts from the results. The AI rewrote the reading as a small helper function and checked the syntax withzsh -n. - Compose wanted a newer Android. Libraries from the newest Compose BOM required compileSdk 37.1; the machine had 37.0. The AI admitted in the log that it had checked these requirements for one library but not for Compose. It had two options: let Gradle download 37.1, or use an older BOM. It chose the older one, because the brief asks for the highest compileSdk installed on the machine. It changed one thing: the BOM version.
- The tests passed, the script failed. Gradle reported success and all 39 tests that existed at that point passed. But the script ended with an error: in zsh the expression
(( zlyhane += 0 ))returns status 1, and theset -esetting stops the script on it. The fix was a different way of writing the same calculation.
Two of the three rounds were in the helper script, not in the app. According to the log, the app code (Kotlin, resources, manifest) compiled on the first try.
The whole app: 43 tests and an APK without internet access
After storage and screens there were 43 tests. They passed, and the compiler reported no warning. The only warning came from manifest merging: the line that removes the INTERNET permission had nothing to remove, because no library adds it today. The AI kept it as a safeguard against future libraries, as the brief asks.
./start.sh apk produced a debug APK of 11,726 kB. It is large because it is not shrunk and contains the full Compose libraries. The script printed the permissions in the APK: INTERNET is not among them. The only permission there is added by the AndroidX library; it is the app’s own permission and gives access to nothing outside the app. The AI kept it and wrote down why.
At the end the AI noticed that the last test runs had not actually run: Gradle had taken their results from its cache. It forced a real run: 43 tests in six classes, none failed or skipped. According to the log, all tests passed the first time they ran, and no test or calculation was changed because of a failure.
The emulator check
The virtual phone running Android 17 booted in 5 seconds, because it resumed from a saved state. ./start.sh instaluj installed and launched the app.
The AI drove the app over adb: a list of elements on the screen, taps on coordinates and typed text. This is what it checked:
- the empty list with a sentence on how to add the first entry,
- texts first in English (the emulator’s language), then the app language switched to Slovak on its own,
- a weight of 82,456 showed an error right at the field (“at most 2 decimals”) and the entry was not saved,
- the date picked from a calendar in which future days cannot be selected,
- two weight entries dated 9 and 23 November 2026, both in the app’s data file,
- the decimal comma in Slovak, both when typing and on display,
- the chart with one entry shows a sentence, with two a line; the screen reader description has the quantity, the number of points and the dates,
- editing an entry and closing it with Back without saving,
- deleting with confirmation and undoing with “Späť” (Undo) in the bar, with the entry’s original data,
- the Settings screen.
Not everything went smoothly here either. The first Back while editing did not close the form. According to the log, the keyboard most likely consumed it, because the brief’s instruction for hiding it probably did not hide it on this emulator. The AI’s next tap on coordinates therefore hit the trash icon and opened the delete dialog. The AI cancelled it, checked that the keyboard was hidden, and the second Back closed the form. The unfinished change was not saved.
The check produced nine screenshots.
A log that found itself
At the end the AI ran the checks from the definition of done: the interface texts must not contain words like BMI, calories or congratulations, and the project must not contain a path with the user name. It also searched for em and en dashes. Nothing was found. After finishing the log it ran the path and dash checks again, and both found something, in the log itself: the log quoted the search string word for word, so the check found its own quotation. A dash got into the log twice through a character-code notation that turned into the real character on saving.
The fix: the search strings are described in words in the log. The app code did not change. At 19:42 both checks passed.
What was not checked
The log lists it itself:
- export and import through the system file dialog; the logic is covered by tests, the actual system call is not,
- the backup before import and setting aside a corrupted file on the device, checked only in tests on the computer,
- switching measurements and theme by tapping, the measurement chart and the English decimal point on a device,
- the screenshots come from an emulator without a window,
- a physical phone. The brief forbids it to the AI; a human installs the app on a phone.
So the app is checked on the emulator, not on a phone.
What I would change in the brief
These are my conclusions from the log, not its entries. For the build to go through without fixes, it would help to have:
- A requirements check for every library. Add to part 5 that for every library the compileSdk it requires has to be checked. That would have saved the Compose round.
- A script check before the first run. Two rounds were in the script. An instruction to check the syntax before the first run (
zsh -n) would have caught the first; theset -etrap would only show up when running. - A forced test run. The definition of done should ask for tests that actually ran, not a result from the cache. The AI itself put this into its ideas for later.
- A check that does not find the log. The path check also searches the folder with the log. It is enough for the brief to say that the log describes search strings in words.
- Emulator with or without a window, stated in the brief. An instruction outside the brief contradicted the brief. One place is better.
How to get the app onto your own phone
These steps are from the guide the AI wrote for the app:
- On the phone, turn on Developer options: Settings > About phone > tap Build number 7 times.
- In Developer options, turn on USB debugging.
- Connect the phone with a cable and confirm “Allow USB debugging” on the phone.
- Run one command:
cd ~/projekty/dennik-vahy/kod
./start.sh instaluj
If several devices are connected, the device is chosen like this:
ANDROID_SERIAL=<name from the list> ./start.sh instaluj
The script finds Java and the Android SDK by itself. In the English brief the command is called ./start.sh install. What caught me out on a Samsung with the pen app is in part four.
There is no app code or APK to download here. The app is built by each person from part ten. The whole process is also in a video on YouTube, in Slovak; the voice in it is AI-generated from my own.
I prepared this text with the help of AI from my own notes and the build log.