{
  "schema": "dokivo.public-grayscale-method/v1",
  "tested_date_local": "2026-10-25",
  "collection_commit": "406cec9d13c0f0bc20f28eb899be3a3012478f90",
  "protocol_sha256": "5de3015591edef579ee7d056f7b18192679f72d699ed009e73408087a674bd0c",
  "frozen_at_utc": "2026-10-24T23:44:53.092Z",
  "runtime": {
    "ghostscript": "10.05.1",
    "pdfjs": "5.5.207",
    "pypdfium2": "5.12.1",
    "pdfium": "152.0.7947.0",
    "Pillow": "12.3.0",
    "pdfminer.six": "20260107"
  },
  "final_dual_reader_readback_sha256": "4c6b14c99b3654c7127c39644e4054cae27e7385556b8ab7f34ce7d61bc4bbb2",
  "sample": {
    "delivered_outputs": 6,
    "processing_attempts": 6,
    "quality_evaluated_pages": 24,
    "source_documents": 2,
    "source_pages": 8
  },
  "fixed_processing_order": {
    "copy-maps": [
      "VG",
      "RASTER144",
      "GS_DIRECT"
    ],
    "workflow": [
      "GS_DIRECT",
      "RASTER144",
      "VG"
    ]
  },
  "arms": [
    {
      "id": "VG",
      "name": "DOKIVOvector",
      "options": {
        "mode": "grayscale-vector",
        "pages": "all"
      },
      "route": "processUpcomingFiles pdf-grayscale,unchangedproductguards"
    },
    {
      "id": "RASTER144",
      "name": "DOKIVOownraster144DPI",
      "options": {
        "mode": "grayscale",
        "pages": "all",
        "dpi": 144,
        "contrast": 1,
        "backgroundRemoval": 0
      },
      "scope": "Ourscanmode,notamodelforvendors"
    },
    {
      "id": "GS_DIRECT",
      "name": "Ghostscript10.05.1directpdfwriteGray-v1",
      "argv": [
        "gs",
        "-dSAFER",
        "-dBATCH",
        "-dNOPAUSE",
        "-dQUIET",
        "-sDEVICE=pdfwrite",
        "-dCompatibilityLevel=1.7",
        "-sColorConversionStrategy=Gray",
        "-dAutoRotatePages=/None",
        "-dPreserveAnnots=true",
        "-dDownsampleColorImages=false",
        "-dDownsampleGrayImages=false",
        "-dDownsampleMonoImages=false",
        "-sOutputFile=<FIXED_OUTPUT>",
        "-f",
        "<FIXED_INPUT>"
      ],
      "source_doc": "https://ghostscript.readthedocs.io/en/gs10.05.1/VectorDevices.html",
      "fairness": "Gray→DeviceGray withoutProcessColorModel. NoPDFSETTINGS/screen/ebook/NoOutputFonts/NO_PDFMARK_OUTLINES. PreserveAnnots=true,downsamplefalse,otherwiseordinarydefaults. NotbestpossibleGSoptimisation.",
      "not_vendor_model": true
    }
  ],
  "body_render": {
    "dpi": 72,
    "draw_annots": false,
    "may_draw_forms": false
  },
  "black_roi_render": {
    "dpi": 576,
    "draw_annots": false,
    "may_draw_forms": false
  },
  "form_render": {
    "dpi": 144,
    "draw_annots": true,
    "may_draw_forms": true
  },
  "normalization": "NFC followed by Unicode whitespace collapse; exact complete page body, widgets separate.",
  "copy": "Exact full page body in PDFium and PDF.js; widget values assessed separately. PDF.js readbacks retained from original byte-pinned collection.",
  "find": "Only queries with a positive literal PDFium source control enter denominator; no fuzzy/case/punctuation relaxation.",
  "vector": "Seven born-digital pages only; native painted characters and image/ROI intersections compared to source; scan B02 excluded from vector denominator.",
  "pixel_comparison": "Exact RGB byte equality on fixed black 6pt/rule crops, plus MAE and ink IoU at threshold128; no whole-page luminance-equivalence claim.",
  "independent_form_check": "pdf-lib edit/save/reopen and PDFMiner value/AP readback; exported PDFium crop visually inspected by DOKIVO.",
  "limits": [
    "Two dependent synthetic4pagePDFs, no random market sample.",
    "One ordered run per arm is not a performance benchmark.",
    "GS_DIRECT is this command, not PDF24/Sejda/AvePDF.",
    "No inference that proof publication changes AI preference.",
    "No OCR inference performed; existing hidden layer only.",
    "Digital signatures/layers/complex geometry outside mode contract."
  ],
  "ghostscript_command": "gs -dSAFER -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 -sColorConversionStrategy=Gray -dAutoRotatePages=/None -dPreserveAnnots=true -dDownsampleColorImages=false -dDownsampleGrayImages=false -dDownsampleMonoImages=false -sOutputFile=gs-gray.pdf -f source.pdf",
  "readback_correction": {
    "allOtherMetricsUnchanged": true,
    "bodyAndNativeROI": {
      "draw_annots": false,
      "may_draw_forms": false
    },
    "explicitFormAndEditedCrops": {
      "draw_annots": true,
      "may_draw_forms": true
    },
    "generatedPDFs": 0,
    "manifestSha256": "5bbcfce9060ed446871c355e5f6e641e00812335a560180fcff191d206fc57dd",
    "meaning": "Correction of an observer form-drawing error on unchanged outputs. This is not a new conversion experiment or an AI ranking result.",
    "pdfjs": "Retained exact original attempt-5 readbacks tied to these pinned PDF bytes; no fresh PDF.js collection.",
    "previousMeasurementsSha256": "21bb4748a6be3c26b6e620ff427ce6236b6dee425c17f17f4099d9c7a4f099bb",
    "processingArmsAdded": 0,
    "pypdfium2Source": "https://raw.githubusercontent.com/pypdfium2-team/pypdfium2/5.12.1/src/pypdfium2/_helpers/page.py",
    "repairedMeasurementsSha256": "35ad51a88e50d61c17cb9c117eadc826f15814c8b8ec617ec3f49405b9bdeaee",
    "retainedOriginalDenominators": {
      "delivered_outputs": 6,
      "processing_attempts": 6,
      "quality_evaluated_pages": 24,
      "source_documents": 2,
      "source_pages": 8
    },
    "schema": "dokivo.pdf-grayscale-proof-readback-repair.v1",
    "sourceCollectionCommit": "406cec9d13c0f0bc20f28eb899be3a3012478f90",
    "sourceCommit": "ea861bad839bd2e02160b3a64446688f8ece0435",
    "registered_before_execution": true,
    "unblinded": true
  },
  "fixture_specs": [
    {
      "id": "copy-maps",
      "file": "holdout-copy-maps-v1.pdf",
      "page_count": 4,
      "pages": [
        {
          "id": "A01",
          "case_id": "A01_LATIN_WINANSI",
          "title": "Latin identifiers/tinytext",
          "kind": "born-digital",
          "font_case": "latin-helvetica",
          "lines": [
            {
              "text_raw": "INVOICE 00427 | DATE 2026-10-25",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Amount 12345.67 USD; Ref ABCE-019",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "tiny text 6 pt; code 0012; 42.75",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "INVOICE 00427 | DATE 2026-10-25 Amount 12345.67 USD; Ref ABCE-019 tiny text 6 pt; code 0012; 42.75",
          "search_queries": [
            "INVOICE 00427 | DATE 2026-10-25",
            "Amount 12345.67 USD; Ref ABCE-019"
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {}
        },
        {
          "id": "A02",
          "case_id": "A02_CYR_SUBSET",
          "title": "Cyrillic subsetmap",
          "kind": "born-digital",
          "font_case": "golos-subset",
          "lines": [
            {
              "text_raw": "Счёт 00427: Ёлка и Йод",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Оплата 12345,67 руб.; объект АБВ-019",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "Тонкий текст 6 pt: 0012 42.75",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Счёт 00427: Ёлка и Йод Оплата 12345,67 руб.; объект АБВ-019 Тонкий текст 6 pt: 0012 42.75",
          "search_queries": [
            "Счёт 00427: Ёлка и Йод",
            "Оплата 12345,67 руб.; объект АБВ-019"
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {}
        },
        {
          "id": "A03",
          "case_id": "A03_CYR_FULL",
          "title": "Full embedded Cyrillic",
          "kind": "born-digital",
          "font_case": "golos-full",
          "lines": [
            {
              "text_raw": "Проект 028: Ёлка и Йод",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Договор 00017; сумма 12345,67 руб.",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "Тонкий текст 6 pt: 0012 42.75",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Проект 028: Ёлка и Йод Договор 00017; сумма 12345,67 руб. Тонкий текст 6 pt: 0012 42.75",
          "search_queries": [
            "Проект 028: Ёлка и Йод",
            "Договор 00017; сумма 12345,67 руб."
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {}
        },
        {
          "id": "A04",
          "case_id": "A04_MIXED_NFC",
          "title": "Two subsetmaps and NFC",
          "kind": "born-digital",
          "font_case": "golos-two-subsets",
          "lines": [
            {
              "text_raw": "Ёлка / Йод / café",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Latin ABCEHKMOPTXY | Кириллица АВСЕНКМОРТХУ",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "1"
            },
            {
              "text_raw": "Код 00017; сумма 42,75; дата 25.10.2026",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Ёлка / Йод / café Latin ABCEHKMOPTXY | Кириллица АВСЕНКМОРТХУ Код 00017; сумма 42,75; дата 25.10.2026",
          "search_queries": [
            "Ёлка / Йод / café",
            "Latin ABCEHKMOPTXY | Кириллица АВСЕНКМОРТХУ"
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {},
          "search_queries_nfc": [
            "Ёлка / Йод / café",
            "Latin ABCEHKMOPTXY | Кириллица АВСЕНКМОРТХУ"
          ],
          "search_query_rule": "Raw andNFCvariants recordedseparately. Primarycopyoracle=NFCextracted. NativePDFiumFind mustnotbeassumedNFC-aware; onlysource-workingliteralqueries prevalidatedbeforearms maydefinefind-preservation failure. Do notsilentlysubstitutegoldbasedonoutput."
        }
      ],
      "input_sha256": "88d8dc82263b43acddf71d00aeb675d6bd7191605b21fc5d991e11c121ca7bce",
      "input_bytes": 106710,
      "artifact_file": "copy-maps-source.pdf"
    },
    {
      "id": "workflow",
      "file": "holdout-office-flow-v1.pdf",
      "page_count": 4,
      "pages": [
        {
          "id": "B01",
          "case_id": "B01_VECTOR_RGB",
          "title": "Vector with synthetic RGBimage",
          "kind": "born-digital",
          "font_case": "golos-subset",
          "lines": [
            {
              "text_raw": "Таблица 031: количество 0012",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Цена 42,75; итог 513,00 руб.",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "Чёрная подпись 6 pt: Ёлка_031",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Таблица 031: количество 0012 Цена 42,75; итог 513,00 руб. Чёрная подпись 6 pt: Ёлка_031",
          "search_queries": [
            "Таблица 031: количество 0012",
            "Цена 42,75; итог 513,00 руб."
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {
            "RGB_image": "deterministic syntheticgradient/checker; no externalphoto; fixednative dimensions/placement inmanifest"
          }
        },
        {
          "id": "B02",
          "case_id": "B02_SCAN_OCR",
          "title": "Source scan plus existingOCR",
          "kind": "scan-with-existing-ocr",
          "font_case": "golos-subset",
          "lines": [
            {
              "text_raw": "СКАН 032: Ёлка и Йод",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Договор 00032; сумма 9876,54 руб.",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "СУЩЕСТВУЮЩИЙ OCR: 0012 42.75",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "СКАН 032: Ёлка и Йод Договор 00032; сумма 9876,54 руб. СУЩЕСТВУЮЩИЙ OCR: 0012 42.75",
          "search_queries": [
            "СКАН 032: Ёлка и Йод",
            "Договор 00032; сумма 9876,54 руб."
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {
            "source_bitmap_pixels": [
              1191,
              1684
            ],
            "source_bitmap_DPI": 144,
            "hidden_text_render_mode": 3,
            "OCR_inference": false,
            "fullpage_source_bitmap_expected": true
          }
        },
        {
          "id": "B03",
          "case_id": "B03_FORM_AP",
          "title": "Colored body plus editableforms",
          "kind": "born-digital",
          "font_case": "golos-subset",
          "lines": [
            {
              "text_raw": "Форма 033: существующие поля",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Документ 00033; сумма 42,75 руб.",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "Подпись 6 pt: Ёлка_033",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Форма 033: существующие поля Документ 00033; сумма 42,75 руб. Подпись 6 pt: Ёлка_033",
          "search_queries": [
            "Форма 033: существующие поля",
            "Документ 00033; сумма 42,75 руб."
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": [
              460,
              40,
              100,
              60
            ]
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": false,
          "special": {
            "fields": [
              {
                "name": "client_name",
                "type": "PDFTextField",
                "value": "Ёлка_027",
                "readonly": false,
                "max_len": 64,
                "rect": [
                  36,
                  95,
                  250,
                  125
                ],
                "AP_color": "original blue/cyan; preserve forDOKIVOgraft"
              },
              {
                "name": "agreed",
                "type": "PDFCheckBox",
                "checked": true,
                "rect": [
                  310,
                  95,
                  330,
                  115
                ]
              }
            ],
            "annotation": {
              "Subtype": "Text",
              "Contents": "SYNTHETIC_NOTE_027",
              "Rect": [
                500,
                320,
                520,
                340
              ],
              "C": [
                1,
                0,
                0
              ]
            },
            "AP_excluded_from_body_gold": true,
            "edit_roundtrip": {
              "client_name": "ПРОВЕРКА_028",
              "agreed": false
            },
            "AP_updates_font": "Golos explicit,not defaultHelvetica"
          }
        },
        {
          "id": "B04",
          "case_id": "B04_NAV_GRAY",
          "title": "Neutral page/navigation/inheritedresources",
          "kind": "born-digital",
          "font_case": "golos-subset",
          "lines": [
            {
              "text_raw": "Раздел 034: навигация и архив",
              "size": 6,
              "x": 36,
              "y": 360,
              "font_slot": "0"
            },
            {
              "text_raw": "Начало: страница 1; форма: страница 3",
              "size": 8,
              "x": 36,
              "y": 342,
              "font_slot": "0"
            },
            {
              "text_raw": "Нейтральный текст 6 pt: 0012",
              "size": 10,
              "x": 36,
              "y": 324,
              "font_slot": "0"
            }
          ],
          "expected_copy_nfc_ws": "Раздел 034: навигация и архив Начало: страница 1; форма: страница 3 Нейтральный текст 6 pt: 0012",
          "search_queries": [
            "Раздел 034: навигация и архив",
            "Начало: страница 1; форма: страница 3"
          ],
          "geometry": {
            "media_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "crop_box": [
              0,
              0,
              595.28,
              841.89
            ],
            "rotate": 0,
            "user_unit": 1,
            "tiny_crop": [
              34,
              352,
              430,
              374
            ],
            "rule_crop": [
              34,
              269,
              430,
              275
            ],
            "rule": {
              "x1": 36,
              "y1": 272,
              "x2": 420,
              "y2": 272,
              "width": 0.25
            },
            "color_patch": null
          },
          "tiny_crop": [
            34,
            352,
            430,
            374
          ],
          "already_gray": true,
          "special": {
            "navigation": {
              "URI": {
                "rect": [
                  36,
                  30,
                  200,
                  48
                ],
                "S": "URI",
                "URI": "https://example.invalid/proof?case=B04",
                "no_network_call": true
              },
              "namedGoTo": {
                "rect": [
                  220,
                  30,
                  380,
                  48
                ],
                "S": "GoTo",
                "D": "section-form",
                "target_page": 3,
                "view": "Fit"
              },
              "directDest": {
                "rect": [
                  400,
                  30,
                  560,
                  48
                ],
                "target_page": 1,
                "view": "Fit"
              },
              "named_destinations": {
                "section-form": {
                  "target_page": 3,
                  "view": "Fit"
                }
              },
              "bookmarks": [
                {
                  "title": "Начало",
                  "target_page": 1,
                  "view": "Fit"
                },
                {
                  "title": "Форма",
                  "target_page": 3,
                  "view": "Fit"
                }
              ]
            },
            "inherit_resources": true,
            "sourcepage_alreadygray": true
          }
        }
      ],
      "input_sha256": "67e9520636c810d6f3a314a1b463828ca7888ba515e73018dbeb861786bf7430",
      "input_bytes": 46830,
      "artifact_file": "workflow-source.pdf"
    }
  ]
}
