Skip to content

Fix malformed math allocation and footnote ownership recovery - #625

Merged
Moskize91 merged 13 commits into
mainfrom
vge/issue-988
Nov 7, 2026
Merged

Moskize91 merged 13 commits into
mainfrom
vge/issue-988

Conversation

@Moskize91

@Moskize91 Moskize91 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Unclosed math delimiters in free translation could consume a later formula across paragraphs, leaving allocation and XML fill with incompatible targets. Shared lexical scanning now preserves complete TeX formulas, including multiline matrices, row spacing and nested text math, while recovering complete inner formulas from malformed outer delimiters. Allocation feedback identifies missing identities and available targets, and clarifies whole-expression bindings without changing the artist response.

Footnote refinement now decides body/note ownership independently of printed paragraph boundaries. Model input includes raw measured line geometry, and the response describes ownership before paragraph decisions; program validation still only sees the refined current page. The private repair/cache protocol is updated; PCEX persisted semantics are unchanged.

Accepted empty translations retain their markup without restoring source prose. Anchored assets recognize canonical-validated text changes while preserving slot identities, tags, attributes and source formulas. Configured failure logs now retain source and translated asset XML when final structural acceptance fails.

Adds the complete DeepSeek-only paid regression entry point, aggregating the existing 14 groups without changing gold or acceptance gates:

.venv/bin/python -m pdf_craft_tool.smoke.paid_full --output NEW-DIRECTORY

The public entry points propagate fill=12 to allocation and XML fill, independently of analysis budgets and library defaults. Translation remains unrestricted, cross-chapter grouping remains bounded, and no neighbour semantic gate is introduced.

Validation on final head 1a737a9:

  • 2,011 tests pass (six existing skips); pyright 0 errors/warnings; pylint 10.00/10; diff check clean. Independently repeated in VGE review.
  • Coder and independent reviewer each ran one fresh complete paid suite: 14/14 passed, zero failures/skipped cases. First-generation DeepSeek OCR only; native EPUB and LLM-only gates included.
  • Independent review observed 148 allocation/XML fill library calls, all with retry_max=12, maximum observed attempt 3; analysis retains separate 4/6 budgets.
  • Source formulas, critical inequality endpoint, table structure and coverage checked in three translated PCEX files; final Markdown/EPUB and PDF previews inspected.

These are successful regression runs, not a statistical reliability guarantee. The earlier failed asset run did not retain its final DOM, so the deterministic empty-asset regression is not claimed to reconstruct that exact historical response. No customer content, credentials, full logs or generated artifacts are committed.

Related to PR #624, #623 and #622; background incidents oomol/pdf-craft-service#310, oomol/pdf-craft-service#313 and oomol/pdf-craft-service#314. Implements VGE issue 988. No additional GitHub issue is automatically closed.

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