Skip to content

Stacked features 4: separate builds and allow test to run standalone#415

Merged
graydawnc merged 4 commits into
paperboytm:mainfrom
AmagiDDmxh:feat/build-native-isolation
Jul 15, 2026
Merged

Stacked features 4: separate builds and allow test to run standalone#415
graydawnc merged 4 commits into
paperboytm:mainfrom
AmagiDDmxh:feat/build-native-isolation

Conversation

@AmagiDDmxh

@AmagiDDmxh AmagiDDmxh commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Stack position

Part 4 of 7. Depends on #414; the next PR is #416.

Why

The app build duplicated dependency work, root build also performed release packaging, and Node/Electron commands repeatedly rebuilt the same shared better-sqlite3 artifact for incompatible ABIs. That made caching ineffective and allowed tests or packaging to break the globally linked CLI.

What changed

  • Made the app's Turbo build task bundle-only and let ^build own dependency ordering.
  • Declared the app's actual out/** Turbo output.
  • Split compile/bundle tasks from package, package:mac, and package:linux.
  • Updated release workflows to call the explicit packaging tasks.
  • Aligned app, core, and CLI on better-sqlite3@11.10.0, the version already used by the app/core runtime.
  • Rebuilt the Node ABI once before the root test graph instead of once per package.
  • Added with-electron-native.mjs, which rebuilds for Electron and restores the Node ABI in finally.
  • Disabled electron-builder's second implicit native rebuild.
  • Added an Electron-native SQLite smoke command.
  • Serialized the root test graph on constrained hosts and limited CLI test workers.

Verification

  • First pnpm build: seven tasks passed, with each app dependency built once.
  • Second unchanged pnpm build: 7/7 Turbo cache hits in 92 ms.
  • Root pnpm build produced no DMG, ZIP, AppImage, or electron-builder task.
  • pnpm --filter @spool/app smoke:native:electron: SQLite loaded inside Electron.
  • The wrapper restored the Node ABI and the following sp status succeeded.
  • The native binding/ABI mismatch no longer reproduced in root tests.
  • Focused core and CLI runs passed (core 404 with 1 skipped; CLI 53/53).

Review notes

The CLI's previous 12.x direct dependency was aligned downward to the app/core 11.10.0 runtime to remove the split with the smallest compatibility change. A coordinated 12.x upgrade should be a separate PR. Release signing, notarization, and Linux packaging still require CI credentials.

@AmagiDDmxh AmagiDDmxh changed the title Stacked features 4: separate builds and let test run standardlong Stacked features 4: separate builds and allow test to run standalone Jul 13, 2026
@AmagiDDmxh
AmagiDDmxh marked this pull request as draft July 13, 2026 20:48
@AmagiDDmxh
AmagiDDmxh force-pushed the feat/build-native-isolation branch 2 times, most recently from b303c9c to 299fc2e Compare July 14, 2026 16:04
@AmagiDDmxh
AmagiDDmxh force-pushed the feat/build-native-isolation branch from 299fc2e to 5ecf7b5 Compare July 15, 2026 04:59
@AmagiDDmxh
AmagiDDmxh marked this pull request as ready for review July 15, 2026 05:00
The packaging split removed the app's build:mac/build:linux one-shots, but
scripts/dev-install-mac.sh (and README) still invoked them, so the local
DMG install flow died at the build step. Route it through the root
package:mac orchestration instead — same artifact path, and the second
run now benefits from turbo caching.

Also scope the packaging build to the app's dependency graph
(turbo build --filter=@spool/app...) and have release.yml call the root
package scripts. Desktop releases no longer depend on @spool/landing or
@spool/share-web building — landing is excluded from PR CI by
paths-ignore, so a breakage there would otherwise first surface mid-release.

Verified: pnpm run package:mac produces packages/app/dist/mac-arm64/Spool.app
+ DMG on a warm tree in ~3min, and restores the node ABI afterwards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@graydawnc
graydawnc added this pull request to the merge queue Jul 15, 2026
Merged via the queue into paperboytm:main with commit 2f06e1c Jul 15, 2026
3 checks passed
bet4it pushed a commit to bet4it/spool that referenced this pull request Jul 16, 2026
…rboytm#426)

The July 2026 optimization stack (paperboytm#412-paperboytm#418) shipped, which turns its
441-line plan into a completed one — and completed plans rot: the doc
went stale twice during the stack's own lifetime (feature-flag removals,
find semantics). Git history and the PR descriptions now carry the full
rationale and verification notes permanently.

Keep what stays useful:
- The verification matrix moves to CONTRIBUTING as a living 'Verifying
  changes' section, including the packaged-app checklist and the
  never-remove-assets-on-grep-alone rule.
- The roadmap shrinks to a ~50-line record: what shipped per PR,
  decisions of record with their data basis, and known follow-ups.

Also refresh two stale CONTRIBUTING sections: native-ABI handling is
automatic since paperboytm#415 (manual rebuilds are the fallback), and 'no linter
config yet' predates oxlint (paperboytm#413).

Co-authored-by: Chen <99816898+donteatfriedrice@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants