Skip to content

fix(session-index): bound FTS rebuild memory - #9

Merged
AstroQore merged 1 commit into
mainfrom
fix/session-index-batched-rebuild
Aug 20, 2026
Merged

fix(session-index): bound FTS rebuild memory#9
AstroQore merged 1 commit into
mainfrom
fix/session-index-batched-rebuild

Conversation

@AstroQore

Copy link
Copy Markdown
Owner

Summary

  • rebuild the full session index in bounded 4 MiB / 128-session FTS batches
  • release SQLite and malloc caches after every committed batch
  • keep search scopes, excerpts, snippets, and per-session indexing policy unchanged
  • force a schema-v5 derived-index rebuild so existing pathological segment layouts are replaced

Verification

  • targeted session-index suites: 45 tests passed
  • full package suite: 567 tests across 81 suites passed
  • git diff --check

Co-Authored-By: Codex <codex@openai.com>
@AstroQore
AstroQore merged commit 5c8d906 into main Aug 20, 2026
1 check passed
@AstroQore
AstroQore deleted the fix/session-index-batched-rebuild branch August 20, 2026 05:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a9739b003

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
PRAGMA foreign_keys=ON;
PRAGMA temp_store=FILE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep SQLite temporary files in the caller-provided directory

When FTS indexing or a query needs temporary storage, forcing temp_store=FILE makes SQLite create temporary files in its process-wide OS-selected temp directory rather than beside the caller-provided database URL. This breaks the library's filesystem boundary and can write session-derived data somewhere the caller never authorized; use memory-backed temporary storage or another mechanism that confines spill files to the supplied directory.

AGENTS.md reference: AGENTS.md:L88-L89

Useful? React with 👍 / 👎.

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