Skip to content

fix: sqlite extension check + oversized chunk embedding (#85, #86, #87)#88

Merged
rajkumarsakthivel merged 2 commits into
mainfrom
fix/85-sqlite-extension-missing
May 19, 2026
Merged

fix: sqlite extension check + oversized chunk embedding (#85, #86, #87)#88
rajkumarsakthivel merged 2 commits into
mainfrom
fix/85-sqlite-extension-missing

Conversation

@rajkumarsakthivel
Copy link
Copy Markdown
Member

@rajkumarsakthivel rajkumarsakthivel commented May 19, 2026

Summary

Fixes three reported issues:

#85: sqlite3.enable_load_extension missing on Python 3.14

  • Preflight check in cce init catches it before any work starts
  • VectorStore._connect raises RuntimeError with reinstall instructions
  • memory/db._try_load_vec logs warning and degrades gracefully

#86, #87: Oversized chunks crash Ollama embedding

  • Truncate all texts to 3000 chars before sending to Ollama (safe for dense-tokenizing content at ~1 char/token)
  • Skip empty/whitespace-only chunks
  • Fall back to one-at-a-time embedding with halving retry if batch still fails

Closes #85, closes #86, closes #87

Python compiled without SQLITE_ENABLE_LOAD_EXTENSION (common with
python.org macOS installers) crashes with AttributeError. Now gives
a clear error message with fix instructions at three levels:

- Preflight check in cce init (fails early with ClickException)
- VectorStore._connect (RuntimeError with reinstall instructions)
- memory/db._try_load_vec (warning log, soft degradation)

Closes #85
Large semantic chunks (Markdown sections, long functions, dense YAML)
exceeded nomic-embed-text's 8192-token context limit, crashing indexing.

Fix: truncate to 3000 chars before embedding (safe for dense-tokenizing
content at ~1 char/token), skip empty chunks, and fall back to
one-at-a-time with halving retry if a batch still fails.

Closes #86, closes #87
@rajkumarsakthivel rajkumarsakthivel changed the title fix: handle missing sqlite3.enable_load_extension (#85) fix: sqlite extension check + oversized chunk embedding (#85, #86, #87) May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants