Skip to content

ci: build on every PR - #470

Merged
paul-phan merged 1 commit into
mainfrom
ci/add-build-step
Aug 5, 2026
Merged

ci: build on every PR#470
paul-phan merged 1 commit into
mainfrom
ci/add-build-step

Conversation

@paul-phan

Copy link
Copy Markdown
Member

Why

CI runs lint, typecheck, manifest drift, and the settings audit — but never builds. A broken build merges clean and fails at Oxygen deploy, where a partial upload serves HTML referencing assets that were never published (the blank-storefront failure mode from #469).

The gap this closes

Typecheck does not see bundler-level breakage. Realistic case: a dependency gets removed from package.json but its ambient module declaration is left behind in app/types/.

// app/types/fontsource.d.ts — declaration outlives the package
declare module "@fontsource-variable/deleted-font";
// app/root.tsx
import "@fontsource-variable/deleted-font";

Measured against every gate currently in CI:

Gate Result
npm run biome pass
npm run typecheck pass
npm run weaverse:manifest:check pass
npm run weaverse:audit pass
npm run build fail
Error: [vite]: Rolldown failed to resolve import
✗ Build failed in 659ms

TypeScript trusts the ambient declaration, so the module resolves at type level and never at bundle level. Same shape as a client-only module pulled into the worker bundle or a Vite plugin misconfiguration: clean types, broken artifact.

Credentials

None needed. Verified the build succeeds with an empty environment (env -i) and no .env present, so this runs unauthenticated on PRs from forks.

Cost

~30s on this machine. The step reuses the npm ci and setup-node cache already in the job.

Typecheck and lint both pass on breakage that only the bundler sees. A stale ambient module declaration for a removed package typechecks clean, lints clean, passes the manifest and audit gates, and fails the build:

    Error: [vite]: Rolldown failed to resolve import

That class of defect currently reaches Oxygen deploy, where a failed build serves HTML referencing assets that were never published.

The build needs no storefront credentials. Verified it succeeds with an empty environment and no .env present.
@paul-phan
paul-phan merged commit 6e6b7ec into main Aug 5, 2026
5 checks passed
@paul-phan
paul-phan deleted the ci/add-build-step branch August 5, 2026 06:55
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