fix(runtime): close SQLite handles and harden Ollama I/O #5

Merged
enderofwings merged 3 commits from Athena/NexusOS:codex/runtime-reliability into main 2026-08-26 17:58:24 +00:00
Contributor

Summary

  • explicitly closes SQLite connections used by database dump, comparison, and restore so Windows can replace the live database immediately
  • sweeps legacy orphaned message vectors at store startup while retaining main's existing single-statement delete_conversation cleanup (the redundant _delete_message_vectors helper is intentionally omitted)
  • separates Ollama's server bind address from the client URL, normalizing wildcard binds such as 0.0.0.0:11434 to a connectable loopback URL
  • includes Ollama's error response in raised HTTP failures and strips inline <think> reasoning from complete and streamed replies

Commit structure

  1. fix(sync): close SQLite handles before restore
  2. fix(memory): sweep legacy orphaned message vectors
  3. fix(ollama): normalize hosts, errors, and reasoning output

Validation

  • focused runtime suites: 45 passed, 1 skipped
  • broad Python suite on Windows: 84 passed, 1 skipped, with 3 current-main Windows portability assertions deselected (two POSIX file-mode assertions and one path-separator assertion)
  • frontend lint and production build passed

Review context

This is the runtime half split out of the closed preview PR #4. It is intentionally independent of the preview feature and is intended to land first.

## Summary - explicitly closes SQLite connections used by database dump, comparison, and restore so Windows can replace the live database immediately - sweeps legacy orphaned message vectors at store startup while retaining `main`'s existing single-statement `delete_conversation` cleanup (the redundant `_delete_message_vectors` helper is intentionally omitted) - separates Ollama's server bind address from the client URL, normalizing wildcard binds such as `0.0.0.0:11434` to a connectable loopback URL - includes Ollama's error response in raised HTTP failures and strips inline `<think>` reasoning from complete and streamed replies ## Commit structure 1. `fix(sync): close SQLite handles before restore` 2. `fix(memory): sweep legacy orphaned message vectors` 3. `fix(ollama): normalize hosts, errors, and reasoning output` ## Validation - focused runtime suites: 45 passed, 1 skipped - broad Python suite on Windows: 84 passed, 1 skipped, with 3 current-`main` Windows portability assertions deselected (two POSIX file-mode assertions and one path-separator assertion) - frontend lint and production build passed ## Review context This is the runtime half split out of the closed preview PR #4. It is intentionally independent of the preview feature and is intended to land first.
Athena added 3 commits 2026-08-26 08:40:51 +00:00
Use contextlib.closing for dump, comparison, and restore connections so Windows can unlink the live database immediately after the comparison step.
Repair vector rows left behind by older databases at store startup. Keep the existing single-statement delete path from main and avoid reintroducing the redundant batched helper.
Separate bind and client addresses, include Ollama's response body in HTTP failures, and strip inline <think> blocks from complete and streamed replies.
enderofwings merged commit 3e89df142b into main 2026-08-26 17:58:24 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: enderofwings/NexusOS#5