Skip to content

The page reader reads a scan's first 80 pages and its reading does not say so #235

Description

@lemarier

The page reader draws and transcribes at most the first 80 pages of a scan (MAX_PAGES in apps/worker/src/reading.ts, applied in seeDocument in apps/worker/src/vision.ts). Past that it logs "reading the first pages only" to the console and nothing else: the reading it writes records pages as the pages it transcribed, not the pages the document has, so a reading of pages 1 to 80 of a 200-page scan cannot be told from a reading of a whole 80-page one.

This is the same kind of silent cut as the text reader's 60-window cap (#231) and the text converter's 80-page limit (#234). Both of those made the figures pull treat a partial reading as whole and remove what the rest of the document had given before.

It does no harm today: the page reader's readings are not pulled (PULL_PAGE_READER = false in packages/schema/src/provenance.ts), and when MAX_PAGES was set the longest scan held was eighty pages. It would do harm the day that flag is turned on, or once a longer scan is approved.

Done when

A page reading of a scan longer than the page reader reads says how many pages it left, and readInFull in src/specs.ts counts it as partial, before PULL_PAGE_READER is turned on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions