Skip to content

Replace document parsing with AnyDoc - #11

Closed
mattv8 wants to merge 2 commits into
betafrom
merry-walrus
Closed

Replace document parsing with AnyDoc#11
mattv8 wants to merge 2 commits into
betafrom
merry-walrus

Conversation

@mattv8

@mattv8 mattv8 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace supported document parsing with a shared local AnyDoc adapter
  • route indexer and runtime PDF extraction through the same conversion contract
  • update dependency, extension, Docker, and regression-test coverage

Verification

  • docker build --target python-pytest -f docker/Dockerfile .
  • 2,003 passed, 7 skipped
  • mypy and Pyright passed before commit
  • runtime Docker image build passed

Base automatically changed from feat/cross-workspace-sqlite to beta August 7, 2026 17:09
# Office documents
# AnyDoc README-supported document formats. Keep this as the canonical
# AnyDoc taxonomy so parser-facing sets can reuse it without local drift.
ANYDOC_DOCUMENT_EXTENSIONS: set[str] = {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical AnyDoc taxonomy is expanded here, but the filesystem-index UI defaults and User Space binary-prefetch gate are not updated in this PR. Most newly advertised formats are therefore omitted by default or treated as editor text. Please propagate this matrix to those consumer gates and pin parity with focused tests.

sys.modules[module_name] = module

fake_file_constants = types.SimpleNamespace(
ANYDOC_DOCUMENT_EXTENSIONS={".pdf", ".docx", ".csv", ".docm", ".xlsm", ".xlsb", ".pps", ".pot", ".pptm", ".ppsx", ".ppsm"},

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This focused fake extension set and the three routing examples do not prove conversion coverage for the full 21-extension taxonomy or consumer paths such as chat attachments, index collection, and User Space parsing. Please parameterize against the canonical set and add a native AnyDoc conversion smoke check.

@mattv8 mattv8 closed this Aug 13, 2026
@mattv8
mattv8 deleted the merry-walrus branch August 13, 2026 15:22
@mattv8
mattv8 restored the merry-walrus branch August 13, 2026 15:22
@mattv8 mattv8 reopened this Aug 13, 2026
@mattv8
mattv8 force-pushed the merry-walrus branch 4 times, most recently from cb0b4e5 to cdfd032 Compare September 3, 2026 22:12
- Bump firecrawl-anydoc 0.1.6 -> 0.2.4 in app and runtime extras; map the
  new NeedsOcrError to a typed NEEDS_OCR conversion failure and treat it
  like UNSUPPORTED (empty text) in runtime PDF reads, matching the old
  pypdf behavior for scanned/image-only PDFs
- Remove the dead pandas dependency (zero imports repo-wide) from
  pyproject and the Dockerfile import asserts; dev image assert now
  verifies anydoc instead
- Prefill all AnyDoc-supported document extensions in the filesystem
  indexer default include patterns (both ToolWizard defaults)
- Deny-list the new binary office variants (.docm, .pptm, .pps, .ppsx,
  .ppsm, .pot, .rtf, .epub) in the userspace prefetch heuristic; .csv
  stays prefetchable since it is text-editable
- Revert Optional[str] style churn in document_parser to pre-PR unions
- Cover NEEDS_OCR in document parser and runtime PDF read tests
@mattv8 mattv8 closed this Sep 4, 2026
@mattv8
mattv8 deleted the merry-walrus branch September 4, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant