Skip to content

release: v0.20260313.0 - SQLite Memory & SIF Reliability#126

Merged
ranaroussi merged 13 commits intorcfrom
develop
Mar 13, 2026
Merged

release: v0.20260313.0 - SQLite Memory & SIF Reliability#126
ranaroussi merged 13 commits intorcfrom
develop

Conversation

@ranaroussi
Copy link
Member

Summary

Five bug fixes addressing SQLite memory retrieval and SIF container reliability.

Bug Fixes

  • SQLiteMemory search in single-user modesearch() and _search_internal() referenced a nonexistent default_user_id attribute. Memories stored correctly but never retrieved. Fix: 4-way SQL branching when user_id=None.
  • Embedding model missing from SIFall-MiniLM-L6-v2 was not pre-downloaded during Docker build. Fix: pre-download both models.
  • HuggingFace cache writes in read-only SIF — HF Hub wrote .no_exist cache files to read-only filesystem. Fix: HF_HUB_OFFLINE=1 + TRANSFORMERS_OFFLINE=1 (conditional, SIF-only via entrypoint).
  • auto_decomposition default override — Hardcoded True overriding constructor False. Fix: defaults to enable_workflow_by_default.
  • sqlite-vec ELFCLASS32 on aarch64 — PyPI wheel ships 32-bit binary. Fix: compile from amalgamation source with SHA-256 verification.

Review Fixes (from PR #125)

  • Added SHA-256 checksum verification on sqlite-vec tarball download
  • Dynamic Python version path instead of hardcoded python3.10
  • Moved HF offline mode from Dockerfile ENV to entrypoint, gated on SINGULARITY_CONTAINER

Changes

  • 8cdc5ae fix: address PR review - checksum verification, dynamic python path, conditional HF offline
  • 965e2b9 docs: add 0.20260313.0 changelog entry
  • 43c6970 fix: pre-download all-MiniLM-L6-v2 and set HF offline mode for SIF
  • 115caea fix: SQLiteMemory search fails in single-user mode (missing default_user_id)
  • 0580eb4 fix: compile sqlite-vec from source for aarch64 in Docker build
  • 8b4f5ee fix: auto_decomposition defaults to False unless explicitly enabled
  • 0b9fa1b Merge remote-tracking branch 'origin/main' into develop
  • 6c4c38b chore: merge main back to develop (v0.20260312.1) [skip ci]
  • 96c0314 chore: release v0.20260312.1
  • 7c7dd26 Merge branch 'rc'
  • 16b0ad5 chore: release v0.20260312.0

github-actions bot and others added 11 commits March 12, 2026 12:06
The overlord config loading path defaulted auto_decomposition to True,
overriding the constructor default of False. This caused simple messages
to trigger workflow planning even when the formation didn't configure it.

Now defaults to enable_workflow_by_default (False) unless the formation
explicitly sets overlord.workflow.auto_decomposition: true.

Also: surface persistent memory init failures in startup output instead
of silently swallowing them.
The sqlite-vec 0.1.6 PyPI package ships a 32-bit ARM binary in the
aarch64 wheel (known bug: asg017/sqlite-vec#211). This causes
'wrong ELF class: ELFCLASS32' at runtime, silently breaking persistent
memory in SIF containers on ARM64.

Fix: download the sqlite-vec amalgamation source and compile a correct
64-bit vec0.so during the Docker build (aarch64 only).
…ser_id)

In single-user mode, persistent_memory_manager passes user_id=None to
SQLiteMemory.search(). The search method tried to fall back to
self.default_user_id which doesn't exist, causing an AttributeError
that was silently caught. Memories were stored but never retrieved.

Fix: when user_id is None, search without user filtering (appropriate
for single-user mode). Removed the nonexistent default_user_id
references from both search() and _search_internal().
SQLiteMemory uses all-MiniLM-L6-v2 for local embeddings but it was not
pre-downloaded in the Docker build. In read-only SIF containers, HuggingFace
Hub failed with 'Read-only file system' when trying to download or cache
the model at runtime.

- Pre-download both embedding models at build time
- Set HF_HUB_OFFLINE=1 and TRANSFORMERS_OFFLINE=1 to prevent cache writes
- Bump version to 0.20260312.1
…conditional HF offline

- Add SHA-256 checksum verification for sqlite-vec amalgamation download
- Derive Python version dynamically instead of hardcoding python3.10
- Move HF_HUB_OFFLINE/TRANSFORMERS_OFFLINE from Dockerfile ENV to
  entrypoint, gated on SINGULARITY_CONTAINER or MUXI_SIF_MODE
@greptile-apps
Copy link

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR ships five targeted bug fixes for SQLite memory retrieval failures and SIF container reliability issues, incorporating the follow-up improvements requested during review of PR #125.

Key changes:

  • sqlite.py — Replaces the broken self.default_user_id fallback in search() / _search_internal() with correct 4-way SQL branching. The new logic correctly searches all formation users when user_id=None (single-user mode), while keeping full user+collection filtering intact for multi-user mode. Note that write-path methods (add(), get_recent_memories(), create_collection(), list_collections()) still use self.default_user_id — consistent and intentional for single-user mode since there is only one user.
  • Dockerfile — Adds aarch64-specific sqlite-vec compilation from the amalgamation source (v0.1.7-alpha.10) with SHA-256 checksum verification, --strip-components=1 (preventing the previous extraction path mismatch), and a dynamic Python version path. Pre-downloads all-MiniLM-L6-v2 alongside the existing model.
  • docker-entrypoint.sh — Conditionally sets HF_HUB_OFFLINE=1 / TRANSFORMERS_OFFLINE=1 only when running inside a SIF/Singularity container, correctly fixing the read-only filesystem issue without breaking standard Docker deployments.
  • overlord.py — Changes the auto_decomposition default fallback from the hardcoded True to self.enable_workflow_by_default, honoring the constructor's False default.
  • initialization.py — Adds a user-facing print in the persistent memory failure path so errors are visible at startup rather than silently swallowed.
  • Version files (src/muxi/.version, src/muxi/runtime/.version) — Both still read 0.20260312.1 while the PR title and CHANGELOG.md declare 0.20260313.0 (noted in previous review thread).

Confidence Score: 4/5

  • This PR is safe to merge; all five bug fixes are correctly implemented with no new logic regressions found. The outstanding version file mismatch is a pre-existing concern flagged in the previous thread.
  • All five stated bug fixes are logically sound: the 4-way SQL branching correctly handles every combination of user_id/collection, the aarch64 compilation chain is correct for loadable SQLite extensions, and the conditional HF offline mode properly scopes the change to SIF containers only. The version file mismatch (both still at 0.20260312.1) is the only unresolved item, previously flagged and not addressed in this revision.
  • src/muxi/.version and src/muxi/runtime/.version — both still reflect the previous release version rather than 0.20260313.0.

Important Files Changed

Filename Overview
src/muxi/runtime/services/memory/sqlite.py Removes the broken self.default_user_id fallback from search() and _search_internal(), replacing it with correct 4-way SQL branching. The new logic correctly searches all formation users when user_id=None, matching the write-path which always uses default_user_id for single-user mode.
Dockerfile Adds aarch64-specific sqlite-vec compilation from amalgamation source with SHA-256 verification, --strip-components=1 (addressing previous review), and dynamic Python version path. Also pre-downloads all-MiniLM-L6-v2 alongside the existing model.
docker-entrypoint.sh Adds SIF/Singularity detection to conditionally export HF_HUB_OFFLINE=1 and TRANSFORMERS_OFFLINE=1, correctly gating offline mode so regular Docker containers still reach HuggingFace at runtime.
src/muxi/runtime/formation/overlord/overlord.py Fixes auto_decomposition default from hardcoded True to self.enable_workflow_by_default, which correctly honours the constructor's False default and respects per-instance configuration.
src/muxi/runtime/formation/initialization.py Adds a user-facing print in the persistent memory except block so failures are visible in the startup log rather than silently swallowed by the broad exception handler.
src/muxi/.version Still reads 0.20260312.1 while the CHANGELOG and PR title declare 0.20260313.0 — version mismatch flagged in the previous review thread.
src/muxi/runtime/.version Still reads 0.20260312.1 while the CHANGELOG and PR title declare 0.20260313.0 — version mismatch flagged in the previous review thread.
CHANGELOG.md Adds the 0.20260313.0 entry with accurate descriptions of all five bug fixes; minor CHANGELOG wording issue regarding the HF offline mode placement was flagged in a previous thread.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["_search_internal(query_embedding, k, collection, user_id)"] --> B{collection AND user_id?}
    B -->|Yes| C["SQL: WHERE m.collection = ?\n AND m.user_id = ?\n AND u.formation_id = ?"]
    B -->|No| D{collection only?}
    D -->|Yes| E["SQL: WHERE m.collection = ?\n AND u.formation_id = ?\n(all users in formation)"]
    D -->|No| F{user_id only?}
    F -->|Yes| G["SQL: WHERE m.user_id = ?\n AND u.formation_id = ?"]
    F -->|No| H["SQL: WHERE u.formation_id = ?\n(all users, all collections)"]
    C --> I[Execute & return scored results]
    E --> I
    G --> I
    H --> I
Loading

Last reviewed commit: e682c14

@ranaroussi ranaroussi merged commit e595eb7 into rc Mar 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant