From f69c04a0e3f60584c24dd9dc5f33a6d06200c35e Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 14 Apr 2026 15:43:21 +0000 Subject: [PATCH] Phase 3: fix page_count in transcript processor Set page_count on documents row during pre_flight. Without this, enricher comparison `page_count >= 3` fails with TypeError on NULL. Co-Authored-By: Claude Opus 4.6 --- lib/processors/transcript_processor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/processors/transcript_processor.py b/lib/processors/transcript_processor.py index 76998f7..392db6d 100644 --- a/lib/processors/transcript_processor.py +++ b/lib/processors/transcript_processor.py @@ -132,11 +132,11 @@ def pre_flight(content_path, meta_path, db, config): # Queue and advance to extracted db.queue_document(file_hash) - # Set text_dir on the documents row + # Set text_dir and page_count on the documents row conn = db._get_conn() conn.execute( - "UPDATE documents SET text_dir = ? WHERE hash = ?", - (proc_dir, file_hash) + "UPDATE documents SET text_dir = ?, page_count = ? WHERE hash = ?", + (proc_dir, len(pages), file_hash) ) conn.commit()