Local memory-plane setup: native/Docker/endpoint recommendations, honest degradation - #255
Merged
Merged
Conversation
…ions Covers the RERANK_BASE_URL/RERANK_MODEL boot-time pairing check and the native/Docker/endpoint decision logic setup-memory.ts will implement.
mountMemory now fails loudly at boot when only one of RERANK_BASE_URL/ RERANK_MODEL is set, instead of letting a half-configured reranker surface as a confusing runtime failure later. bun run setup:memory (scripts/setup-memory.ts) recommends how to turn on embedding and reranking for this machine: native Ollama first, Docker for the reranker and Gotenberg (no good native story for either), a remote endpoint always available as a third option.
Documents bun run setup:memory in the README and docs/local-dev.md, spells out what degrades (and how visibly) with no embedding or no reranker configured, and adds GOTENBERG_URL to .env.example alongside the same native/Docker/endpoint story.
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.
Summary
bun run setup:memory(scripts/setup-memory.ts) probes this machine and recommends how to turn on the memory plane's embedding and reranking, in the platform's preferred order: native Ollama first, Docker for the pieces with no good native story (the TEI reranker, Gotenberg), a remote endpoint always available as a third option.mountMemorynow fails loudly at boot when only one ofRERANK_BASE_URL/RERANK_MODELis set, instead of a half-configured reranker surfacing as a confusing runtime failure later — matches the existing OAuth-pair pattern inapps/hub/src/config.ts..env.example,README.md, anddocs/local-dev.mdspell out what degrades and how visibly: no embedding configured means memory tools answer "not set up" and search finds nothing, and settingEMBED_BASE_URLlater does not retroactively embed rows written before — no automatic backfill. No reranker means search still works, just less well-ordered.GOTENBERG_URLto.env.example, matching the same native/Docker/endpoint story (Docker or remote endpoint; no native path).What this deliberately does NOT change
DATABASE_URLwith the rest of the hub (its ownmemoryPostgres schema) — no separateKNOWLEDGE_DATABASE_URLwas introduced; that would have contradicted the existing convention inapps/hub/src/memory-mount.ts.@corbits/memorymount and.env.examplerather than inventing a parallel one.Test plan
bun test apps/hub/src/memory-mount.test.ts— 5 pass, 2 DB-gated skippedbun test scripts/setup-memory.test.ts— 6 passbun run scripts/setup-memory.tsrun manually against this machine (native Ollama found, Docker unreachable) — printed the expected native-embedding + endpoint-reranker recommendation and exited promptly