project-nomad/admin/app
Chris Sherwood 5193f74410 fix(ZIM): preserve co-existing Wikipedia corpora on cleanup (#884)
onWikipediaDownloadComplete was deleting every file whose name starts
with `wikipedia_en_`, treating distinct corpora (simple, medicine,
wikivoyage, climate_change, etc.) as competing versions of the same
selection slot. Whichever wiki finished second silently wiped the
other from disk.

Match by filename stem instead — strip the trailing `_YYYY-MM(-DD).zim`
date suffix and only delete files with the same stem as the new
download. Different release dates of the same variant still get cleaned
up; distinct variants are preserved.

Extracted the predicate to `app/utils/zim_filename.ts` so the boundary
is covered by unit tests (8 cases incl. the #884 repro scenario).
2026-05-15 22:29:17 -07:00
..
controllers fix(KB): add re-embed and reset & rebuild opts to fix broken embeddings (#886) 2026-05-15 22:05:19 -07:00
exceptions fix(Docs): documentation renderer fixes 2025-12-23 16:00:33 -08:00
jobs fix(KB): add re-embed and reset & rebuild opts to fix broken embeddings (#886) 2026-05-15 22:05:19 -07:00
middleware fix(API): skip compression for Server-Sent Events (#798) 2026-04-27 19:00:31 -07:00
models feat(Content): custom ZIM library sources with pre-seeded mirrors (#593) 2026-05-04 11:30:59 -07:00
services fix(ZIM): preserve co-existing Wikipedia corpora on cleanup (#884) 2026-05-15 22:29:17 -07:00
utils fix(ZIM): preserve co-existing Wikipedia corpora on cleanup (#884) 2026-05-15 22:29:17 -07:00
validators feat(Content): custom ZIM library sources with pre-seeded mirrors (#593) 2026-05-04 11:30:59 -07:00