Skip to content

mobile: auto-rebuild Dev Tool native client on fingerprint change#8797

Merged
aapeliv merged 1 commit into
mobile/v1.1.20from
mobile/feature/devtool-native-rebuild-ci
May 24, 2026
Merged

mobile: auto-rebuild Dev Tool native client on fingerprint change#8797
aapeliv merged 1 commit into
mobile/v1.1.20from
mobile/feature/devtool-native-rebuild-ci

Conversation

@aapeliv

@aapeliv aapeliv commented May 24, 2026

Copy link
Copy Markdown
Member

Adds CI machinery to rebuild the Dev Tool native client automatically when its Expo fingerprint changes — the ~5% case the per-branch OTA pipeline can't serve (a fingerprint mismatch makes the dev client silently ignore branch bundles, so the installed client itself must be rebuilt). Pure JS/TS changes are unaffected; they still load over the air.

How it works — new build:devtool-native job (app/.gitlab-ci.yml) runs on $DEVTOOL_BUILD_BRANCH (set to mobile/v1.1.20 while validating; switch to develop once trusted) and calls app/mobile/scripts/devtool-build.sh per platform:

  1. Computes the Expo fingerprint (same expo-updates fingerprint:generate + .fingerprintignore the OTA pipeline uses, so it matches the EAS build).
  2. Compares it to the last-built fingerprint at s3://$AWS_PREVIEW_BUCKET/devtool-builds/<platform>.fingerprint. Unchanged → no-op. Changed → build on EAS.
  3. iOSeas build --profile devtool --auto-submit → TestFlight. Androideas build --profile devtool-apk (new profile: extends devtool, internal distribution, APK); CI downloads the artifact and publishes an immutable couchers-devtool-<sha>.apk + a stable index.html to devtool-builds/android/, served at https://android--devtool-builds.preview.couchershq.org/. Google Play has no TestFlight-equivalent for a dev-client APK, so we self-host it.
  4. Writes the fingerprint marker only after a successful build, so a failed build is retried next pipeline.

Also removes the now-dead submit.devtool.android (Play) config and repoints the manual release:android:devtool script at the APK profile.

Requires an EXPO_TOKEN CI variable (Expo robot token, build + submit scope) before the job can run. No Play credentials needed.

Testing

Not yet run end-to-end — needs EXPO_TOKEN in CI. Validated locally:

  • bash -n on the script; json_field helper parses both the fingerprint (.hash) and eas build --json ([0].artifacts.applicationArchiveUrl) shapes
  • eas.json / package.json valid JSON and prettier-clean; .gitlab-ci.yml parses; devtool-apk profile present, submit.devtool.android removed
  • First real run on mobile/v1.1.20 after EXPO_TOKEN is added: confirm a no-op when the fingerprint is unchanged, a build + TestFlight submit (iOS) and APK publish (Android) when it changes, and the stable Android URL serves the APK
  • Confirm the android--devtool-builds.preview.couchershq.org host resolves through the existing preview CDN (the tools/lambdas/ aren't in this checkout; relies on the same <a>--<b> → /<b>/<a> mapping OTA uses)

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

This PR was created with the Couchers PR skill.

Add a fingerprint-gated CI job (build:devtool-native) that rebuilds the Dev
Tool dev client only when its Expo fingerprint changes — the ~5% case OTA
can't serve. iOS auto-submits to TestFlight; Android builds a sideloadable
APK (new devtool-apk profile) that CI self-hosts on the dev-assets bucket,
since Google Play has no TestFlight-equivalent for a dev-client APK.
@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview May 24, 2026 8:14pm

Request Review

@CouchersBot

CouchersBot commented May 24, 2026

Copy link
Copy Markdown
Member

Preview builds

Mobile Dev Tool preview

Scan the QR with your phone camera, or tap Open in Dev Tool on the device, to open this branch in the installed Dev Tool dev client.

iosOpen in Dev Tool

QR to open the ios build

Deep link
couchers-devtool://expo-development-client/?url=https%3A%2F%2F4fda5a60--ota.preview.couchershq.org%2Fios%2Fmanifest

androidOpen in Dev Tool

QR to open the android build

Deep link
couchers-devtool://expo-development-client/?url=https%3A%2F%2F4fda5a60--ota.preview.couchershq.org%2Fandroid%2Fmanifest

commit 4fda5a60 · pipeline

@aapeliv
aapeliv marked this pull request as ready for review May 24, 2026 21:44
@aapeliv
aapeliv requested a review from nabramow as a code owner May 24, 2026 21:44
@aapeliv
aapeliv merged commit 43877fb into mobile/v1.1.20 May 24, 2026
6 checks passed
@aapeliv
aapeliv deleted the mobile/feature/devtool-native-rebuild-ci branch May 24, 2026 21:45
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR does not need to be included in release notes.

Reason: This PR adds internal CI automation for rebuilding the mobile Dev Tool native client when needed. It affects developer workflow and preview infrastructure rather than functionality visible to end users, and it does not represent a user-facing feature or broadly important platform change for members using Couchers.

🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: This PR adds internal CI automation for rebuilding the mobile Dev Tool native client when needed. It affects developer workflow and preview infrastructure rather than functionality visible to end users, and it does not represent a user-facing feature or broadly important platform change for members using Couchers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants