Skip to content

Refactor footnote source slices and repair semantic assembly - #616

Merged
Moskize91 merged 2 commits into
mainfrom
vge/issue-981
Nov 6, 2026
Merged

Moskize91 merged 2 commits into
mainfrom
vge/issue-981

Conversation

@Moskize91

@Moskize91 Moskize91 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

OCR boxes can contain several notes, and OCR formula wrappers can include body text plus a footnote marker. The previous repair contract could not express these cases and checked continuations against the original order after a model reordered content.

Compile the final ordered candidate from immutable source ranges before validating and adopting it. Give logical fragments independent identities throughout storage, translation coverage, TOC, rendering and PDF writeback; migrate source and existing translation layers together to PCEX v6. Explicit terminal superscript extraction preserves the original expression remainder.

Shared PDF source boxes are composed once, with separate real line previews for each owner. Incomplete or failed owners preserve the original region. Shared boxes involving multi-region paragraphs or inline formulas also preserve the source; preserving every intended primary fill raises NoUsableFillPagesError.

Validation:

  • GitHub PR Check passed (Linux typecheck, lint and full test suite).
  • Current main integration: 1,943 tests, 6 skipped; Pyright clean; pylint 10.00/10.
  • Independent review passed, including fresh real-model and public PDF-writeback verification.
  • Three original local repair cases passed fresh uncached LLM loops and actual ordered adoption without OCR reruns or algorithm fallback.
  • Regression coverage includes split-note translation/coverage and reopening, shared-box PDF placement/preservation, cross-page binding, Unicode superscripts and historical translation-layer migration.

Related to oomol/pdf-craft-service#314 (the three local extraction failures; task-level balance exhaustion is separate).

@Moskize91
Moskize91 merged commit 4940991 into main Nov 6, 2026
2 checks passed
@Moskize91
Moskize91 deleted the vge/issue-981 branch November 6, 2026 05:28
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