Skip to content

chore(eas): give each build profile its backend, and refuse a local one - #76

Merged
PapiCuche merged 1 commit into
mainfrom
chore/eas-qa-builds
Oct 20, 2026
Merged

PapiCuche merged 1 commit into
mainfrom
chore/eas-qa-builds

Conversation

@PapiCuche

Copy link
Copy Markdown
Owner

The EAS profiles existed and said nothing about which server they talk to, so every build inherited whatever .env happened to be on the machine that made it. A QA build is only worth having if you know what it points at.

Each profile now declares it

development   no API URL — inferred from the Metro host (Django on the dev's own machine)
preview       https://blackdogstoreperu.com
production    https://blackdogstoreperu.com

These are public values and they are in the file on purpose. EXPO_PUBLIC_* is inlined into the JS bundle — client configuration, not a secret — and the host is the storefront anybody can open. In the file it is reviewable and travels with the commit that built it. Secrets stay out of EXPO_PUBLIC_* entirely, as the config module already states.

A distributed build may not point at a local machine

localhost baked into a preview binary is the developer's laptop as seen from somebody else's phone: every request fails, or worse, reaches whatever answers on that port on their network. A release build resolving to a local-only host — localhost, 127.0.0.1, 0.0.0.0, the Android emulator's 10.0.2.2, anything .local — now resolves to no API at all, so the app says it is unconfigured once and loudly instead of failing one request at a time. Development is exempt: a local backend is the point there.

⚠️ Risk to flag before QA

There is no staging host and no QA tenant — I probed staging./qa./dev.blackdogstoreperu.com (all unreachable) and the demo/qa/test/sandbox tenant slugs (all 404). So preview points at production, with real customer data. Preview builds should be used for read-only smoke; anything destructive (sales, refunds, stock moves, service delivery) belongs on a local backend via the development profile, which is how the current QA flow already works.

Kept as the project had it

Profile names are the project's own (ios-simulator, not a second development-simulator), base still pins Node 24.16.0 so a bundle that passes CI is built the same way, and the bundle id / package / projectId are untouched.

Checks

  • 109 suites / 2045 tests (6 new on the guard)
  • tsc --noEmit clean, eslint 0 errors, expo-doctor 21/21
  • expo export ios + android pass
  • eas config resolves all profiles with their env

🤖 Generated with Claude Code

The EAS profiles existed and said nothing about which server they talk to, so
every build inherited whatever `.env` happened to be on the machine that made
it. A QA build is only worth having if you know what it is pointing at.

Each profile now declares it:

  development   no API URL — inferred from the Metro host, which is how a dev
                build reaches Django on the developer's own machine
  preview       https://blackdogstoreperu.com
  production    https://blackdogstoreperu.com

THESE ARE PUBLIC VALUES AND THEY ARE IN THE FILE ON PURPOSE. `EXPO_PUBLIC_*` is
inlined into the JavaScript bundle; it is client configuration, not a secret,
and the host is the storefront anybody can open. In the file it is reviewable
and it travels with the commit that built it. Secrets stay out of
`EXPO_PUBLIC_*` entirely, which the config module already says.

AND A DISTRIBUTED BUILD MAY NOT POINT AT A LOCAL MACHINE. `localhost` baked
into a preview binary is the developer's laptop as seen from somebody else's
phone: every request fails, or worse, reaches whatever answers on that port on
THEIR network. A release build that resolves to a local-only host — localhost,
127.0.0.1, 0.0.0.0, the Android emulator's 10.0.2.2, anything `.local` — now
resolves to NO api at all, so the app says it is unconfigured, once and
loudly, instead of failing one request at a time. Development is exempt,
because that is exactly where a local backend is the point.

The profile names are the project's own (`ios-simulator`, not a second
`development-simulator`), and `base` keeps pinning Node 24.16.0 so a bundle
that passes CI is built the same way.

Four scripts for the builds people actually run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PapiCuche
PapiCuche merged commit 80468fa into main Oct 20, 2026
3 checks passed
@PapiCuche
PapiCuche deleted the chore/eas-qa-builds branch October 20, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant