be better about capturing state before mutating the mesh
check mp->edge after setting it
added DEBUG_ASSERT macro