Munchable is an Expo app: a barcode scanner for people with gut conditions, with the rules that decide a verdict running on the phone rather than on a server. The verdict being local is the privacy design, written up at munchable.app/privacy, and it has a release-engineering consequence I did not think about until I had to ship a correction.
If the rules live on the device, then fixing a rule means changing the app. And changing the app normally means a store review.
Here is the entire mechanism that gets around that, in app.json:
"runtimeVersion": { "policy": "fingerprint" },
"updates": { "url": "https://u.expo.dev/92dbacdc-4b9d-4731-9987-17ab0204d709" }
Two keys. Below that, the audit that prompted this post:
$ grep -rn "expo-updates\|Updates\." apps/mobile/app apps/mobile/src
$ echo $?
1
Nothing. expo-updates is one of the app's 40 runtime dependencies, it is in the dependency tree because I put it there deliberately, and not one of the 104 TypeScript files in the app imports it or calls it.
What the two keys do on their own
The native module reads that config at launch, asks the URL whether there is a newer JavaScript bundle for this build, and downloads one if there is. With the defaults left alone, which is what no code means, the check happens on load and the downloaded bundle is used from the next cold start. The user sees nothing. There is no "update available" banner because there is no code to render one, and no forced reload because nobody calls one.
So the honest description of our update story is: the app silently becomes current, roughly one launch late, and the app itself has no idea any of this is happening.
That is a real trade-off and I will come back to it.
Three delivery paths, three latencies
The same codebase reaches users three ways, and the interesting part is how far apart they are in time.
1. The web app. The Expo app is also served on the web through react-native-web, on its own subdomain, as a single-page build. A push deploys it. Latency: a build, call it two minutes, and the next page load has it.
2. An installed Android build, JavaScript only. This is the EAS Update path. Latency: a manual workflow run plus one app launch.
3. An installed build, anything native. A new binary and a store review. Latency: days.
Every change belongs to exactly one of those lanes, and nothing in the repository tells you which. The thing that decides is the fingerprint.
The fingerprint is the fence
runtimeVersion: { policy: "fingerprint" } means the runtime identity of a build is a hash computed from its native inputs: the config, the native dependencies, the plugins, the patches. An update is only offered to installed builds whose fingerprint matches the one the update was published from.
That one line is what makes the whole arrangement safe, because the failure it prevents is the bad one. A JavaScript bundle that expects a native method the installed binary does not have is a crash on launch, shipped to everybody, with no store review in the way to catch it. The fingerprint turns that into "no update offered", which is boring and correct.
It also means the lanes are not a judgement call. The app carries a 221-line patch to expo-camera that adds tap to focus, made of Kotlin, Swift and a compiled JavaScript file. Editing one line of that patch changes the fingerprint, so it cannot ride lane two, whatever it looks like in a diff. Our CI comment says it in one sentence:
# Over-the-air JS/asset update - ship rules-engine tweaks without a store review.
# Only reaches installed builds whose native runtimeVersion (fingerprint) matches;
# a change that touches native code needs a new build, not an update.
And the reason a rules change does fit in lane two is a workspace decision made for a different reason entirely: the five shared packages in this monorepo have no build step. They are TypeScript that Metro and Next compile directly. There is no compiled artefact to rebuild and nothing native in the chain, so a correction to a condition rule is, to the update system, exactly as boring as changing a label on a button.
The pipeline is deliberately not automatic
The update workflow has one trigger:
on:
workflow_dispatch:
inputs:
branch:
description: EAS Update branch to publish to
type: choice
options: [development, preview, production]
default: preview
No push trigger. Merging to the default branch publishes nothing to anybody's phone, and the default selection in the dispatch form is preview rather than production, so the laziest possible use of the form cannot reach a user.
I keep going back and forth on this. Auto-publishing on merge is the pitch for OTA updates, and manual dispatch throws away most of the speed. But the asymmetry decides it: lane two bypasses every external check that exists. There is no review, no staged rollout by default, and no store to slow a mistake down. If the only remaining gate is me, then the gate should at least require me to open a page and pick an option.
eas.json holds the other half: four build profiles against three channels, with the channel names matching the update branch names, and one line that moves the version out of the repository.
"production": { "autoIncrement": true, "channel": "production", "environment": "production" }
With appVersionSource: "remote", the build number lives on EAS servers rather than in a file, which is right (two machines cannot race it) and has an odd consequence: the repository cannot tell you what the last production build was numbered. app.json still says "version": "0.1.0", and that string is the only version the repo knows about.
The two things I found while writing this up
First, the setup instruction for linking channels to branches lives in a comment, as a command a human runs once:
# eas channel:edit <name> --branch <name>
A one-time manual step recorded in a comment is a fine way to lose a day, in the specific case where someone has to recreate the project.
Second, and worse, the store link on the website is still a placeholder, and it does not agree with the app:
// apps/web/lib/app-links.ts
export const PLAY_STORE_URL =
'https://play.google.com/store/apps/details?id=app.munchable';
// apps/mobile/app.json
"android": { "package": "app.munchable.mobile" }
app.munchable against app.munchable.mobile. The comment above the constant says to replace the placeholder once the app is published, which is honest, and it still means the one identifier connecting the website to the binary is wrong in a file nothing cross-checks. Everything in this post is about the pipeline being careful with the fingerprint, and the link a human actually clicks is off by a suffix. The two Expo configuration keys cannot help with that; this is exactly the class of fact I have argued belongs in a test rather than in prose, and now I get to take my own advice.
Would I add the code back?
The argument for importing expo-updates is a user-facing one: tell somebody an update is ready and offer a restart, instead of letting them run last week's rules until they happen to cold start. For a health-adjacent app that is a real consideration. A rule correction is the kind of change you would rather not deliver at the system's convenience.
The argument against is that every version of that UI is a dialog in front of a shopping trip. The app's whole promise is a fast answer at a shelf, and "an update is available" is the opposite of that.
Where I have landed, for now: no UI, and the mitigation is lane discipline instead. Keep the native surface small so lane two stays wide, and keep the engine deterministic and local so that a correction is JavaScript rather than a protocol change. The update mechanism staying out of the app's code is not an oversight. It is the only version of it that does not interrupt somebody in an aisle.
The output of the engine all of this exists to correct is readable on the web, no install required: munchable.app/conditions has a guide per condition, and munchable.app has the app link, placeholder suffix and all, until the real listing replaces it.
Top comments (0)