FIX: ensure _role attribute exists in the revision context manager.