2c55f076be
The status calculation required ALL steps to be explicitly marked as success/skipped before a file could be "completed". This failed for dynamic pipelines where: 1. check_for_duplicates was logged before the file record existed (no file_id), so its FileProcessingStep was never updated from "pending" 2. extract_text was not marked as "skipped" for non-PDF files that go through PDF conversion first Fix: - Move check_for_duplicates success log to after initialize_file_steps() with the correct file_id so the step actually gets updated - Mark extract_text as "skipped" for non-PDF files - Add terminal-step fallback: if send_to_all_destinations is "success", the file is "completed" even if intermediate steps remain "pending" (handles any other dynamic pipeline edge cases) Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>