Skip to content

L0C-04: DocumentState blackboard - #4

Merged
r-uben merged 1 commit into
mainfrom
feat/document-state
Mar 18, 2026
Merged

L0C-04: DocumentState blackboard#4
r-uben merged 1 commit into
mainfrom
feat/document-state

Conversation

@r-uben

@r-uben r-uben commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Central DocumentState blackboard that tracks full processing state per page
  • PageState holds all engine attempts, born-digital status, and current best output
  • apply_result() merges EngineResult outputs; apply_born_digital() integrates detection
  • Properties: text, pages_needing_repair, total_cost, engines_used
  • Handles page_num=0 (CLI whole-doc) vs per-page (HTTP) outputs

Test plan

  • 36 new tests covering all methods and properties

Central dataclass that accumulates per-page OCR results as a document
flows through pipeline stages. Stores all engine attempts per page,
tracks born-digital status, and provides text assembly and repair
tracking. Dumb data only — no pipeline logic or audit rules.
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