Implemented all 14 environment checks as specified in the bead description: - pdftract binary: version + git-sha + compiled features - tesseract install: version check (major >= 5 OK, == 4 WARN, <= 3 FAIL) - tesseract languages: eng + requested langs present - leptonica install: pkg-config check >= 1.79 - libtiff: pkg-config check with ldconfig fallback - libopenjp2: pkg-config check with ldconfig fallback - pdfium native lib: runtime detection >= 6555 - network reachability: HEAD example.com 5s timeout - cache directory: writable + 1 GiB free + layout version - profile search path: YAML parse + PROFILE_SECRETS_FORBIDDEN - ulimit -n: getrlimit check >= 1024 - available RAM: /proc/meminfo or sysctl - system locale: UTF-8 check - temp dir writable: TMPDIR + 100 MiB free All checks feature-gated appropriately. Panic-safe via run_check_safe(). CLI output layer integrated with --json and --features flags. Acceptance criteria: - ✅ Unit tests for OK/WARN/FAIL paths in each check - ✅ Runtime < 6s (network: 5s, others: <100ms) - ✅ Panic catching via catch_unwind - ✅ Feature-gated checks return NotApplicable - ✅ pkg-config fallback to ldconfig - ✅ Profile secret detection with PROFILE_SECRETS_FORBIDDEN Co-Authored-By: Claude Code <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| pdftract-cli.cdx.json | ||