Skip to content

Release | Ship a lean esbuild pack instead of the full tree - #85

Merged
BrianGenisio merged 1 commit into
mainfrom
chore/lean-release-pack
Oct 1, 2026
Merged

BrianGenisio merged 1 commit into
mainfrom
chore/lean-release-pack

Conversation

@BrianGenisio

@BrianGenisio BrianGenisio commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Release artifacts were shipping nearly the whole repo (including node_modules). This switches release packaging to the same lean esbuild pack used in CosmoMail: a minified client bundle, single-file server and extract scripts, and the static files Express serves.

Changes

  • npm run pack builds dist/ and dist.tar.gz with no node_modules
  • Release workflow runs tests, then npm run pack, and uploads that tarball
  • /api/health plus Octavus URL/key fallbacks so the pack smoke test can import the bundled server without a full .env

Extract dist.tar.gz into its own directory, add chat-config.json and .env, then node server.js.

Test plan

  • npm test
  • npm run pack succeeds and prints a ~1–2 MB dist.tar.gz
  • Extract the tarball somewhere outside the repo, copy .env + chat-config.json, run node server.js, hit /api/health

Bundle the client, server, and extract script with esbuild so releases
no longer ship node_modules, cutting the artifact by an order of magnitude.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 2cc882d6-015b-4cf6-82dd-1bc1c74e6057

📥 Commits

Reviewing files that changed from the base of the PR and between 019dba1 and 4d8da6c.

📒 Files selected for processing (5)
  • .github/workflows/release.yml
  • .gitignore
  • package.json
  • scripts/pack-dist.mjs
  • server.js

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The release workflow now runs npm test and npm run pack. The pack script bundles the browser app, server, and extractor, copies release assets, checks the bundled server’s health endpoint, and creates dist.tar.gz. The server also adds that health endpoint and defaults for unset Octavus environment variables.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 4d8da

No actionable merge-blocking issue remains. Session creation still requires the documented configuration, while health checks can run without credentials. The change is mergeable subject to normal build and test checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing the full release tree with a lean esbuild package.
Description check ✅ Passed The description directly explains the lean packaging change, workflow updates, health endpoint, fallbacks, packaging contents, and test plan.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@BrianGenisio
BrianGenisio merged commit 361d0e7 into main Oct 1, 2026
2 checks passed
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