Skip to content

Visual audit contract cannot disposition text a native GT rasterizes #1866

Closed

Description

@developer0hye

Problem

scripts/check_visual_pr.py can disposition a layout finding with ref:<id> only
when it is an exact painted-text-visibility occurrence
(scripts/check_visual_pr.py:814). A missing/extra text finding always needs an
open issue, even when a native Office export proves the GT simply cannot paint
that text.

The case that has no expressible disposition today is a native GT that
rasterizes text we paint as selectable text
. On pages 13-14 of the #1220 deck
(GENERAL SERVICES.pptx, SHA-256
17924ec3b27646a2c1b2bb711b845360b713cc7052b3cdde9df752f9ceded3a9) the GT is
the native PowerPoint 16.113.1 export, which draws the slide-number field as a
23.28 x 21.12pt clip_image_mask at (907.92, 491.52). compare_layout.py
therefore reports our 13 / 14 as extra text with no GT counterpart. #1667
owns that finding and has to stay open forever as its citation.

Two independent gates block a manifest here, both verified by running
validate_reference_difference_document on a native-GT document:

reference_export.application must identify the non-native GT exporter
difference 1 kind must be painted-text-visibility or render-clusters
  • scripts/reference_exporter_differences.py:59 rejects a reference_export
    naming a native Office application, so a comparison whose GT is the native
    export cannot state its own provenance.
  • scripts/reference_exporter_differences.py:238 accepts only
    painted-text-visibility and render-clusters kinds.
  • scripts/check_visual_pr.py:658 additionally requires a nonzero decoded-pixel
    delta between gt.jpg and native.jpg, which are the same render when the GT
    is the native export.

So the manifest shape assumes a third-party reference sitting beside a native
export. A native-GT comparison has no third party, and "reference-side" is a
misnomer for it — the difference is GT-side, where GT is already the best
available truth.

This is the missing/extra-text sibling of #1840, which asks for the same thing
for shift findings.

Acceptance

  • Add a difference kind that records a text line one exporter rasterizes: exact
    page, label, side (gt or out), and occurrence, matched against the current
    report's lines.missing_text / lines.extra_text the way
    _reference_visibility_key matches a visibility mismatch.
  • Add a provenance form for a comparison whose GT is the native export, so the
    document can omit or mark the absent non-native reference instead of forging
    one, and so the gt.jpg / native.jpg pixel-delta gate does not demand a
    difference between two renders of the same PDF.
  • Let Layout audit text flow accept ref:<id> only for an exact matching
    record; keep every other missing/extra/wrap/reflow finding on an open issue,
    and keep page-, region- and label-wide approvals rejected.
  • Cover the new path in scripts/tests/test_check_visual_pr.py and document it
    in assets/bugfixes/README.md.

Related: #1667, #1840, #1220

Activity

  1. developer0hye commented on Oct 5, 2026

    @developer0hye
    OwnerAuthor

    Resolved by #2012, merged as da57118. The visual audit contract now accepts exact rasterized-text selectors for unmatched report labels and supports native-GT provenance with omitted or null reference_export, requiring pixel-identical gt.jpg and native.jpg evidence. CI and cargo-deny both passed on the merge SHA.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions