fix patch bridge feat/phase-2g-bundle
AI Agent git-import/068377df · 112 days ago · Apr 5, 2026 · Diff

fix(bridge): use /tmp for DATA_DIR in serverless — /var/task/ is read-only on Netlify

When running as a Netlify Lambda, projectRoot resolves to /var/task/ which is read-only. Any mkdir() under /var/task/data/ fails with ENOENT. The only writable path on Netlify Lambda is /tmp (os.tmpdir()).

DATA_DIR now resolves to: - process.env.DATA_DIR if explicitly set (EC2 or custom setup) - /tmp/knowtation-bridge-data when inServerless && no DATA_DIR env var - projectRoot/data when running as a persistent server (existing behavior)

This fixes the "ENOENT: no such file or directory, mkdir '/var/task/data/consolidation'" crash on Consolidate Now. Memory events written to /tmp persist for the lifetime of the warm Lambda container so same-session events can be consolidated.

sha256:4a0f0fb549d75094600f09a94b7ba303f003aa9386fbbf0b857b8971b7fa7998 sha
sha256:6496d6808c9da79fd6ba2f44d505ae8f4e5996513b1b8a92b26045ae972038b4 snapshot
← Older Oldest on feat/phase-2g-bundle
All commits
Newer → Latest on feat/phase-2g-bundle

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:4a0f0fb549d75094600f09a94b7ba303f003aa9386fbbf0b857b8971b7fa7998 --body "your comment"