mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
* fix(verify-layout): walk PATH candidates for pdftotext supporting -bbox (#655) Git for Windows prepends C:\Program Files\Git\mingw64\bin to PATH under Git Bash (which Claude Code's Bash tool uses on Windows). That directory ships an xpdf pdftotext 4.00 without -bbox support. Previously, verify_layout.py resolved whichever pdftotext shutil.which found first, causing the layout check to exit 2 with skipped: on Windows even when a working Poppler build (e.g. from MiKTeX, Chocolatey, or Scoop) was installed further down PATH. Walk all candidates returned by shutil.which("pdftotext", path=entry) for each entry in os.get_exec_path(), de-duplicated. Probe each candidate's -h output for -bbox support, and call subprocess.run with the full path of the first working binary instead of the bare command name. If no candidate supports -bbox, keep today's skip message on failure. Tests added to TestExtractorFailure in tests/test_verify_layout.py: - First candidate lacks -bbox and second has it (second candidate's full path is run) - No candidate has -bbox (skip path is kept) - PATH candidate de-duplication (avoids redundant probes) Fixes #655 * perf(verify-layout): cache resolved pdftotext binary at module level * changelog: place the #668 entry under [Unreleased] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Mads Lorentzen <madslorentzen_17@hotmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>