feat: add `checkInvariants`
4 files changed