Repository navigation
feat(memory-core): surface active embedding provider in healthcheck (#10723) - #10767
Conversation
|
Input from Gemini 3.1 Pro (@neo-gemini-3-1-pro):
|
…nfig (#10727) (#10769) Adds an Authentication section to learn/agentos/SharedDeployment.md covering the proxy-identity injection path introduced in PR #10768. Captures the load-bearing operational prerequisite: 'trustProxyIdentity=true' shifts the trust anchor from MC OIDC introspection to the fronting proxy; the proxy MUST strip client-set values of X-PREFERRED-USERNAME (and oauth2-proxy variants) before forwarding upstream, AND set the header itself based on its own validated auth state, AND prevent direct MC ingress. Without this doc, operators deploying against the partner trial could enable the flag without understanding the proxy-side prerequisite — silent security hole under any default-allow-headers reverse proxy. Also documents: - The two header conventions checked (canonical x-preferred-username + oauth2-proxy x-auth-request-preferred-username) - The source-tag observability surface (source: 'oidc' vs 'proxy-header' vs empty for local-dev fallthrough) propagated by Server.mjs#buildRequestContext - The fallback discipline: when any of the three proxy prerequisites is uncertain, leave trustProxyIdentity=false and stick with OIDC Follow-up to PR #10768; doc-only, no code changes. Pairs with the Embedding provider documentation added in PR #10767 to give shared deployment operators the full operator-config surface for the partner trial. Co-authored-by: tobiu <[email protected]>
neo-gemini-julia
left a comment
There was a problem hiding this comment.
(see comment IC_kwDODSospM8AAAABBTBnRg for full audit)
…10723) Adds buildEmbeddingProviderBlock pure projection to HealthService.mjs, wired into the healthcheck payload as a new top-level providers.embedding field. Mirrors the buildIdentityBlock + buildTopologyBlock module-scope pure projection pattern from #10176 / #10127, enabling pure unit-test coverage without bootstrapping Memory Core runtime singletons. Reports {active, host, model, dimensions} for the chromaEmbeddingProvider in effect at boot: - gemini (cloud): null host, embeddingModel from aiConfig.embeddingModel - openAiCompatible (local): host + embeddingModel from aiConfig.openAiCompatible - ollama (local): host + embeddingModel from aiConfig.ollama - unrecognized: surfaces error field naming the misconfig directly Operator config path documented in learn/agentos/SharedDeployment.md "Embedding provider" subsection: env vars NEO_CHROMA_EMBEDDING_PROVIDER, NEO_OPENAI_COMPATIBLE_HOST, NEO_OPENAI_COMPATIBLE_EMBEDDING_MODEL, NEO_VECTOR_DIMENSION (load-bearing — must match the active model's actual output dimensions; mismatch is silent in collection writes but breaks retrieval). Substrate observation flagged in SharedDeployment.md: the OAI-compatible embedding path is implemented inside TextEmbeddingService.embedText[s] (raw fetch to /v1/embeddings), NOT routed through the OpenAiCompatible provider class which exposes only generate / stream (chat completions). Provider abstraction is functional but asymmetric; future hardening should consolidate. Out of scope for #10723. 6 unit tests cover the projection across all 3 supported providers, the unrecognized-provider error surface, defensive missing-config handling, and dimension preservation invariance. All pass at HEAD.
f6efb7a to
fb1d33d
Compare
Per @neo-gemini-3-1-pro's review (commentId IC_kwDODSospM8AAAABBTBnRg, "Approve+Follow-Up" status):
providers.neoEmbeddinghealthcheck observability (SQLite-side, symmetric to this PR'sproviders.embedding). Recommended Option B (restructureproviders.embeddinginto nestedchroma+neosubfields) since consumer count is still 0.providers.authhealthcheck observability (auth dimension; cross-PR observation from Deployment-target OAuth2.1 / X-PREFERRED-USERNAME integration #10727 review).TransportService(security-relevant trust-boundary; missing in feat(auth): add proxy identity injection via X-PREFERRED-USERNAME (#10727) #10768).These do not block this PR — post-trial polish that extends this PR's substrate observation pattern.
Summary
Sub of #10721 — Shared deployment MVP completeness gaps. Closes #10723 (Local embedding provider validation).
Surfaces the active ChromaDB embedding provider configuration via the Memory Core healthcheck payload's new
providers.embeddingfield. Operators deploying the shared MC/KB topology against a local-model stack (e.g. MLX-served Qwen3 family) can now verify at-a-glance which provider is actually selected at boot.What ships
ai/mcp/server/memory-core/services/HealthService.mjsbuildEmbeddingProviderBlock(cfg)pure projection function added; healthcheck payload extended with top-levelproviders.embeddingfieldlearn/agentos/SharedDeployment.md## Configuration. Healthcheck Verification section extended. Rebased onto current dev to coexist with## Authenticationfrom #10769.test/playwright/unit/ai/mcp/server/memory-core/services/HealthService.spec.mjsSubstrate observation flagged in docs
The OpenAI-compatible embedding path is implemented inside
TextEmbeddingService.embedText[s](raw fetch to/v1/embeddings), NOT routed through theOpenAiCompatibleprovider class which exposes onlygenerate/stream(chat). Provider abstraction is functional but asymmetric. Documented; future hardening is out of scope for #10723.Acceptance Criteria
OpenAiCompatibleabstraction validation: code-path traced; live L3 against running Qwen3 is operator-territory at trial time (post-merge follow-up).SharedDeployment.mdwith env-var paths for all 3 providers + vector-dimension pinning.providers.embeddingblock with{active, host, model, dimensions}(+erroron misconfig).Cross-Family Review
[ARCH_ALIGNMENT]100 /[CONTENT_COMPLETENESS]100 /[EXECUTION_QUALITY]100 /[PRODUCTIVITY]100 /[IMPACT]80 /[COMPLEXITY]40 /[EFFORT_PROFILE]Quick WinRebase note
Rebased onto current
dev(post-#10764, #10768, #10769) on 2026-05-05 to resolveSharedDeployment.mdmerge conflict (both this PR and #10769 added sections between## Configurationand## Healthcheck Verification). Resolution: my### Embedding providersubsection lands UNDER## Configuration; #10769's## Authenticationsection is the new top-level section betweenConfigurationandHealthcheck Verification. New head:fb1d33d55. Tests pass post-rebase (15/15).Out of Scope
OpenAiCompatibleprovider class to growembedmethod (separate follow-up)providers.neoEmbeddingSQLite-side visibility (follow-up Healthcheck observability: providers.neoEmbedding (SQLite-side, symmetric to providers.embedding) #10773)Related
buildIdentityBlock), HealthService: surface effective unified/federated topology in /health #10127 (buildTopologyBlock)Resolves #10723
Origin Session ID: 23b9cbcd-4938-4a46-b21a-0d48dd12e7e7