Resolves #13946
Native Ollama embedding now uses a fail-loud request shape: /api/embed sends truncate:false, and TextEmbeddingService passes AiConfig.localModels.embedding.contextLimitTokens as native options.num_ctx for both single and batch Ollama embeddings. This keeps KB / Memory Core from accepting silently truncated vectors when deployments route embeddings through native Ollama.
Evidence: L2 focused unit/static evidence -> L2 required for the #13946 request-shape ACs. Residual: none for the close target.
Deltas from ticket
The provider now defaults native embedding truncation to false at OllamaProvider.embed() itself, so direct provider consumers inherit the same fail-loud posture. TextEmbeddingService supplies the role-specific context leaf at its native-Ollama use sites, per ADR 0019.
Test Evidence
npm run agent-preflight -- ai/provider/Ollama.mjs ai/services/memory-core/TextEmbeddingService.mjs test/playwright/unit/ai/provider/KeepAlive.spec.mjs test/playwright/unit/ai/services/memory-core/TextEmbeddingService.spec.mjs passed.
npm run test-unit -- test/playwright/unit/ai/provider/KeepAlive.spec.mjs test/playwright/unit/ai/services/memory-core/TextEmbeddingService.spec.mjs passed: 30 passed, 1 skipped.
git diff --check passed.
Post-Merge Validation
Commits
feb2b2c9cd — fail loud on native Ollama embedding truncation
Authored by Euclid (GPT-5, Codex Desktop). Session cd2b88d7-8134-4ef8-a10f-0b1e80c03db4.
Resolves #13946
Native Ollama embedding now uses a fail-loud request shape:
/api/embedsendstruncate:false, and TextEmbeddingService passesAiConfig.localModels.embedding.contextLimitTokensas nativeoptions.num_ctxfor both single and batch Ollama embeddings. This keeps KB / Memory Core from accepting silently truncated vectors when deployments route embeddings through native Ollama.Evidence: L2 focused unit/static evidence -> L2 required for the #13946 request-shape ACs. Residual: none for the close target.
Deltas from ticket
The provider now defaults native embedding truncation to false at
OllamaProvider.embed()itself, so direct provider consumers inherit the same fail-loud posture. TextEmbeddingService supplies the role-specific context leaf at its native-Ollama use sites, per ADR 0019.Test Evidence
npm run agent-preflight -- ai/provider/Ollama.mjs ai/services/memory-core/TextEmbeddingService.mjs test/playwright/unit/ai/provider/KeepAlive.spec.mjs test/playwright/unit/ai/services/memory-core/TextEmbeddingService.spec.mjspassed.npm run test-unit -- test/playwright/unit/ai/provider/KeepAlive.spec.mjs test/playwright/unit/ai/services/memory-core/TextEmbeddingService.spec.mjspassed: 30 passed, 1 skipped.git diff --checkpassed.Post-Merge Validation
Commits
feb2b2c9cd— fail loud on native Ollama embedding truncationAuthored by Euclid (GPT-5, Codex Desktop). Session cd2b88d7-8134-4ef8-a10f-0b1e80c03db4.