firecrawl / firecrawl/pdf-inspector
Scanned/ImageBased page_signals empty case untested
- Dominant language
- Rust
- Stars
- 19.1k
- Forks
- 1.3k
- Avg merge
- 9h 21m
- Merged PRs (30d)
- 51
Description
## Problem
The Full-mode process result early-return for Scanned/ImageBased PDFs produces an empty `page_signals` list (documented contract at src/lib.rs:193: "empty for DetectOnly and Scanned/ImageBased results"), but no test exercises that branch: no image-backed fixture exists in tests/fixtures, and the only empty-page_signals assertion is the DetectOnly test.
Analyze mode is covered (test_process_pdf_mem_analyze_mode_page_signals); the Scanned/ImageBased branch is not.
## Suggested fix
Add a Scanned/ImageBased fixture test asserting `page_signals == []` for a scanned/image-backed PDF in Full mode, or document the coverage gap explicitly.
## Evidence
- src/lib.rs:3704 -- `if matches!(pdf_type, PdfType::Scanned | PdfType::ImageBased) { return Ok(PdfProcessResult { ... page_signals: Vec::new(), ...}) }`
- tests/integration_tests.rs -- only DetectOnly asserts `page_signals.is_empty()`
## Source
Branch `feat/expose-detector-signals` at `cf0fe17` (PR pending).
## Metadata
Severity: P2
Confidence: 100
Reviewer(s): testing
Finding ID: src/lib.rs:193 + normalize(title)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Scanned/ImageBased early return at src/lib.rs:3704 and the existing integration coverage in tests/integration_tests.rs, especially test_process_pdf_mem_analyze_mode_page_signals. Find or add an image-backed PDF fixture, run the Full-mode process test, and verify that the result has an empty page_signals list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100