• Stefy Lanza (nextime / spora )'s avatar
    ocr: carry the repair receipt out with the page (v0.3.34) · 17efa8fe
    Stefy Lanza (nextime / spora ) authored
    SURYA READS ITALIAN AGAIN. Measured on the live install, the same synthetic page
    that scored 29 markers all morning:
    
        MARKERS : 0    (29 baseline)
        ACCENTS : AEEIOUaeeiou (all twelve)
        La societa` ha facolta` di piu` attivita`: percio` e` cosi` che l'unita`
        perche' gia` oltre.
    
    ...but it reported `accents_repaired: null` while visibly having fixed the page,
    because _page_from_dict carried `unreadable_trace` across the worker boundary and
    never carried `accents_repaired`. The fix worked; only its receipt was dropped.
    
    That matters more than a missing field: the text is no longer byte-for-byte what
    the server sent, and a caller comparing the two has no way to know why. A silent
    fix is nearly as bad as a silent corruption.
    
    tests: +2 (47 in test_ocr_accent_repair.py) for the receipt crossing the boundary
    and for staying absent when nothing was repaired.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PxYHWbCAjjjD7A1rhFKtaW
    17efa8fe
test_ocr_accent_repair.py 20.7 KB