private Optional<String> hasNodesWithChanges(ApplicationId applicationId, NodeList nodes) {
        Optional<Instant> activationTime = deployer().activationTime(applicationId);
        if (activationTime.isEmpty()) return Optional.empty();

        List<String> reasons = nodes.stream()
                                    .flatMap(node -> node.history()
                                                         .events()
                                                         .stream()
                                                         .filter(this::expediteChange)
                                                         .filter(event -> activationTime.get().isBefore(event.at()))
                                                         .map(event -> event.type() + (event.agent() == Agent.system ? "" : " by " + event.agent())))
                                    .sorted()
                                    .distinct()
                                    .toList();

        return reasons.isEmpty() ?
                Optional.empty() :
                Optional.of("recent node events: [" + String.join(", ", reasons) + "]");
    }
Returns the reason for doing an expedited deploy.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ExpeditedChangeApplicationMaintainer.java