Skip to content

FTS initialization and search fallback errors are swallowed without diagnostics #7

@aeitwoen

Description

@aeitwoen

Problem

Search currently has two silent failure paths:

  1. FTS initialization errors are swallowed in src/index.ts around sqlite.exec(FTS_SQL)
  2. search.search(...) catches any exception and falls back to LIKE in src/core/search.ts

This makes FTS degradation invisible.

Why this matters

Fallback itself is useful for malformed query syntax, but catch-all handling also masks unexpected failures (schema drift, runtime errors, extension issues). Users only see lower quality results and no diagnostics.

Suggested fix

  • Surface FTS init failures through logging or an explicit status signal
  • Keep fallback for known FTS parse/syntax errors, but do not swallow unrelated exceptions silently
  • Expose simple health info so callers can tell whether FTS is active

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions