Files
ranxianglei a498a5a453 fix: stop the engine-truncated WAL reclamation that corrupted the shared index (default journal_size_limit -> 0; reclaim via PASSIVE checkpoints)
#7674 — the corruption producer, per the source comparison with
opencode-stable (13 concurrent writers, 9.55 GB db, zero damage):
opencode never asks SQLite to shrink the WAL; the old 8 MiB default made
the engine truncate index.db-wal internally after EVERY completed
checkpoint — an implicit floor-reclaim that no JS-side guard covers,
pulling the WAL out from under live peer connections sharing the
sessions dir (#2671 five-daemon topology, kill-9 handovers). Damage
shape = #7156 (pages double-allocated in the tail, index pages corrupt
first); three field events 2026-11-19/21/23 plus the #7156 incident.

- storage.walJournalSizeLimitBytes default 8388608 -> 0: 0 = the engine
  does not truncate (file sits at its bounded historical high-water
  mark; field ~55 MiB steady); a POSITIVE value keeps the legacy
  truncate-to-N behavior for anyone who wants it.
- open/close reclaim: TRUNCATE -> PASSIVE (frames still converge at
  lane boot / daemon stop; the WAL file is never truncated behind live
  peers). The #7156 activeForeignWriter guard around those two call
  sites is dead code now and is removed; the #4175 lock file itself
  stays (the integrity-cache invalidation still consumes it).
- gc/vacuum operator-requested reclaim: TRUNCATE kept there
  (explicit, infrequent, logged).
- docs en/zh/ja + website config reference + config.ts comment.
2026-11-25 01:01:09 +08:00
..