040742d06b
sync_turn() sent the whole turn to backend.add() untruncated. OSS embedding models with small context windows (Ollama bge-small-zh-v1.5: 512 tokens) reject the request with HTTP 500, and hosted APIs answer INPUT_TOKEN_LIMIT_EXCEEDED — in both cases _try() only logs, silently dropping the turn's memory extraction after long conversations. Cap each synced message at its last sentence boundary within 450 chars before ingestion: short turns pass through unchanged, long turns keep a coherent statement for fact extraction. This replaces the previous retry-on-error approach, which could not match Ollama's HTTP 500 shape. Salvaged from #37427 with the test suite trimmed to the one invariant (oversized turn still reaches a small-context backend, short text untouched, no breaker failure). Refs #37421 #106235 Co-authored-by: szicely <140148567+szicely@users.noreply.github.com>