anchor.diff:          return ReserveTaskResponse(task.task, task.commit, token, keyHelper);
         } on ReservationLostException {
           // Keep looking for another task.
  +        log.debug('Reservation lost for task ${task.task.name} on commit ${task.commit.sha}');
           continue;
         }
       }
  +
  +    log.warning('Could not secure reservation after $maxAttempts; giving up');
  +    return const ReserveTaskResponse.empty();
     }
   }
   
  
positive.code:   /// If another agent has obtained the reservation on the task before we've
    /// been able to secure our reservation, ths will throw a
    /// [ReservationLostException]
    Future<void> secureReservation(Task task, String agentId) async {
      assert(task != null);
      assert(agentId != null);
      return config.db.withTransaction<void>((Transaction transaction) async {
        try {
          final Task lockedTask = await transaction.lookupValue<Task>(task.key);
  
          if (lockedTask.status != Task.statusNew) {
  
negative.code:       });
      }
  
      const int maxAttempts = 3;
      for (int attempt = 0; attempt < maxAttempts; attempt++) {
        final FullTask task = await taskProvider.findNextTask(agent);
  
        if (task == null) {
  