Skip to content

[Chore] CI never builds or verifies the actual Vercel deploy path #401

Description

@collinsezedike

Summary

Nothing in CI actually runs scripts/build-vercel.sh, the literal command Vercel executes to build every production deployment. CI builds apps/api-local and typechecks api/, but never exercises the real deploy path end to end.

Motivation

This gap is not theoretical: it already caused a production incident. packages/api-core was added and wired into every api/v1/* handler, but never added to build-vercel.sh's esbuild bundling step, so every Vercel serverless function importing it threw ERR_MODULE_NOT_FOUND in production (fixed in #398). Nothing in CI would have caught this before it shipped, because nothing in CI runs the script that actually builds for Vercel.

Proposed Solution

Add a CI job (or a step in the existing lint-typecheck job) that runs bash scripts/build-vercel.sh on every PR and fails if it errors, so a missing workspace-bundle step or similar build breakage is caught before merge instead of in production. At minimum, the job should assert that every workspace package imported by api/v1/* handlers has a corresponding dist/index.js produced by the script.

Scope

Field Value
Area CI
Protocol affected None
Network N/A
Breaking change? No

Alternatives Considered

Relying on manual review to catch missing bundle steps: already demonstrated to fail once; the reviewer (and the author) both missed it because nothing surfaced the gap until Vercel's runtime logs did.

Acceptance Criteria

  • CI runs scripts/build-vercel.sh (or an equivalent check) on every PR touching api/, packages/api-core, packages/shared, or packages/stellar-sdk-helpers
  • The check fails if any workspace package imported by an api/v1/* handler doesn't have a bundled dist/index.js after the script runs
  • Verified by intentionally reverting the fix(build): bundle api-core for the Vercel serverless runtime #398 fix locally and confirming the new CI check fails

Additional Context

See #398 for the incident and fix.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26choreBuild, CI, dependency updates, or repository maintenanceciGitHub Actions workflows, CI configuration, or automationhardComplex implementation spanning multiple packages or involving Soroban contractssecuritySecurity hardening, vulnerability fixes, or audit-related work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions