Basic repository consistency check functionality.

Still no archive metadata validation or repair functionality.