Skip to content

fix(ci): scope Electron native rebuilds#1099

Merged
tomcasaburi merged 1 commit intomasterfrom
codex/fix/windows-electron-rebuild
Mar 17, 2026
Merged

fix(ci): scope Electron native rebuilds#1099
tomcasaburi merged 1 commit intomasterfrom
codex/fix/windows-electron-rebuild

Conversation

@tomcasaburi
Copy link
Member

@tomcasaburi tomcasaburi commented Mar 17, 2026

Scope Electron native rebuilds to better-sqlite3 so the Windows package job stops rebuilding unrelated addons, and fail the standalone native-module step fast if it regresses.

Closes #1098


Note

Medium Risk
Moderate risk because it changes Electron packaging/rebuild behavior and could cause missing native addons if other modules actually require rebuilds. Limited blast radius to CI/package pipeline, not runtime app logic.

Overview
Electron packaging CI now fails faster and rebuilds less. The electron:prepare-package step in .github/workflows/ci.yml has a 10-minute timeout across Linux/macOS/Windows packaging jobs to avoid long hangs/regressions.

Native rebuilds are scoped to better-sqlite3. forge.config.js restricts Forge’s rebuildConfig to onlyModules: ['better-sqlite3'], and package.json updates electron:rebuild-native to use electron-rebuild -o better-sqlite3 so Windows packaging stops rebuilding unrelated optional addons.

Written by Cursor Bugbot for commit 19da329. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Chores
    • Enhanced build pipeline reliability with improved timeout settings for native module compilation.
    • Optimized native module rebuild process to focus on critical dependencies, reducing unnecessary rebuilds.
    • Updated build script configuration for more precise native module handling during packaging.

@vercel
Copy link

vercel bot commented Mar 17, 2026

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

Project Deployment Actions Updated (UTC)
5chan Ready Ready Preview, Comment Mar 17, 2026 10:05am

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

This PR restricts Electron native module rebuilds to only better-sqlite3 during packaging and adds CI timeout constraints. Changes modify the rebuild configuration in forge.config.js, update the rebuild script flag in package.json, and add timeouts to CI workflow steps.

Changes

Cohort / File(s) Summary
CI Workflow Timeouts
.github/workflows/ci.yml
Added timeout-minutes: 10 to multiple "Rebuild and verify Electron native modules" steps to constrain execution time.
Electron Rebuild Configuration
forge.config.js, package.json
Restricted native module rebuild scope to only better-sqlite3 by replacing rebuildConfig.force: true with rebuildConfig.onlyModules: ['better-sqlite3'] and updating the rebuild script flag from -w to -o.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 Hop, hop—no more stalling!
Better-sqlite3 alone now calls,
No extra modules rebuild in vain,
Windows CI wins the faster lane! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly summarizes the main change: scoping Electron native rebuilds to the better-sqlite3 module to fix CI performance issues.
Linked Issues check ✅ Passed The changes directly address issue #1098 by replacing force-rebuild with onlyModules restriction and updating the rebuild script to target better-sqlite3 specifically.
Out of Scope Changes check ✅ Passed All changes focus on scoping the Electron native rebuild to better-sqlite3 and adding timeout protection; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix/windows-electron-rebuild
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@tomcasaburi tomcasaburi merged commit 2c276f0 into master Mar 17, 2026
11 checks passed
@tomcasaburi tomcasaburi deleted the codex/fix/windows-electron-rebuild branch March 17, 2026 10:22
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.

Windows CI Rebuild and verify Electron native modules rebuilds unrelated addons and stalls

1 participant