2026-11-04 · Architecture checkpoint after version 1.4.0

2026-11-04 · Architecture checkpoint after version 1.4.0

Context

Since the 3 November checkpoint, versions 1.3.0 and 1.4.0 shipped: offline text extraction with Tesseract and ALTO XML, the wide layout and a smoother review, the Jobs page, a notarised disk image for macOS, and a sandboxed build for the Mac App Store. That checkpoint fixed the bugs it found and left its refactor for later; feature work went on and the files it said to split grew. A release and a new distribution channel are the end of a milestone, so the refactor came first and a checkpoint followed, on one branch.

The refactor was done in two halves at once (the Rust side here, the interface’s in a worktree, merged after), and the checkpoint ran as two read-only reviews in parallel: the Rust structure, and the paths that call a provider or write results (Tesseract, ALTO and the searchable PDF, the Jobs page, the Mac App Store’s grants). Their findings were checked against the code before being acted on or recorded here.

The 3 November refactor, done

What holds

Found and fixed

  1. A page the engine read as empty and the researcher typed had no text in ALTO or the searchable PDF, though the .txt had it. It is now one block over the page.
  2. Realign presented guesses as measured. A skipped column typed in was squeezed into the box of the word before it, each word a sliver, and ALTO wrote it as measured. With more than three words in one box, the page is placed as an estimated block instead.
  3. A granted folder out of reach at launch was dropped for good in the sandboxed build (an unplugged disk), so the next launch could not reach it and nothing asked again. It is kept.
  4. Photos with a 180° or mirrored EXIF orientation reached Tesseract unturned: only quarter turns were re-encoded, and Tesseract ignores EXIF. Any orientation now sends an upright copy.
  5. Writing results froze the window: saving a correction or speakers’ names, exporting a source, comparing, error rates, the review’s pieces, freezing text and walking dropped folders were synchronous commands, waiting on the lock a running job holds while it writes. They run off the window’s thread (commands::off_thread).
  6. A file dropped with its folder was listed twice (dedup only removes neighbours).
  7. CI checked only the bindings among the files the tests write for the interface; it now checks the four JSON files too.
  8. retry_failed reset a running job’s failed pieces before start refused it; it now refuses first.
  9. The privacy policy did not list grants.json, the container the sandboxed app’s data lives in, that moving a Mac app to the Bin leaves its data, or that logs hold file paths. It does now, with a new effective date.
  10. Tesseract’s cache identity: its results are cached under tesseract-5, which holds neither the engine’s version nor the language data’s revision. A test now pins the three together, so a Dependabot bump or a new tessdata_best commit cannot reuse cached pages without a decision about the model’s id.

Also tidied: Correction::of in the export document, EXE_SUFFIX rather than a Windows test for FFmpeg’s name, and two engine functions that only forwarded removed.

Accepted

Left for later

Consequences