15 JAN 2026
David debugged: Investigated prefetch_state='failed' mislabelling when all six files succeeded
David refused to accept an agent's surface-level diagnosis about a failed lecture notes run, pushing it to verify whether files were actually downloaded to S3 — and the investigation found that prefetch_metrics (6/6 success) contradicted prefetch_state (failed), a misleading field overwrite.
A lecture notes candidate appeared broken in production: clicking it did nothing. An agent reported that prefetch had failed. David pushed back hard:
I don't believe that. go and see what the primary files are that got prefetched and see if they were actually downloaded to s3
The investigation confirmed that prefetch_metrics showed attempted=6, completed=6, failed=0 — a complete success — while prefetch_state had been overwritten with a downstream lecture-generation failure reason, making a successful prefetch look like a failed one. David also rejected the agent's claim that the lecture notes agent had "opted" to use {ref:...} instead of insert_pdf_pages:
every other run has the same option to use ref too. so stop making the argument that it opted to use ref over insert pdf pages
This led to finding the real bug: a Canvas page whose description_html was empty, causing view_file to return FILE_NOT_PREFETCHED — and in turn no pages were ever fed to the generation agent.