fix(ci): scope deploy-api install to the API workspace#286
Merged
Conversation
The Deploy API workflow was running plain \`pnpm install\` which triggers EVERY workspace's postinstall — including apps/desktop's \`electron-builder install-app-deps\` step that rebuilds better-sqlite3 against Electron headers via node-gyp. That rebuild fails on the Linux + Node 22 CI runner (V8 API mismatch in better-sqlite3 12.10.0 against current Electron headers): "no matching function for call to 'v8::External::Value()'" and friends. The API worker has nothing to do with better-sqlite3 or Electron. It runs on Cloudflare Workers and only needs its own transitive deps. So: pnpm install -> pnpm install --filter '@readied/api...' --ignore-scripts - \`--filter '@readied/api...'\` brings in @readied/api and everything it depends on (transitive within the monorepo), nothing else. - \`--ignore-scripts\` is belt-and-suspenders so we don't run install-app-deps even if some transitive dep declares a similar postinstall. This unblocks the API deploy that was failing since 2026-03-29. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR modifies the API deployment workflow to install dependencies only for the ChangesWorkspace-filtered dependency installation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
tomymaritano
added a commit
that referenced
this pull request
Jun 9, 2026
## Why hotfix to main PR #245 (audit release develop→main) merged **before** PR #286 (deploy-api install scope fix) reached develop. Net result: main got the audit work without the workflow fix. The auto-deploy of \`@readied/api\` on the #245 merge failed, and manual \`workflow_dispatch\` from main still fails because the workflow file in main is the pre-fix version. This PR cherry-picks the one-commit fix from develop (\`53577d3\`) directly onto main. Same diff as PR #286, no new logic. ## What this changes \`\`\`diff - - run: pnpm install + - run: pnpm install --filter '@readied/api...' --ignore-scripts \`\`\` Applied in both the \`test\` and \`deploy\` jobs of \`.github/workflows/deploy-api.yml\`. Scope: prevent \`pnpm install\` from running every workspace's postinstall on the CI runner. Specifically, blocks \`apps/desktop\`'s \`electron-builder install-app-deps\` step that rebuilds better-sqlite3 against Electron headers — a build that fails on Linux + Node 22 due to a V8 API mismatch in better-sqlite3 12.10.0. ## Verification (already done) The same fix on develop was validated by run https://github.com/tomymaritano/readide/actions/runs/27183894368 — \`@readied/api\` deployed cleanly to \`readied-api-staging\`, smoke test returned HTTP 200 with \`{"name":"Readied API","version":"0.1.0","status":"healthy"}\`. The failing main deploy was https://github.com/tomymaritano/readide/actions/runs/27184061589. ## What lands after this merges 1. Manual re-trigger of Deploy API workflow from main → expected pass against \`readied-api-production\` 2. Then we can trigger the Release workflow for desktop v0.15.0 ## Why directly to main (not via develop again) - develop already has this exact fix from #286 - Going through develop → main release PR would re-stack the entire audit work that just released; only delta is one workflow line - This is the textbook case for a hotfix branch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The Deploy API workflow has been failing since at least 2026-03-29 (every run since). Root cause: `pnpm install` in the Test + Deploy jobs runs the postinstall scripts of EVERY workspace, including `apps/desktop`'s `electron-builder install-app-deps` step that rebuilds `better-sqlite3` against Electron headers via `node-gyp`.
That rebuild fails on the Linux + Node 22 runner due to a V8 API mismatch in better-sqlite3 12.10.0 against the current Electron headers (`no matching function for call to 'v8::External::Value()'` and similar errors).
The API worker has nothing to do with better-sqlite3 or Electron. It runs on Cloudflare Workers and only needs its own transitive deps.
Change
```diff
```
Applied in both the `test` and `deploy` jobs.
Why this is release-blocking
The v0.15.0 release (PR #245) auto-deploys the API to production when it merges (the workflow runs on `push` to main affecting `packages/api/**`). The audit stack modifies `packages/api/wrangler.toml` (documentation comment for LICENSE_SIGNING_PRIVATE_KEY), which triggers the path filter. Without this fix, that auto-deploy fails on merge.
Verification
After this PR merges to develop and the release PR (#245) carries it to main, the next manually-triggered deploy:
```
gh workflow run deploy-api.yml -f environment=staging
```
should succeed end-to-end (Test → Deploy → wrangler deploy --env staging).
🤖 Generated with Claude Code
Summary by CodeRabbit