• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ory / lumen / 23479609697
68%

Build:
DEFAULT BRANCH: main
Ran 24 Mar 2026 08:17AM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Mar 2026 08:15AM UTC coverage: 67.801% (-0.6%) from 68.398%
23479609697

push

github

aeneasr
fix(store,index): auto-recover from SQLite database corruption

When SQLite reports "database disk image is malformed" or "disk I/O
error", the index is permanently broken until manually purged. Every
subsequent semantic_search call would fail with the same error because
touchChecked is never set and each retry hits the same corrupted file.

This change adds automatic recovery at two layers:

- store.New: if open/schema-setup fails with a corruption error, delete
  the DB file and its WAL/SHM sidecars and retry once from a clean state.
  In-memory databases are never deleted.

- Indexer.EnsureFresh / Index: if indexWithTree returns a corruption
  error mid-operation, log ERROR "corrupted database detected, rebuilding",
  call rebuildStore() (close → delete files → reopen), then retry with an
  empty stored hash so the fresh DB receives a full index pass.

Adds IsCorruptionErr(err) to the store package as the single source of
truth for what constitutes a SQLite corruption error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

8 of 65 new or added lines in 2 files covered. (12.31%)

398 existing lines in 6 files now uncovered.

2491 of 3674 relevant lines covered (67.8%)

44.57 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
14
69.44
-2.49% internal/store/store.go
43
67.79
-11.4% internal/index/index.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
76.47
11.76% cmd/hook_spawn_unix.go
16
80.25
-12.29% internal/tui/progress.go
28
50.0
2.29% cmd/hook.go
52
3.57
-1.48% cmd/index.go
61
67.79
-11.4% internal/index/index.go
239
60.87
6.89% cmd/stdio.go
Jobs
ID Job ID Ran Files Coverage
1 23479609697.1 24 Mar 2026 08:17AM UTC 30
67.8
GitHub Action Run
Source Files on build 23479609697
  • Tree
  • List 30
  • Changed 8
  • Source Changed 8
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23479609697
  • 652b4180 on github
  • Prev Build on main (#23404198169)
  • Next Build on main (#23479678375)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc