{
  "experiment": "T0-day44-nontoc-passthrough",
  "date": "2026-11-30",
  "construction": "3 sources x 5 levels (L1..L5) via PyMuPDF set_toc (valid, non-empty, reachable); merged A+0/B+5/C+10 -> 15 rows benchmark",
  "honest_rule": "row counts and pages read back from the saved merged file; nothing repaired",
  "pypdf_version": "6.20.0",
  "pymupdf_version": "PyMuPDF 1.28.2",
  "source_readback": {
    "A": {
      "rows": [
        {
          "depth": 1,
          "title": "A Chapter",
          "page": 1
        },
        {
          "depth": 2,
          "title": "A Section",
          "page": 2
        },
        {
          "depth": 3,
          "title": "A Sub",
          "page": 3
        },
        {
          "depth": 4,
          "title": "A Sub-Sub",
          "page": 4
        },
        {
          "depth": 5,
          "title": "A Deep",
          "page": 5
        }
      ],
      "bookmarks_in": 5
    },
    "B": {
      "rows": [
        {
          "depth": 1,
          "title": "B Chapter",
          "page": 1
        },
        {
          "depth": 2,
          "title": "B Section",
          "page": 2
        },
        {
          "depth": 3,
          "title": "B Sub",
          "page": 3
        },
        {
          "depth": 4,
          "title": "B Sub-Sub",
          "page": 4
        },
        {
          "depth": 5,
          "title": "B Deep",
          "page": 5
        }
      ],
      "bookmarks_in": 5
    },
    "C": {
      "rows": [
        {
          "depth": 1,
          "title": "C Chapter",
          "page": 1
        },
        {
          "depth": 2,
          "title": "C Section",
          "page": 2
        },
        {
          "depth": 3,
          "title": "C Sub",
          "page": 3
        },
        {
          "depth": 4,
          "title": "C Sub-Sub",
          "page": 4
        },
        {
          "depth": 5,
          "title": "C Deep",
          "page": 5
        }
      ],
      "bookmarks_in": 5
    }
  },
  "pypdf_append": {
    "merge_offsets": {
      "A": 0,
      "B": 5,
      "C": 10
    },
    "bookmarks_out": 15,
    "rows": [
      {
        "depth": 1,
        "title": "A Chapter",
        "page": 1
      },
      {
        "depth": 2,
        "title": "A Section",
        "page": 2
      },
      {
        "depth": 3,
        "title": "A Sub",
        "page": 3
      },
      {
        "depth": 4,
        "title": "A Sub-Sub",
        "page": 4
      },
      {
        "depth": 5,
        "title": "A Deep",
        "page": 5
      },
      {
        "depth": 1,
        "title": "B Chapter",
        "page": 6
      },
      {
        "depth": 2,
        "title": "B Section",
        "page": 7
      },
      {
        "depth": 3,
        "title": "B Sub",
        "page": 8
      },
      {
        "depth": 4,
        "title": "B Sub-Sub",
        "page": 9
      },
      {
        "depth": 5,
        "title": "B Deep",
        "page": 10
      },
      {
        "depth": 1,
        "title": "C Chapter",
        "page": 11
      },
      {
        "depth": 2,
        "title": "C Section",
        "page": 12
      },
      {
        "depth": 3,
        "title": "C Sub",
        "page": 13
      },
      {
        "depth": 4,
        "title": "C Sub-Sub",
        "page": 14
      },
      {
        "depth": 5,
        "title": "C Deep",
        "page": 15
      }
    ],
    "checks": [
      {
        "depth": 1,
        "title": "A Chapter",
        "page": 1,
        "expected_page": 1,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 2,
        "title": "A Section",
        "page": 2,
        "expected_page": 2,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 3,
        "title": "A Sub",
        "page": 3,
        "expected_page": 3,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 4,
        "title": "A Sub-Sub",
        "page": 4,
        "expected_page": 4,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 5,
        "title": "A Deep",
        "page": 5,
        "expected_page": 5,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 1,
        "title": "B Chapter",
        "page": 6,
        "expected_page": 6,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 2,
        "title": "B Section",
        "page": 7,
        "expected_page": 7,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 3,
        "title": "B Sub",
        "page": 8,
        "expected_page": 8,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 4,
        "title": "B Sub-Sub",
        "page": 9,
        "expected_page": 9,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 5,
        "title": "B Deep",
        "page": 10,
        "expected_page": 10,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 1,
        "title": "C Chapter",
        "page": 11,
        "expected_page": 11,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 2,
        "title": "C Section",
        "page": 12,
        "expected_page": 12,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 3,
        "title": "C Sub",
        "page": 13,
        "expected_page": 13,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 4,
        "title": "C Sub-Sub",
        "page": 14,
        "expected_page": 14,
        "text_match": true,
        "page_match": true
      },
      {
        "depth": 5,
        "title": "C Deep",
        "page": 15,
        "expected_page": 15,
        "text_match": true,
        "page_match": true
      }
    ],
    "all_pages_match": true
  },
  "pymupdf_insert_pdf": {
    "bookmarks_out": 0,
    "rows": [],
    "checks": [],
    "all_pages_match": true
  },
  "summary": {
    "pypdf_append_bookmarks_out": 15,
    "pypdf_append_all_pages_match": true,
    "pymupdf_bookmarks_out": 0,
    "pymupdf_all_pages_match": true
  },
  "pymupdf_insert_pdf_set_toc_fix": {
    "method": "collect source get_toc, add offset, set_toc after inserts",
    "bookmarks_out": 15,
    "all_on_correct_pages": true
  }
}