Skip to content

fix(memory): fully disable derived full-text indexes - #115685

Merged
steipete merged 1 commit into
mainfrom
codex/fix-memory-fts-disable-114317
Jul 29, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-memory-fts-disable-114317

Conversation

@steipete-oai

Copy link
Copy Markdown
Contributor

Closes #114317
Related contributor investigation: #114319 (thank you @kevin2966n).

What Problem This Solves

Fixes an issue where operators disabling memory hybrid/full-text search still retained the SQLite path-search index and all three source-write triggers. Canonical memory writes therefore continued maintaining disabled derived state and could fail if that state was damaged.

Why This Change Was Made

Keep the fix in the canonical memory-host SQLite owner: remove path maintenance triggers before dropping their derived path table whenever FTS is disabled, retain the shipped custom-body-table behavior, and let the existing enable path rebuild indexes exclusively from canonical memory sources. No schema-version bump, migration, dependency, provider knob, configuration, or public Plugin SDK change.

User Impact

Disabling hybrid search fully disables its path-index write cost; source writes remain independent of derived search tables, and re-enabling search automatically recovers every memory path, including sources written while disabled.

Evidence

  • Genuine failing-before proof on current main using Blacksmith Testbox: the new real node:sqlite lifecycle regression received the disabled path FTS table and all three source triggers instead of an empty schema.
  • Passing-after proof covers canonical and shipped custom body-table selections, live source insertion while disabled, and canonical-row backfill on re-enable.
  • Remote focused memory proof: 2 focused canonical/custom SQLite lifecycle regressions, 23 existing schema tests, 8 legacy-migration tests, and 35 real memory-search tests: all 68 passed on the exact final head. The broader 106-test memory-index suite also passed before the final custom-body compatibility refinement.
  • Full CI=1 pnpm check:changed on the exact final commit: passed, including format, max-line ratchet, core and test typechecks, typed lint, plugin boundaries, state-schema guard, database-first storage guard, runtime cycles, and all relevant SDK contracts.
  • Independent gpt-5.6-sol extra-high-effort autoreview: clean, correctness 0.95.
  • Report and original broader investigation: thanks @kevin2966n (Disabling memory FTS leaves the path index and write triggers active #114317, fix(memory): preserve index and session-state integrity #114319). This PR intentionally lands only the independently reproduced FTS-disable bug; it does not claim to fix the contributor's other reports.
  • Standalone live Node 24 SQLite proof: REAL_SQLITE_FTS_DISABLE_REENABLE_PASS for canonical and custom body configurations; inserts while FTS is disabled are recovered through a real SQLite FTS MATCH after re-enable.
  • Testbox proof: tbx_01kyp7kezqx3msgw7kbk68xesf; final commit: 6981f5d28617c83fee9b965153ef559658d8b58b.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete-oai
steipete-oai marked this pull request as ready for review July 29, 2026 06:34
@steipete
steipete force-pushed the codex/fix-memory-fts-disable-114317 branch from 6981f5d to eaee077 Compare July 29, 2026 07:04
@steipete
steipete merged commit 263d176 into main Jul 29, 2026
191 of 194 checks passed
@steipete
steipete deleted the codex/fix-memory-fts-disable-114317 branch July 29, 2026 08:01
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabling memory FTS leaves the path index and write triggers active

2 participants