-
fix(preload): make the freshness check trustable, and delete 198 fake wavs · 46b521d8
Deleted 198 AppleDouble resource forks named zz._*.wav, on explicit owner instruction. Every one confirmed by file(1) magic before removal rather than by name pattern -- 198/198 candidates came back 'AppleDouble encoded Macintosh file', zero false positives, 0.3 MB. 69 were in playable banks (rhadamanthe_fx 227->189, _divers 314->293, _vocal 77->72, _melo 32->30); 129 were under Samples/baba/__MACOSX/, whose emptied dirs were rmdir-ed. Sample indices were untouched: the zz. prefix sorted them after every real sample, which is presumably why someone renamed rather than deleted. The boot is now free of the 'WARNING: File reading failed' wall. Then three faults in the freshness path, each hiding the next: 1. preload.scd's mismatch banner said 'whitelist is STALE, regenerate it' when the cause was unreadable files, and regenerating provably changed nothing. Now reports 'N bank(s) DID NOT FULLY LOAD', separates got==0 (whole bank) from 0<got<expected (folder changed, or some files are not audio), and prints the file(1) one-liner that distinguishes them. 2. check-preload.sh compared bank NAME SETS and never counts. The plan said rhadamanthe_vocal=77 against a folder of 72 and the checker printed 'ok' while the boot said 'expected 77 files, got 72' -- and --fix refused to regenerate, because by the name-set test nothing had changed. The everyday way to hit this is dropping a new pack into an existing bank: every new file lazy-loads mid-set under a green check. Now compares name+count pairs and prints 'plan N -> disk M' per drifted bank. 3. The bank-name regex was case-blind. [a-z0-9_]+ truncated rampleA0 to rample and collapsed every vocalOoh1/vocalScatJ into one 'vocal', which is why the checker said 111 banks while SuperDirt loaded 124. 124 was always the truth; the regex was wrong in both directions, undercounting the plan AND inventing two bank names that do not exist. bank_counts() had inherited it, so drift in a camelCase bank stayed invisible even after fault 2 was fixed. Three numbers now agree: checker 124, boot '124/124 banks OK in 5.2 s', independent parse 124/124/no gap. Drift tested both directions on a camelCase bank, plan byte-identical afterwards.
PLN (Algolia) authored46b521d8
×