Repository navigation
Run on Bun: bun install, Bun image, Bun for web + orchestrator - #242
Merged
Merged
Conversation
Moves meshhook.com off Node + pnpm onto Bun, following the fleet recipe (phonenumbers.bot pilot): Bun is now the package manager and the runtime. - Package manager: bun.lock is migrated from pnpm-lock.yaml (every version kept exactly: kit 2.70.2, svelte 5.56.8, vite 5.4.21, pg 8.23.0, undici 6.28.0). pnpm-workspace.yaml becomes `workspaces` in package.json; its esbuild build approval becomes trustedDependencies. - Runtime: the Dockerfile is oven/bun:1.4.0-slim, non-root, `bun server.mjs`. The supervisor spawns the SvelteKit server and the orchestrator with process.execPath, so both children run on Bun. Port 3000, env and the / health path are unchanged; dev2's compose file needs no change. - Scripts and the mh CLI call bun instead of node/pnpm; the SvelteKit build is `bun --bun vite build`. - Tests: vitest runs via `bun --bun vitest run`; the node:test suites run under `bun test`. Four http-call tests were nested inside another test's body (a paste error). Node ran them as subtests, Bun skipped them silently, so they are un-nested; both runners now execute all 258. - CI: new ci workflow (frozen install, tests, build, boot the web server). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan11 finding(s) HIGH/CRITICAL: 5 | MEDIUM: 3 | LOW: 3
Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
Part of the fleet Node → Bun migration (recipe from the phonenumbers.bot pilot). meshhook.com now uses Bun as both package manager and runtime.
Changes
bun.lockwas migrated frompnpm-lock.yaml, not regenerated, so every version stays exact (kit 2.70.2, svelte 5.56.8, vite 5.4.21, pg 8.23.0, undici 6.28.0).pnpm-workspace.yamlbecomesworkspacesin package.json, and the esbuild build approval becomestrustedDependencies.oven/bun:1.4.0-slim, running as the non-rootbunuser, withCMD ["bun", "server.mjs"]and a HEALTHCHECK on 127.0.0.1. The supervisor spawns the SvelteKit server and the orchestrator withprocess.execPath, so both children run on Bun as well. Port 3000, env and the/health path are unchanged, and dev2's compose file needs no change.mhCLI: they call bun instead of node or pnpm. The build isbun --bun vite build.bun --bun vitest runand the node:test suites run underbun test. Fourhttp-calltests had been pasted inside another test's body. Node ran them as subtests; Bun skipped them without saying so. They are un-nested now, and both runners execute all 258.ciworkflow does a frozen install, runs the tests, builds, and boots the web server under Bun.Verified locally (image built from
git archive HEAD, dev2-shaped compose, throwaway Postgres loaded withmigrations-pg)docker topshowsbun server.mjs,bun apps/web/build/index.jsandbun workers/orchestrator.mjs./and/auth/loginreturn 200 at the same sizes; the HTML differs only in the SvelteKit build id and asset hashes./workflows,/runsand/secretsreturn 303,/api/workflowsand/api/runsreturn 401, and an unknown hook returns 405 on GET and 404 on POST./api/hooks/<slug>returned 202, and the run wentrun_created, then the transform step, then terminate, thenrun_completed(statussucceeded) through the real queue and orchestrator.request(used byhttp-exec.mjs) and theimport.meta.url === file://argv[1]entry guards work under Bun. A read-onlyselect 1from Bun to dev2's Postgres oversslmode=requiresucceeded.healthy, and SIGTERM drains both children cleanly in 0.6 s.🤖 Generated with Claude Code