Skip to content

fix(evi): name the memory blob store instead of probing the environment - #785

Merged
HugoRCD merged 1 commit into
mainfrom
fix/evi-memory-backend
Oct 6, 2026
Merged

HugoRCD merged 1 commit into
mainfrom
fix/evi-memory-backend

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Oct 6, 2026

Copy link
Copy Markdown
Member

Evi's memory slot took every session down on a deployment.

fileMemory() with no explicit backend probes the environment: it reads EVE_MEMORY_BLOB_*, then falls back to the project-wide BLOB_* pair. Those point at the public store the screenshot tools upload to. The backend always reads with private access and useCache: false, which a public store rejects:

GET …blob.vercel-storage.com/eve/memory/file/evlog/maintainer/MEMORY.md?cache=0
400 "cache=0 is only available for private stores"

eve wraps that as Vercel Blob: Failed to fetch blob: 400 Bad Request, retries the turn three times for a deterministic failure, and escalates to FatalError. The session becomes unrecoverable, so the agent is down rather than the memory slot being empty.

Pointing EVE_MEMORY_BLOB_STORE_ID at a private store moves the failure rather than fixing it: that variable selects the OIDC path, whose authorization is scoped to the environments the store is connected to, and an unconnected environment gets 403 Forbidden through the same FatalError.

Naming the backend removes both. The read-write token carries its own store id and never resolves through OIDC, and BLOB_* is never consulted:

export function memoryBackend(): MemoryDocumentBackend {
  const token = process.env.EVE_MEMORY_BLOB_READ_WRITE_TOKEN
  return token ? vercelBlob({ token }) : inMemory()
}

Verified against the real store:

read  -> null (no document yet, handled)
write -> ok

Two regression tests cover it, both offline. With BLOB_STORE_ID and BLOB_READ_WRITE_TOKEN set and no memory token, the backend round-trips in process; if the fallback returns, that fails. With the memory token set, a read rejects before any request, proving the blob backend was selected.

.env.example documents the token and drops the old line pointing at eve add memory/file, which provisions the store-id setup this avoids.

No changeset: confined to apps/evi.

@vercel

vercel Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
evi Building Building Preview Oct 6, 2026 4:34pm UTC
4 Skipped Deployments
Project Deployment Actions Updated
evlog-docs Skipped Skipped v0 Oct 6, 2026 4:34pm UTC
evlog-render-lab Skipped Skipped Oct 6, 2026 4:34pm UTC
evlog-telemetry Skipped Skipped Oct 6, 2026 4:34pm UTC
just-use-evlog Skipped Skipped Oct 6, 2026 4:34pm UTC

Request Review

@github-actions github-actions Bot added the bug Something isn't working label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b602b6f9-4365-4e20-8553-91d9e4dfc241
📥 Commits

Reviewing files that changed from the base of the PR and between 88d2c9f and 1059184.

📒 Files selected for processing (3)
  • apps/evi/.env.example
  • apps/evi/agent/memory.test.ts
  • apps/evi/agent/memory.ts
 ______________________________________________________________________________________________________________________________________________________________________
< Fix the problem, not the blame. It doesn't really matter whether the bug is your fault or someone else's - it is still your problem, and it still needs to be fixed. >
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@HugoRCD
HugoRCD merged commit 6970c1f into main Oct 6, 2026
16 of 18 checks passed
@HugoRCD
HugoRCD deleted the fix/evi-memory-backend branch October 6, 2026 16:34

This branch was successfully deployed

1 active and 4 inactive deployments
Preview – evi — 1059184f Deployed Oct 6, 2026 by vercel[bot]
Preview – just-use-evlog — 1059184f Deployed Oct 6, 2026 by vercel[bot]
Preview – evlog-telemetry — 1059184f Deployed Oct 6, 2026 by vercel[bot]
Preview – evlog-docs — 1059184f Deployed Oct 6, 2026 by vercel[bot]
Preview – evlog-render-lab — 1059184f Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant