This indicates that for the test case at offnum == 36, the error message should report "offset 43" (the successor), not "offset 36" (the current tuple). However, when I updated the test expectation from \d+ wildcard to the exact value offset 43, the test fails. This makes me wonder whether the current code in verify_heapam.c (lines 777, 793, 799) should be using nextoffnum instead of ctx.offnum.
Fully agreed. I think there's no need to modify the expectations. Seems the 0002 patch alone is sufficient.