pub fn generate_report(task: Task, result: &Path) -> Option<TaskReport>Expand description
Generates a TaskReport from a result archive (.zip) of a CorTeX processing job, following
the LaTeXML messaging conventions in its cortex.log. Returns None when the archive is
unreadable or empty (0-byte, truncated, non-zip, or no cortex.log entry): that is an
infrastructure failure — the worker returned nothing usable — not a conversion verdict, so
we do not fabricate a terminal Fatal. The caller (sink) skips finalizing it, leaving the
task in-flight for the lease reaper, which retries it and only dead-letters it (with a
cortex/never_completed_with_retries message) after MAX_DISPATCH_RETRIES — never a silent,
unretried Fatal (KNOWN_ISSUES D-18). A readable cortex.log always yields Some — a genuine
verdict, even when it parses to Fatal.