Skip to content

fix(deps): align the Expo catalog with SDK 56's current patch set - #908

Merged
thinkclay merged 1 commit into
mainfrom
fix/expo-catalog-alignment
Sep 25, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/expo-catalog-alignment

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #907.

expo install --check resolves expected versions from Expo's live registry, not from anything in the repo. When Expo cut the SDK 56 patch set below, the Monorepo integrity job started failing on every branch at once. That job is gated on deps == 'true', so only dependency PRs ever run it — which made it look as though each of the five open Dependabot PRs was individually broken. #853 bumps adm-zip and nothing else, and failed identically to #871's twelve-package group.

Catalog pins

Package From To
expo ~56.0.21 ~56.0.22
expo-constants ~56.0.25 ~56.0.26
expo-dev-client ~56.0.26 ~56.0.27
expo-image ~56.0.12 ~56.0.13
expo-linking ~56.0.17 ~56.0.18
expo-location ~56.0.25 ~56.0.26
expo-router ~56.2.20 ~56.2.21
expo-updates ~56.0.26 ~56.0.27

Patch-level within SDK 56. Not #483 — that is the coordinated 56 → 57 bump and is untouched here.

The @expo/router-server patch had to move with it

This is the part worth reviewing properly.

[email protected] pulls @expo/cli@^56.1.26, which wants @expo/router-server@^56.0.19. The #797/#803 patch was pinned at 56.0.18, so it stopped applying and pnpm refused the install outright:

ERR_PNPM_UNUSED_PATCH  The following patches were not used: @expo/[email protected]

Half of that patch is now upstream. I pulled the 56.0.19 tarball and read it: it drops bootstrapScripts from renderToReadableStream and injects createInjectedScriptAsNodes into head and body, carrying its own note that React's bootstrapScripts emits async scripts while Metro chunks must be ordered. That is the half that stopped the route-split build dying with Requiring unknown module.

The fetchPriority="low" half is not upstream. 56.0.19's createInjectedScriptAsNodes still emits a plain <link rel="preload" as="script">. Without the attribute the 1.5 MB shared chunk preloads at default priority, contends with fonts, and first paint slips from 2 s to 10 s on a throttled connection (#797).

So the patch is re-targeted to 56.0.19 and reduced to that one hunk — 53 lines down to 16. Dropping it entirely would have silently undone half of #803 with a green CI.

Verification

Checked in the exported server bundle, not just in node_modules, because this is a runtime-only failure mode that typecheck cannot see:

$ grep -o '.\{80\}script-src-' dist/server/_expo/server/render.js
`script-preload-${t}`)),bodyNodes:t.map(t=>(0,s.jsx)("script",{defer:!0,src:t},`script-src-
$ grep -c 'fetchPriority:"low' dist/server/_expo/server/render.js
3

Preload links carry fetchPriority:"low", body script nodes carry defer. The remaining bootstrapScripts strings in that file are react-dom's own server internals, not an expo call site.

Also:

  • pnpm exec expo install --check → Dependencies are up to date
  • pnpm dedupe --check → clean
  • pnpm prepush → build for 9 projects, Deno suites load, autolinking exports match the installed CLI, overrides/catalog aligned, migration checks pass

After this lands

#853, #868, #869 and #871 should clear Monorepo integrity. #870 will not — it has a real failure of its own, 9 tests in profile-employment-left.test.tsx broken by zod 4.1.13 → 4.6.5; see the comment there.

#907 also raises the structural question, which this PR does not answer: the gate reads a live registry, so it will drift red again on the next Expo patch with no warning, and the queue will stall the same way.

🤖 Generated with Claude Code

`expo install --check` resolves expected versions from Expo's live registry,
so when Expo cut the SDK 56 patch set below, the Monorepo integrity job
started failing on every branch at once. That job is gated on `deps ==
'true'`, so only dependency PRs run it — which made it look as though each
of the five open Dependabot PRs was individually broken. #853 bumps
`adm-zip` alone and failed identically.

Catalog pins moved to what the registry expects:

    expo            ~56.0.21 -> ~56.0.22
    expo-constants  ~56.0.25 -> ~56.0.26
    expo-dev-client ~56.0.26 -> ~56.0.27
    expo-image      ~56.0.12 -> ~56.0.13
    expo-linking    ~56.0.17 -> ~56.0.18
    expo-location   ~56.0.25 -> ~56.0.26
    expo-router     ~56.2.20 -> ~56.2.21
    expo-updates    ~56.0.26 -> ~56.0.27

Patch-level within SDK 56. This is not #483, the coordinated 56 -> 57 bump.

## The @expo/router-server patch had to move with it

`[email protected]` pulls `@expo/cli@^56.1.26`, which wants
`@expo/router-server@^56.0.19` — so the #797/#803 patch pinned at 56.0.18
stopped applying and pnpm refused the install with ERR_PNPM_UNUSED_PATCH.

Half of that patch is now upstream. 56.0.19 ships the module-ordering fix
itself: it drops `bootstrapScripts` from `renderToReadableStream` and
injects `createInjectedScriptAsNodes` into head and body, carrying its own
note that React's bootstrapScripts emits async scripts while Metro chunks
must be ordered. That is the half that stopped the route-split build dying
with "Requiring unknown module".

The `fetchPriority="low"` half is not upstream. Without it the 1.5 MB
shared chunk preloads at default priority, contends with fonts, and first
paint slips from 2 s to 10 s on a throttled connection (#797). So the patch
is re-targeted to 56.0.19 and reduced to that one hunk.

Verified in the exported server bundle, not just in node_modules: a web
export puts `fetchPriority:"low"` on the preload links and `defer` on the
body script nodes in `dist/server/_expo/server/render.js`. The remaining
`bootstrapScripts` strings in that file are react-dom's own server
internals, not an expo call site.

Also checked: `expo install --check` reports up to date, `pnpm dedupe
--check` is clean, and `pnpm prepush` passes (build for 9 projects, Deno
suites load, autolinking exports match, overrides/catalog aligned).

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay

Copy link
Copy Markdown
Contributor Author

Scope note on what this PR's verification does not cover.

These eight packages include expo, expo-updates and expo-dev-client, which carry native code, and nothing in CI builds the iOS or Android app. What I actually exercised is the JS side: the web export, typecheck/build across 9 projects, and prepush's Checking Expo autolinking exports match the installed CLI — which is the repo's guard that native module registration still lines up, and it passes. No simulator or EAS build was run.

Patch-level within SDK 56 makes that low risk, and Expo's own install --check is asserting these are the versions that belong together. But if this lands close to a native release, a dev-client build on the simulator before ship:ios is the cheap confirmation — particularly for expo-updates, where a mismatch shows up at OTA time rather than at build time.

@thinkclay

Copy link
Copy Markdown
Contributor Author

The Unit tests red on the first run was the #753 flake, not this change. Verified rather than assumed:

  • The single failure was profile view tracking > the old shape really did loop — the guard above is not vacuous — a test that deliberately renders the old looping component and asserts it re-renders more than 20 times inside a 120 ms settle(). It failed with a stack-overflow error, i.e. it looped harder than the window could absorb. Timing-sensitive by construction.
  • It passes 3/3 locally on this exact branch.
  • Re-ran the job with no code change: green.

Worth noting why it surfaced here and not on main: CI runs Test (affected), and touching pnpm-workspace.yaml and the lockfile makes every project affected. So this PR runs tests that a normal feature PR does not — which is how a latent flake in apps/scaffald ends up looking like an Expo regression. Adding it as evidence to #753.

Both substantive jobs — Lint, typecheck & build and Monorepo integrity — passed on the first run. Merging.

@thinkclay
thinkclay merged commit 5ef0818 into main Sep 25, 2026
13 of 14 checks passed
@thinkclay
thinkclay deleted the fix/expo-catalog-alignment branch September 25, 2026 22:20
thinkclay added a commit that referenced this pull request Sep 26, 2026
…ock (#753) (#915)

`profile-view-tracking` and `results-view-xp` each keep a "the old shape
really did loop" case beside the fix, so the guard above it cannot pass
vacuously. Both did it by rendering the broken component, waiting a fixed
120 ms, and asserting the effect had re-entered more than 20 times.

That made the result a function of how fast the machine was, and the loop is
not slow. Measured locally it re-enters the effect **6,143 times in 60 ms**.
Letting that run for a fixed window is enough to take the vitest worker down
with it — `Error: Worker exited unexpectedly`, surfaced as
`STACK_TRACE_ERROR` against whichever test happened to be in flight.

That is the #753 flake. Both suites failed exactly that way tonight on
unrelated PRs and passed on a plain re-run:

    #908  profile view tracking > the old shape really did loop
    #870  results view XP      > the old shape really did loop

They surface on dependency PRs specifically because CI runs
`Test (affected)`, and a lockfile change makes every project affected — so
`apps/scaffald`'s suite runs when an ordinary feature PR would not. Each one
first read as a regression from the bump.

## The assertion never needed a clock

Knowing the effect re-enters itself without a terminating condition is what
the test is for, and 25 iterations establish that as well as six thousand.
`unbounded-loop-probe.ts` counts calls, stops the loop the instant it reaches
`LOOP_CAP`, and resolves. Fast machine or slow, the work is the same and
nothing runs away. The two cases now finish in ~11 ms rather than 120 ms+.

`shouldStop` is the *test's* bound, not a fix to the shape under test: the
effect still has no terminating condition of its own, and the probe only
trips it once the loop has already proved itself.

## The guard still guards

A stall is now the interesting failure — it means the old shape stopped
looping, so react-query changed its identity semantics and the reasoning
behind the fix needs revisiting. `settled()` races the loop against a 2 s
deadline so that case is a readable assertion rather than a suite timeout.

Verified by mutation: replacing `Looping`'s unstable mutation object with the
stable `mutate` makes it fail with

    AssertionError: expected 'stalled' to be 'looped'

rather than passing. The 2 s is only paid when the test is about to fail.

Ran the pair six times: 6/6 green each time. `scaffald-app` full suite 98
passed / 0 failed; typecheck and lint clean.

Co-authored-by: Claude Opus 5 <[email protected]>
thinkclay added a commit that referenced this pull request Sep 26, 2026
…eiting rebase (#907) (#917)

Two independent things stalled the whole Dependabot queue on 2026-09-25, and
neither was about any PR's contents.

## 1. The Expo gate asked the wrong question

`expo install --check` resolves expected versions from Expo's LIVE REGISTRY,
so it answers "are you on the newest patch set?" — currency — rather than "do
your Expo packages agree with each other?" — skew. Only the second ships bugs.

Because Monorepo integrity is gated on `deps == 'true'`, only dependency PRs
run it. So when Expo published an SDK patch set, all five open Dependabot PRs
went red at once: a PR bumping only `adm-zip` failed identically to a
twelve-package group. #908 realigned the catalog by hand; nothing stopped it
recurring on the next Expo patch.

`scripts/check-expo-alignment.mjs` reads `bundledNativeModules.json` from
INSIDE the installed expo package, which lists the versions belonging with
THAT expo. Offline, version-locked, and about skew only — a registry publish
cannot turn it red. Being a patch behind is no longer a build failure; being
internally inconsistent still is.

Verified both directions: setting expo-image to 56.0.9 — the exact #683
version — fails with `installed 56.0.9 expected ~56.0.13`, and restoring it
passes.

It also closes a hole. `expo install --check` only inspects the app's DIRECT
dependencies, so it never looked at `expo-modules-core` — the package #683 was
actually about, held by a root `pnpm.overrides` entry. The new check walks the
installed tree and immediately found it 4 patches below the bundled set, a gap
that predates #908. Override-pinned skew is an explicit human decision, so it
is reported rather than failed on; see #916. Unpinned skew — Dependabot
drifting one package — still fails hard.

Currency is still worth knowing, and the catalog really was eight packages
behind with nothing saying so. `expo-currency-audit.yml` asks the registry on
Sundays, ahead of Dependabot's Monday wave, and keeps one reusable issue open
while the lag lasts. Non-blocking, with its own signal instead of ambushing an
unrelated PR.

## 2. The dedupe job made Dependabot refuse to rebase

`dependabot-dedupe.yml` pushes a `chore(deps): pnpm dedupe` commit — its whole
purpose (#701, #724), and Monorepo integrity fails without it. Committed as
github-actions[bot], that commit made Dependabot answer every rebase with:

    Looks like this PR has been edited by someone other than Dependabot.
    That means Dependabot can't rebase it - sorry!

So deduping, which a Dependabot PR requires in order to pass, permanently
forfeited that PR's ability to rebase. Any PR that did not merge before main
moved under it was stuck, and the only escape was `@dependabot recreate`,
which discards the dedupe commit and restarts the cycle. Clearing five PRs
took six recreate rounds for exactly this reason.

The commit is now authored as dependabot[bot], keeping the branch
Dependabot-owned. The message still names the workflow that made it, so
provenance is not hidden. This one cannot be verified until a live Dependabot
PR exists — the next wave is Monday — so the fallback is written into the
workflow: `@dependabot recreate` still works, and the alternative is to stop
pushing a commit at all and run `pnpm dedupe` inside the integrity job.

Co-authored-by: Claude Opus 5 <[email protected]>
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.

ci: every dependency PR fails Monorepo integrity on expo install --check, which none of them caused

1 participant