project-nomad/admin/app
Chris Sherwood 9bc846d97e fix(kiwix): self-heal a missing or corrupt library XML on startup
Kiwix runs in library mode reading kiwix-library.xml via --monitorLibrary.
Today a missing or corrupt XML is only repaired on the download path
(rebuildFromDisk after a completed download), so if the file is lost or
truncated outside that flow — storage relocation, an interrupted write, manual
deletion — Kiwix comes up serving an empty library with no path to recovery.

Add KiwixLibraryService.ensureLibraryXmlHealthy(): reads the XML, and if it's
missing (ENOENT) or fails to parse / lacks a <library> root, rebuilds it from
the ZIM files on disk. A well-formed but empty library is treated as valid (no
spurious rebuild), and filesystem errors other than ENOENT are surfaced rather
than masked. The boot provider calls it on the already-in-library-mode path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 15:45:06 -07:00
..
controllers feat(supply-depot): add custom launch URLs for apps 2026-06-08 15:35:44 -07:00
exceptions fix(Docs): documentation renderer fixes 2025-12-23 16:00:33 -08:00
jobs fix(KB): stop ZIM ingestion progress freezing at 99% on multi-page archives 2026-06-08 14:29:32 -07:00
middleware fix(API): skip compression for Server-Sent Events (#798) 2026-05-20 10:16:00 -07:00
models feat(supply-depot): add custom launch URLs for apps 2026-06-08 15:35:44 -07:00
services fix(kiwix): self-heal a missing or corrupt library XML on startup 2026-06-08 15:45:06 -07:00
utils fix(KB): stop partial_stall warning firing on atypical ZIMs (link-out/PDF-heavy) 2026-06-08 14:23:40 -07:00
validators feat(supply-depot): add custom launch URLs for apps 2026-06-08 15:35:44 -07:00