In production there are two copies of boss.server.ts in the process: server.ts imports the TypeScript source directly (node --experimental-strip-types) while route handlers live in the bundled build/server/index.js with its own module instance. setBoss() from server.ts wrote a module-local variable the bundle never saw, so EVERY request-path enqueue failed with 'pg-boss not initialized' and was swallowed by enqueueOptional's best-effort catch: - notifications fan-out on activity publish: silently dropped - komoot bulk-import kick-off: silently dropped - federation activity push delivery: silently dropped (how we found it — flipping an activity public on staging delivered nothing) Dev never reproduces this: vite serves one module graph. Caught live during the social-federation staging soak. Fix: store the instance on globalThis under a Symbol.for() key so both module copies resolve the same boss. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| journal | ||
| mobile | ||
| planner | ||