Repository navigation
test(prepush): catch expo autolinking version skew before it breaks the web deploy - #506
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
prepush.shexcludes thescaffaldbuild 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.ymlis the only workflow that runsexpo export.ci:fulllabel — which dependency PRs never get.expo-modules-autolinkingbelow what the installed@expo/cliexpects reachedmain, and every web deploy died at Metro config time withgetSupportPackageForPlatform 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/clicalls onexpo/internal/unstable-autolinking-exportsactually 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:
56.0.12overridegit pushrefuses ✅56.0.21❌ Pre-push validation FAILED — expo-autolinking, stamp withheld ✅Full
pnpm prepushpasses in 8s with the guard added.expo-doctorwas tried first and does not catch this. It validates declared dependencies against the SDK;expo-modules-autolinkingis 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
prepushrather than a workflow is deliberate: it runs today, on every push, regardless of the billing state.Refs #501
🤖 Generated with Claude Code