Repository navigation
fix(memory): restore FTS fallback for same-name view collisions - #144783
Conversation
Detect SQLite views before FTS schema reconciliation so matching row counts cannot falsely report an available body index. Preserve colliding views, canonical rows, and existing ordinary-table repairs. Regression context: #144641. Validated with 53 focused tests and the full changed gate. P2 review raised only an unchanged path-trigger recovery limitation, confirmed with paired original/candidate SQLite proof and retained as a separate follow-up.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 11, 2026, 5:12 AM ET / 09:12 UTC (Revision 2). ClawSweeper reviewWhat this changesMemory search now detects SQLite views occupying full-text index names, preserves those views, and selects the existing unavailable-index fallback. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix for a defect still present on current main. No actionable patch defects were found, and the updated compatibility evidence resolves the previous review blocker. Priority: P2 Review scores
Verification
How this fits togetherMemory Core searches indexed memory and session content stored in each agent’s SQLite database. The Memory Host SDK checks optional full-text indexes and reports their availability to the search manager, which selects keyword or semantic search behavior. flowchart TD
A[Memory and session content] --> B[Canonical SQLite rows]
B --> C[Full-text schema check]
C --> D{View occupies index name?}
D -->|Yes| E[Preserve view and report unavailable]
D -->|No| F[Reconcile full-text indexes]
E --> G[Existing semantic fallback]
F --> H[Keyword and hybrid search]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +5, Tests +49. Total +54 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep view rejection in the existing FTS schema owner while preserving canonical data, ordinary-table repairs, and semantic fallback behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: replace the body FTS table with a view mirroring canonical chunks, then initialize with FTS enabled; current main can report it available because the row counts match. No runtime commands were executed during this review. Is this the best way to solve the issue? Yes. Detecting views before reconciliation repairs the existing availability contract without adding another owner or changing the persisted format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f6568b40c101. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Keep the existing cannot-modify message when rejecting a colliding view before FTS reconciliation. This preserves the status diagnostic checked by the merged #144761 temporal-ranking fixture without changing schema or recovery behavior. Validated with 53 focused tests using the exact merged fixture. Incremental P2 review found no actionable issues; the previously recorded path-trigger recovery limitation remains unchanged.
|
Merged via squash.
|
Preserve the reviewed harness while incorporating the landed benchmark prerequisite. Punchcard-Session: coral-orchard-orchard-d4 * commit '4407ed19ac63b1c1c84a0cfe6eb4bbeca9c2322c': (1196 commits) fix(perf): isolate benchmark subprocess transport (#144159) refactor(auth): await Copilot cache persistence (#144810) refactor(web-fetch): exercise URL normalization through the public tool (#144887) fix(ollama): preserve hosted subdomain model context (#144891) fix(doctor): explain Codex plugin health failures (#144813) fix(channels): honor pinned accounts in Mattermost model menus (#144880) fix(update): failed-update records hide the triggering error behind the excerpt tail (#144729) fix(logging): preserve OpenClaw package references in diagnostics (#144808) fix: retain plugin detail tab selections while inspection loads (#144647) fix: keep discovered models when sign-in tokens renew (#144861) fix(update): preserve local package overrides (#89985) fix(update): resolve compatibility bridges within the runtime graph (#144831) chore(i18n): refresh native locales (#144856) fix: preserve child signal termination during CLI respawn (#144838) fix(text): hide encoded MiniMax tool envelopes (#126307) fix(subagents): deliver child replies that match the empty placeholder (#130647) fix(cli): reject blank message channel selectors (#144802) fix(telegram): preserve mixed text order and pending stop (#144839) fix(memory): restore FTS fallback for same-name view collisions (#144783) chore(release): close out 2026.9.4 on main (#144708) ...
…claw#144783) * fix(memory): restore FTS fallback for same-name view collisions Detect SQLite views before FTS schema reconciliation so matching row counts cannot falsely report an available body index. Preserve colliding views, canonical rows, and existing ordinary-table repairs. Regression context: openclaw#144641. Validated with 53 focused tests and the full changed gate. P2 review raised only an unchanged path-trigger recovery limitation, confirmed with paired original/candidate SQLite proof and retained as a separate follow-up. * fix(memory): preserve SQLite view-collision diagnostics Keep the existing cannot-modify message when rejecting a colliding view before FTS reconciliation. This preserves the status diagnostic checked by the merged openclaw#144761 temporal-ranking fixture without changing schema or recovery behavior. Validated with 53 focused tests using the exact merged fixture. Incremental P2 review found no actionable issues; the previously recorded path-trigger recovery limitation remains unchanged.
Related: #144641, #144761
What Problem This Solves
Fixes an issue where memory searches could report full-text search as available when a SQLite view occupied the body index name, bypassing the intended unavailable-FTS fallback. The fixture repair in #144761 restored CI coverage but left this production detection bug unchanged.
Why This Change Was Made
The row-count optimization in #144641 exposed a table-only schema lookup: a same-name view could remain in place with matching row counts. The existing FTS schema owner now detects views and rejects the collision before reconciliation, preserving the view and canonical memory rows. It retains SQLite's existing view-collision diagnostic, including the expectation added in #144761. Ordinary derived-table repairs remain unchanged.
User Impact
Memory search can use its existing fallback when a view shadows the canonical or custom body FTS index. No schema migration or configuration change is required.
Evidence