Created comprehensive audit note cataloging all tracked repository debris that violate File and Module Layout norms. Summary of findings: - 50 total files identified across 5 categories - ~267MB of tracked debris (mostly 246MB --1.ppm file) - 13 scratch artifacts in root directory - 6 compiled ELF binaries - 6 stray output files - 18 generator scripts (flagged for relocation, not deletion) - 7 files in non-standard src/ directory Cleanup will be handled by follow-up bead. Closes bf-3t9vy
5.4 KiB
Repository Debris Audit
Bead: bf-a8031
Date: 2026-07-05
Scope: Tracked artifacts violating File and Module Layout norms
Summary
This audit cataloged all tracked repository debris across the pdftract workspace. Found 44 files across 5 categories that violate the project's layout norms.
Category 1: Scratch Artifacts in Root Directory (13 files)
Python scripts in root (should be in scripts/ or removed):
assess_doc_coverage.pyaudit_docs.pycheck_content.pycheck_docs.pycheck_examples.pyfix_fixtures.pytmp_fixtures.py
Rust files in root (should be in examples/, tests/, or removed):
generate_expected_json.rsgen_unmapped_comprehensive.rstest_js_logging.rs
Shell scripts in root (should be in scripts/ or removed):
check_doc_coverage.shmeasure_doc_coverage.sh
Action: All 13 files should be removed. These appear to be temporary development artifacts that have been superseded by tools in scripts/ or crates/.
Category 2: Tracked Compiled Binaries (6 files)
ELF binaries in root directory:
mod— 6.9MB ELF binaryconformance_test— ELF binarytest_trailer_parse— ELF binarytest_trailer_parse2— ELF binarygen_fixtures— Symlink wrapper to ELF binary
ELF binaries in test fixtures:
tests/sdk-conformance/fixtures/gen_fixtures— 4.4MB ELF binarytests/document_model/fixtures/gen_fixtures— 4.4MB ELF binary
Action: Remove all 6 compiled binaries. These are build artifacts that should not be tracked. The test fixture gen_fixtures should be regenerated as needed from source.
Category 3: Stray Output Files (6 files)
Temporary outputs in root:
--1.ppm— 246MB PPM image file (massive disk space waste)out.pdf— 1.3KB PDF outputmemory-report.json— 4.3KB memory profiling outputtest_js.pdf— 668B test outputpdftract-test-merged.cdx.json— 114KB Codecov output0— Mysteriously named file (likely stray output)
Action: Remove all 6 files. These are temporary outputs from development/testing that should not be committed.
Category 4: Tests/Fixtures/ Generator Scripts (18 files)
Generator scripts in tests/fixtures/ root:
generate_book_chapter_fixtures.rsgenerate_cjk_fixtures_fixed.rsgenerate_cjk_fixtures.rsgenerate_encoding_fixtures.pygenerate_encrypted_fixtures.pygenerate_encrypted_fixtures.rsgenerate_large_remote_fixture.rsgenerate_legal_filing_fixtures.rsgenerate_lzw_fixtures_main.rsgenerate_lzw_fixtures.rs.disabledgenerate_ocr_fixtures.rsgenerate_page_class_fixtures.rsgenerate_scientific_paper_fixtures.rsgenerate_slide_deck_fixtures.rsgenerate_suspects_fixture.rsgenerate_suspects_fixtures.rsgenerate_suspects_fixtures_v5.rsPROVENANCE.md(documentation file for fixtures)
Action: FLAG FOR RELOCATION — These generators are legitimate tools for creating test fixtures. They should be moved to tools/ or integrated into xtask/ for proper organization. DO NOT DELETE without relocation plan.
Category 5: Non-Standard Root src/ Directory (7 files)
Files in src/ directory (non-standard for workspace layout):
src/lib.rssrc/graphics_state/mod.rssrc/graphics_state/color.rssrc/graphics_state/diagnostics.rssrc/graphics_state/matrix.rssrc/graphics_state/stack.rssrc/graphics_state/state.rs
Action: Investigate and determine if these are legacy code or active development. If active, relocate to appropriate crate. If legacy, remove.
Files NOT Flagged (Intentional Fixtures)
LZW test binaries (14 files) — LEGITIMATE:
tests/fixtures/lzw_incremental_early.binthroughlzw_truncated.bin
These are small (<50 bytes each) intentional test fixtures for LZW decoder testing. They should remain.
Benchmark corpus PDFs (100+ files) — LEGITIMATE:
benches/competitors/corpus/raster/*.pdfbenches/competitors/corpus/vector/*.pdf
These are intentionally tracked test corpus for benchmarking. They should remain.
Build artifacts — LEGITIMATE:
build/font-fingerprints.jsonbuild/frequency.jsonbuild/glyph-shapes.jsoncrates/pdftract-core/build/*.json
These are generated build data that is intentionally tracked for reproducibility. They should remain.
Statistics
| Category | File Count | Total Size |
|---|---|---|
| Scratch artifacts (root) | 13 | ~500KB |
| Compiled binaries | 6 | ~20MB |
| Stray outputs | 6 | ~247MB (mostly --1.ppm) |
| Generator scripts | 18 | ~200KB |
| Non-standard src/ | 7 | ~50KB |
| TOTAL | 50 | ~267MB |
Note: The 246MB --1.ppm file is the single largest disk space offender.
Recommendations
-
Immediate cleanup (safe to remove):
- Remove all 13 scratch artifacts from root
- Remove all 6 compiled binaries
- Remove all 6 stray output files
- Savings: ~267MB disk space
-
Relocation required:
- Move 18 generator scripts from tests/fixtures/ to tools/ or xtask/
- Investigate and handle 7 files in non-standard src/ directory
-
Update .gitignore:
- Add patterns to prevent future tracking of these file types
- Consider adding
*.ppm,out.pdf,memory-report.jsonpatterns
Next Steps
This audit is for bead bf-a8031 (audit only). The actual cleanup will be handled by a follow-up bead.