Add and debug tests with a clear path to CI parity.
Recent revisions are kept. Restoring one creates a new revision.