Executed 2026-11-24 · PyMuPDF 1.28.2 · 0 guessed numbers

Nested bookmarks ride the merge offset

The numbers first: 6 bookmarks in (3 top-level, 3 level-2 sub-bookmarks), merged three sources with 2 offsets (+3, +5), read back 6/6 with hierarchy intact — both sub-bookmarks land on the exact page the formula predicts.

Day 31 proved the offset formula on a flat outline. Day 35 proved splits keep child bookmarks. This run closes the loop: does the merge offset formula survive nesting too?

The executed run

The sub-bookmark checks

The rule, stated once

Offset applies per bookmark: new_page = source_page + sum(pages of sources before), level preserved as-is. Parent and child are independent rows; the formula treats them identically. What it says about a level-1 row it says about a level-2 row — today's numbers confirm it.

Not tested here: level-3+ depth, cycles, and sources with a broken outline. Those get their own numbers when we run them.