Skip to content

fix(build): resolve production deploy failures and stale vault ABI - #701

Draft
collinsezedike wants to merge 11 commits into
mainfrom
fix/vercel-production-build
Draft

fix(build): resolve production deploy failures and stale vault ABI#701
collinsezedike wants to merge 11 commits into
mainfrom
fix/vercel-production-build

Conversation

@collinsezedike

@collinsezedike collinsezedike commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Production has failed to deploy on every merge to main since #635, roughly 14 hours as of this PR's start. Two separate, independent problems, both now fixed here.

1. Build pipeline (Vercel deploy failures)

Three stacked issues, each confirmed via full local reproduction:

  • The production web-app build was crashing with Rolldown failed to resolve import "tslib", a transitive dependency of @creit.tech/xbull-wallet-connect (feat(wallet): add XBullWallet adapter #598) that rxjs needs but wasn't reliably linkable under pnpm. Fixed by adding tslib as a direct dependency and hoisting it via .npmrc.
  • scripts/build-vercel.sh never generated .d.ts files for packages/shared/packages/api-core/packages/stellar-sdk-helpers, even though package.json#types assumed they existed. Fixed by generating real declarations and pointing types at them.
  • The actual deployment blocker, found only after ruling out caching and code as causes (a redeploy of the exact last-known-good commit, cache-free, reproduced the same failure): the project is on Vercel's Hobby plan, capped at 12 Serverless Functions per deployment. api/**/*.ts had grown to 12+ files as the admin dashboard and keeper endpoints were added. Fixed by consolidating related routes into fewer files using Vercel's dynamic segment routing ([action].ts/[resource].ts) — 12 functions down to 6, with URL paths unchanged so no frontend changes were needed.

The recurring error TS2305: has no exported member lines visible in deploy logs are a separate, confirmed-cosmetic quirk of Vercel's isolated per-function TypeScript check — they appear identically on both successful and failed deploys and were never the actual blocker. Tracked separately for later cleanup, not addressed in this PR.

2. Stale vault contract ABI

Once the build pipeline was fixed and the app actually reached testnet, deposits failed simulation with HostError: Error(WasmVm, UnexpectedSize). The testnet vault predated both #604 (deposit() gained a required min_shares_out parameter) and #606 (begin_migration/two-phase migration), so the live contract's two-argument deposit() didn't match the frontend's three-argument call. #602 tracked the redeploy that covered #600's earlier withdraw() change and closed before #604/#606 merged, so this gap was never caught.

Fixed by redeploying the vault, Blend adapter, and mUSDC via scripts/deploy-testnet.sh, updating CONTRACT_ADDRESSES/KNOWN_POOLS to the new contract IDs, and documenting the cutover in testnet-deployment.md's "Vault migration history" (old vault held zero outstanding deposits at cutover, so no withdrawal-announcement window was needed).

Test plan

  • Fresh pnpm install (deleted node_modules entirely) + full bash scripts/build-vercel.sh completes successfully end to end
  • pnpm typecheck, pnpm typecheck:api, pnpm lint, pnpm test all pass
  • Production preview deploy for this branch succeeded (confirmed via vercel inspect showing status ● Ready, not just CI's build-only check)
  • New vault's deposit --help confirms all three parameters (amount, min_shares_out, caller)
  • New vault's begin_migration/migrate_adapter confirmed present
  • End-to-end deposit through the live app — pending final confirmation before merge

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
meridian Ready Ready Preview Sep 4, 2026 1:01pm UTC

@collinsezedike collinsezedike changed the title fix(build): shamefully-hoist deps for Vercel's function typecheck fix(build): resolve production deploy failures and stale vault ABI Sep 1, 2026
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