Findings No. 57
When you fix a classifier whose verdicts are cached, you also have to bump the cache version
A PDF readability verdict was cached for 180 days alongside the extraction. Fixing the classifier changed nothing for cached documents until CACHE_VERSION was bumped.
If a function's result is cached alongside its input, fixing the function does not fix the results already in the cache. They stay wrong until they expire.
The CCRTA website offers translated, readable versions of the agency's PDFs. classifyReadable() decides whether an extracted PDF is fit to show, and its readable verdict is stored inside the cached PdfExtract object, which lives for 180 days. We fixed the classifier twice: once to reject mojibake (extraction that produces characters but no words), and once to raise a line limit that had been excluding the Title VI documents. Neither fix changed anything for documents that were already cached. Their old verdicts would have stayed in force for the rest of the 180 days.
The fix was to bump CACHE_VERSION in pdfText.ts with each change (v1 to v2 to v3), which changes the cache key and forces every document to be extracted and classified again. A comment beside the constant now records what each version changed.
The general rule: when a cached value includes the output of a function, changing that function means bumping the cache version too. Shipping the new code alone leaves the old verdicts running.
Receipt: CCRTA Website commits c175084 and 09d6e2e (src/lib/server/translation/pdfText.ts, CACHE_VERSION; FINDINGS.md, "Fail-open systems / observability").