Files
JIMMY_JFEXP a1cc4e086d Marketplace Finish: repair sets whose marker says complete but files are missing
"2 chosen maps are only partly downloaded (Population density, Yandex
satellite imagery). Finish" - and Finish did nothing, silently.

Root cause: the banner and the button asked two different questions.
market::unfinished counts a set as unfinished when check_installed's file
count found it short (launcher.log: "popdark says it is installed but holds
293056 of 400268 files", "yandex ... 2371 of 28213"). Finish went through
apply_market, whose market::to_add only reads the markers - .blocks-done.json
listing every block - so it found nothing to add, nothing to remove, and
returned Ok. And even a forced install could not have repaired it: the
installer skips every block the marker lists (install.rs `pending`).

- odian-packs: InstallOptions::recheck_tile_sets. For those sets install_tiles
  counts the tiles on disk per block (tiles_on_disk_per_block: z/x/y.ext names
  only, so .blocks-done.json and the tile server's .missing negatives never
  count), takes off `done` every block holding fewer than the index names
  (forget_short_blocks - more is still whole: a PC bakes its own tiles in),
  rewrites the marker at once so a stopped run reads as partial, and fetches
  just those blocks; finish_block's rename replaces what is there. The
  drive-copy path skips its "recorded complete" shortcut for them too.
- launcher: Finish passes market::short_tile_sets(market_checked) through
  Inner::market_recheck (taken by install_market_items), apply_market runs when
  a re-check is all there is to do, and the log says which sets are repaired.

Counted, not hashed: the index names a block's tiles only by digest, so a
block whose lost tiles were replaced by as many baked ones reads whole.

Spot-check: odian-packs install::tests (a short block is dropped, a whole one
and one with extra baked tiles kept, markers not counted); launcher
market::tests::finish_repairs_the_sets_a_count_found_short with the counts
from the real log.
2026-09-30 15:49:53 +02:00
..