Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
chore: release v1.44.1 — fix server boot crash, add smoke test
Adam Eivyd92ad02df50a
diff --git a/.changelog/v1.44.1.md b/.changelog/v1.44.1.mdnew file mode 100644index 0000000000..13ac8bf43e--- /dev/null+++ b/.changelog/v1.44.1.md@@ -0,0 +1,11 @@+# Release v1.44.1++Released: 2026-04-22++## Fixed++- **Server crashed on boot with `TypeError: Cannot read properties of undefined (reading 'catch')`** — `server/index.js:303` chained `.catch()` onto `agentActionExecutor.init()`, but that `init()` is synchronous and returns `undefined`. The `.catch` call threw at module load, crashing `portos-server` immediately after PM2 started it. Introduced by commit `40705cd4` during the v1.44.0 cycle and shipped because the release pipeline had no step that actually booted `server/index.js` — unit tests (vitest) import service modules in isolation and never execute the top-level initialization in `index.js`, and `npm run build` only builds the client. Dropped the `.catch` since `init()` is sync; added a new `npm run smoke` step (`scripts/smoke-boot.js`) that spawns `server/index.js` in a child process and fails if it exits within a 4 s boot window, so any similar top-level init crash blocks future releases instead of shipping.++## Full Changelog++**Full Diff**: https://github.com/atomantic/PortOS/compare/v1.44.0...v1.44.1diff --git a/package-lock.json b/package-lock.jsonindex 3dcb0e7300..6b7bacd2c5 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "portos",- "version": "1.44.0",+ "version": "1.44.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "portos",- "version": "1.44.0",+ "version": "1.44.1","license": "MIT","devDependencies": {"pm2": "6.0.14"diff --git a/package.json b/package.jsonindex 8135addb6c..eaab16d17d 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "portos",- "version": "1.44.0",+ "version": "1.44.1","private": true,"description": "Local dev machine App OS portal","author": "Adam Eivy (@antic|@atomantic)",@@ -28,7 +28,8 @@"setup:ghostty": "node scripts/setup-ghostty.js","setup:hooks": "bash scripts/setup-git-hooks.sh","update": "node -e \"const{spawnSync:s}=require('child_process');const w=process.platform==='win32';const r=s(w?'powershell':'bash',w?['-NoProfile','-ExecutionPolicy','Bypass','-File','update.ps1']:['update.sh'],{stdio:'inherit'});process.exit(r.status??1)\"",- "test": "npm test --prefix server"+ "test": "npm test --prefix server",+ "smoke": "node scripts/smoke-boot.js"},"devDependencies": {"pm2": "6.0.14"diff --git a/scripts/smoke-boot.js b/scripts/smoke-boot.jsnew file mode 100644index 0000000000..28b057a5bb--- /dev/null+++ b/scripts/smoke-boot.js@@ -0,0 +1,54 @@+#!/usr/bin/env node+// Server boot smoke test — imports server/index.js in a child process and+// verifies it stays alive for SMOKE_WINDOW_MS without crashing. Catches the+// class of bug where top-level initialization code throws (e.g. chaining+// .catch on a sync function that returns undefined), which is invisible to+// unit tests that import service modules in isolation.++import { spawn } from 'child_process';+import { fileURLToPath } from 'url';+import { dirname, join } from 'path';++const __dirname = dirname(fileURLToPath(import.meta.url));+const SMOKE_WINDOW_MS = Number(process.env.SMOKE_WINDOW_MS ?? 4000);+const SERVER_ENTRY = join(__dirname, '..', 'server', 'index.js');++// Use a dedicated port range so we don't collide with a running PortOS.+const env = {+ ...process.env,+ PORT: process.env.SMOKE_PORT ?? '55559',+ PORTOS_HTTP_PORT: process.env.SMOKE_HTTP_PORT ?? '55557',+ NODE_ENV: 'test',+ SKIP_PM2_BRIDGE: '1',+ // Let the child bail loudly on unhandled rejections+ NODE_OPTIONS: '--unhandled-rejections=strict'+};++const child = spawn(process.execPath, [SERVER_ENTRY], {+ env,+ stdio: ['ignore', 'pipe', 'pipe']+});++let firstErr = '';+let crashed = false;+let exitCode = null;++child.stdout.on('data', (d) => process.stdout.write(`[smoke] ${d}`));+child.stderr.on('data', (d) => {+ const s = d.toString();+ if (!firstErr) firstErr = s;+ process.stderr.write(`[smoke err] ${s}`);+});+child.on('exit', (code) => { crashed = true; exitCode = code; });++setTimeout(() => {+ if (crashed) {+ console.error(`❌ Server crashed during ${SMOKE_WINDOW_MS}ms boot window (exit ${exitCode}).`);+ if (firstErr) console.error('First error:\n' + firstErr);+ process.exit(1);+ }+ console.log(`✅ Server survived ${SMOKE_WINDOW_MS}ms boot window.`);+ child.kill('SIGTERM');+ // Give it a moment to shut down cleanly; then exit+ setTimeout(() => process.exit(0), 500);+}, SMOKE_WINDOW_MS);diff --git a/server/index.js b/server/index.jsindex 3fbae35ca6..1bc0b969e9 100644--- a/server/index.js+++ b/server/index.js@@ -300,7 +300,8 @@ app.use('/api/openclaw', openclawRoutes);// Initialize agent automation scheduler and action executorautomationScheduler.init().catch(err => console.error(`❌ Agent scheduler init failed: ${err.message}`));-agentActionExecutor.init().catch(err => console.error(`❌ agentActionExecutor init failed: ${err.message}`));+// agentActionExecutor.init() is synchronous — don't chain .catch on undefined+agentActionExecutor.init();// Recover any inbox entries stuck in 'classifying' from a previous crash/restartrecoverStuckClassifications().catch(err => console.error(`❌ Brain recovery failed: ${err.message}`));