how to check integrity of recovery partition?
You can mount the Recovery volume in your normal booted macOS.

diskutil mount readOnly Recovery


Then you can perform checksums on files as you normally would, on the Recovery volume.

shasum /Volumes/Recovery/*/BaseSystem.dmg


When you're done, you can unmount Recovery.

diskutil unmount Recovery