Verify that the unmapped_glyph_names configuration is properly wired
through to the CMAP entry creation point in Type1 font encoding
differences parsing.
The configuration was already added in bf-4zgpr (commit 7660cfc8). This
bead confirms the wiring is complete:
- DifferencesOverlay stores unmapped_glyph_names as instance state
- Default initialization loads from global UNMAPPED_GLYPH_NAMES set
- Skip check at encoding.rs:227 filters unmapped glyphs before entry creation
- Custom configuration available via with_unmapped_glyph_names() constructor
Acceptance criteria:
- ✅ CMAP entry creation accepts unmapped_glyph_names (via self field)
- ✅ Configuration passes from defaults to entry creation
- ✅ Code compiles without errors
See notes/bf-2nn5x.md for detailed verification.
The CMAP skip check for unmapped glyphs was already implemented in
commit 7660cfc8 (bead bf-4zgpr). This note documents the verification
of that implementation.
Acceptance criteria verified:
- Code checks glyph name against unmapped_glyph_names ✓
- Unmapped glyphs are skipped during CMAP generation ✓
- Skip happens cleanly (no errors, no panics) ✓
- Code compiles without errors ✓
See notes/bf-3s7gd.md for details.
Add unmapped_glyph_names configuration field to DifferencesOverlay struct,
which serves as the CMAP generator for Type1 font encoding differences.
Changes:
- Added unmapped_glyph_names: HashSet<String> field to DifferencesOverlay
- Added with_unmapped_glyph_names() constructor for custom configuration
- Added is_unmapped_glyph_name() instance method for checking membership
- Added unmapped_glyph_names() getter and set_unmapped_glyph_names() setter
- Updated parse() to use instance method instead of global function
- Defaults to global UNMAPPED_GLYPH_NAMES set when not explicitly configured
Acceptance criteria:
- CMAP generator struct has unmapped_glyph_names field
- Field is HashSet<String> for O(1) lookup efficiency
- Field can be set via constructor or setter method
- Code compiles and all tests pass (24 encoding tests)
Closes bf-4zgpr. See notes/bf-4zgpr.md for verification details.
- Identified ToUnicodeMap::add_mapping() as primary creation point
- Located at crates/pdftract-core/src/font/cmap.rs:86-88
- Uses HashMap<Vec<u8>, Vec<char>> for storage
- Called from parse_beginbfchar() and parse_beginbfrange()
- Documents call sites and data structure for skip logic implementation
Closes bf-o4nrq
Captured version 0.1.0 from workspace Cargo.toml and commit hash b13db189.
Saved to /tmp/pdftract-version-info.txt for downstream bead use.
Closes bf-4636k
Verified all test helper functions, fixtures, and constants for encryption
testing are complete and functional per bead bf-1b9yf.
- Constants: EXIT_ENCRYPTED = 3 ✓
- Fixtures: 5 encrypted PDFs exist and are valid ✓
- Path functions: workspace_root, pdftract_bin, encrypted_fixture all work ✓
- Test helpers: run_pdftract_extract, assertion helpers all compile ✓
- Mock builders: dict builders for RC4/AES encryption ready ✓
- Verification tests: all pass in verify_encryption_fixtures.rs ✓
Closes bf-1b9yf
Located and documented the exact locations where ToUnicode entries are created:
- Primary storage: ToUnicodeMap::add_mapping() in cmap.rs:86-88
- Resolution entry: resolve_level1() in resolver.rs:397-401
- Documented data flow from PDF dictionaries through text extraction
- Identified existing filtering logic (empty/U+FFFD entries)
- Identified where to add future skip logic for unmapped glyphs
Closes bf-1pq0q. Verification: notes/bf-1pq0q.md.
All acceptance criteria met:
- All 5 test modules present and properly structured
- Fixture validation tests run successfully (not ignored)
- Encrypted PDF tests have #[ignore] with clear reasons
- File compiles successfully with no errors
- 10 encrypted PDF tests ignored, 3 fixture validation tests pass
Verification note: notes/bf-1or48.md
Identified where in the stream decoder fixture test the error assertion
should be added and what it should validate.
Key findings:
- flate_truncated fixture should emit STREAM_DECODE_ERROR diagnostic
- StreamDecoder::decode() trait doesn't support diagnostics output
- Test loop lacks diagnostic validation
- Assertion should be added after line 326 in test loop
- Test needs to be updated to use decode_stream() which returns DecodeResult with diagnostics
Closes bf-2hjaa.
Add verification note confirming all helper functions, constants, and fixture
infrastructure are in place and working correctly.
Verified:
- All 4 helper functions (workspace_root, encrypted_fixture_dir,
encrypted_fixture, pdftract_bin) present and functional
- ENCRYPTION_EXIT_CODE and ENCRYPTED_FIXTURES constants defined
- All 7 fixture files exist and are valid PDFs
- Code compiles successfully with zero errors
- Fixture validation tests pass (3/3)
Note: File structure differs from task description (simpler design without
diag_codes/error_messages/encryption_types modules or ExtractionResult
struct), but all core functionality is present and working.
Closes bf-36c0b
- Verified forms_integration test runs successfully end-to-end
- All 6 tests pass without hanging, panicking, or infinite loops
- Test output is clear and readable with structured messages
- Fixtures directory scaffold ready for future PDF form fixtures
- Binary exists and is executable at target/debug/pdftract
Closes bf-2s1hq
Analyzed how errors are organized in pdftract-core:
- ExtractionResult has page-level errors in PageResult.error
- ExtractionMetadata tracks error_count and diagnostics array
- JSON Output schema has structured errors array with DiagnosticJson
- Mapped error data flow from extraction to JSON output
Verification: notes/bf-4ix4m.md
Commented out unused internal module imports in encryption error tests
with comprehensive documentation explaining the subprocess testing
approach. Verified all modules exist and compile successfully.
Verified imports:
- pdftract_cli::password (crates/pdftract-cli/src/password.rs)
- pdftract_core::diagnostics types (crates/pdftract-core/src/diagnostics.rs)
Tests use std::process::Command to spawn CLI binary, not direct
module calls. Imports retained as comments for future reference.
Closes bf-31re9. Verification: notes/bf-31re9.md
- Test file test_truncated_flate_recovery.rs does not exist
- Correct error code is STREAM_DECODE_ERROR (not STREAM_DECOMPRESS_ERROR)
- Document extraction result errors array structure
- Document existing test patterns for error assertions
- Note implications for parent beads in dependency chain
Verified that the pdftract extract command integration is complete:
- All 6 forms_integration tests pass
- test_extract_all_discovered_pdfs() calls pdftract extract --json on each fixture
- Success/failure logging is implemented
- Test completes without panicking
Acceptance criteria: PASS (all 4 criteria met)
Closes bf-1oxk7
- Add std::process::Stdio to imports in both test files
- Update code to use imported Stdio instead of fully qualified paths
- Verify compilation succeeds with cargo check
Closes bf-3x4rp. Verification: notes/bf-3x4rp.md
- Updated degraded-200dpi-ground-truth.txt with accurate transcription
- Matches first 2500 chars of source document (as created by PDF generation script)
- Contains Abraham Lincoln public domain text with metadata
- Verified with diff against source content
- Includes verification note at notes/bf-cc7ru.md
Acceptance criteria:
✓ Ground truth file exists in tests/fixtures/scanned/low-quality/
✓ Accurately reflects source document content (verified)
✓ Properly formatted and readable
✓ Special characters handled appropriately
Closes bf-cc7ru
- Created degraded-200dpi.pdf (588KB) with intentional degradation
- Applied 200 DPI, blur, noise, contrast reduction, compression
- Used public domain Abraham Lincoln text as source
- Added supporting infrastructure (creation script, ground truth)
- PDF verified renderable and suitable for OCR testing
- Updated PROVENANCE.md with fixture metadata
Closes bf-4ozna.
Implemented discovery logic already exists in tests/forms_integration.rs:
- discover_pdf_fixtures() uses walkdir for recursive PDF discovery
- find_pdf_fixtures() uses std::fs for non-recursive discovery
- All 6 tests pass, including test_discover_pdf_fixtures which prints discovered fixtures
- Test is idempotent with no side effects
Acceptance criteria:
✅ Discovers PDF files in tests/fixtures/forms/
✅ Prints discovered fixtures for verification
✅ cargo test forms_integration passes (6/6 tests)
✅ Test runs identically on repeated execution
Verification: notes/bf-14tjh.md
- Document acceptance criteria status (PASS/WARN items)
- Record corpus metrics and verification steps
- Note grep implementation blocked on 7.8.x beads
Documented the disposition of all untracked work products, verified clean
workspace state, and confirmed all commits pushed to forgejo.
Acceptance criteria:
- PASS: Encoding fixtures deferred to bf-512z1 (open bead)
- PASS: SDK templates handled by bf-5o8cg (closed bead)
- PASS: No untracked files requiring disposition
- PASS: Clean working tree verified
- PASS: cargo check passes
- PASS: All commits pushed to forgejo
- Add files_per_second field to BenchmarkResult struct
- Add calculate_files_per_second() method for throughput measurement
- Add save_to_file() method for JSON export of benchmark results
- Update main output to display files_per_second metric
- Update .needle-predispatch-sha to latest commit
These changes improve the benchmark infrastructure by adding file processing
rate tracking and persistent result storage for trend analysis.
Part of bf-51ugu: Handle untracked work products and push to forgejo.
Completed disposition of tracked modifications in pdftract-cli/src and
build artifacts per audit findings. CLI changes reverted pending bead
assignment for grep feature work. Fuzz infrastructure already committed
in prior work. Working tree clean for all target directories.
Closes bf-4kv4g.
Verification: notes/bf-4kv4g.md
Acceptance criteria:
- PASS: No tracked changes in pdftract-cli/src
- PASS: No tracked changes in Cargo.lock
- PASS: No tracked changes in fuzz/
- PASS: cargo check passes
- PASS: Working tree clean for target directories
- Add schema.json with complete baseline metrics definition
- Required fields: commit_sha, timestamp, pdftract_geomean, grep_1000_mean_ms
- Optional fields: throughput_mb_per_sec, files_per_sec, total_runtime_sec
- All fields include types, units, descriptions, and examples
- Follows JSON Schema draft-07 specification
- Add README.md with comprehensive documentation
- Purpose and use cases for baseline metrics
- Complete field reference with types and units
- Schema validation instructions
- CI/CD integration guidelines
- Performance targets from project plan
- Update procedures and regression detection
- Validate existing main.json against schema structure
- All required fields present and correctly formatted
Acceptance criteria:
✓ benches/baselines/ directory exists
✓ JSON schema documented with all required fields
✓ README explains baseline format and purpose
✓ Schema includes types and units for each metric
Fuzz harness executed successfully:
- No crashes or panics on startup
- Process ran for full 0.5-second duration
- Coverage expanded from 124 to 518+ edges
- Generated 203+ test cases from empty corpus
- Clean exit via timeout (expected)
Verification: notes/bf-1bpzw.md
Acceptance criteria: PASS (all 4 criteria met)
- Reverted cmap.rs and encoding.rs changes (belong to open bead bf-15yig)
- Created verification note at notes/bf-3ewah.md
- Updated audit document notes/bf-9v6fa-audit.md with final disposition
- Verified no tracked changes remain in pdftract-core/src
- All acceptance criteria PASS
Closes bf-3ewah. Verification: notes/bf-3ewah.md
Created verification note documenting stdout and stderr capture
to log files using standard shell redirection syntax (> output.log 2>&1).
Verified:
- Both stdout and stderr are captured to log files
- Files created in notes/ directory with 644 permissions
- Log files are readable with cat and other standard tools
- Tested with pdftract --help (stdout) and error commands (stderr)
Closes bf-694ie.
All acceptance criteria verified:
- Glyph names checked against unmapped_glyph_names config
- Unmapped glyphs skipped during CMAP generation
- Code compiles without errors
- Tests demonstrate skip behavior
The implementation was already complete in encoding.rs:200.
See notes/bf-1puzp.md for detailed verification.