Skip to content

test(prepush): catch expo autolinking version skew before it breaks the web deploy - #506

Merged
thinkclay merged 1 commit into
mainfrom
claude/prepush-expo-autolinking-guard
Jul 30, 2026
Merged

thinkclay merged 1 commit into
mainfrom
claude/prepush-expo-autolinking-guard

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Why

prepush.sh excludes the scaffald build because the Metro web export takes minutes, on the stated assumption that "CI covers it on the deploy path." #501 showed that assumption does not hold:

  • lighthouse-ci.yml is the only workflow that runs expo export.
  • On pull requests it fires only for PRs carrying the ci:full label — which dependency PRs never get.
  • So a pnpm override pinning expo-modules-autolinking below what the installed @expo/cli expects reached main, and every web deploy died at Metro config time with getSupportPackageForPlatform is not a function — after lint, typecheck and unit tests had all gone green.

It was caught by hand during the 2026-07-30 staging deploy, which is later than it should be.

What

Assert that the three functions @expo/cli calls on expo/internal/unstable-autolinking-exports actually exist. That is precisely the interface whose drift caused #501, it costs ~1s, and it needs no bundler. It's a smoke test of the interface, not a replacement for the export.

Verification

Tested in both directions against the real dependency tree, not just reasoned about:

State Result
Reinstalled at the broken 56.0.12 override check fails, no stamp written → git push refuses ✅
Current 56.0.21 check passes ✅
Failure wiring (forced missing symbol) ❌ Pre-push validation FAILED — expo-autolinking, stamp withheld ✅

Full pnpm prepush passes in 8s with the guard added.

expo-doctor was tried first and does not catch this. It validates declared dependencies against the SDK; expo-modules-autolinking is transitive via a root pnpm override, so it stays invisible to that check. Worth recording so nobody reaches for it again.

Note on CI

Actions remains billing-blocked, so checks on this PR will not be meaningful — verification above is local. Putting the guard in prepush rather than a workflow is deliberate: it runs today, on every push, regardless of the billing state.

Refs #501

🤖 Generated with Claude Code

…he web deploy

prepush excludes the `scaffald` build because the Metro web export takes
minutes, on the stated assumption that "CI covers it on the deploy path."
#501 showed that assumption does not hold. Lighthouse CI is the only workflow
that runs `expo export`, and on pull requests it fires only for PRs labelled
`ci:full` — which dependency PRs never get. A pnpm override pinning
expo-modules-autolinking below what the installed @expo/cli expects therefore
reached main, and every web deploy died at Metro config time with
`getSupportPackageForPlatform is not a function`, having passed lint,
typecheck and unit tests on the way in.

Assert instead that the three functions @expo/cli calls on the autolinking
re-export actually exist. That is the interface whose drift caused #501, it
runs in about a second, and it needs no bundler.

Verified both directions against the real thing: reinstalled at the broken
56.0.12 override the check fails and no stamp is written, so `git push`
refuses; at the current 56.0.21 it passes. expo-doctor was tried first and
does NOT catch this — it validates declared dependencies, and
expo-modules-autolinking is transitive via a root override, so it is invisible
to that check.

Refs #501

Co-Authored-By: Claude Fable 5 <[email protected]>
@thinkclay
thinkclay merged commit ae602cf into main Jul 30, 2026
5 of 7 checks passed
@thinkclay
thinkclay deleted the claude/prepush-expo-autolinking-guard branch July 30, 2026 19:31
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