Remediation reports turn failing checks into an operator action. This program chooses monitor, rollback, or escalation from a selected failed-check count.

Program

Play the program to choose the failed checks and watch the action report update.

rollback_action_report.rs
fn main() {
    let failed_checks = ;
    let rollback_limit = 1;
    let action = if failed_checks == 0 {
        "monitor"
    } else if failed_checks <= rollback_limit + 2 {
        "rollback"
    } else {
        "escalate"
    };
    let line = format!("failed={failed_checks} {action}");
    println!("{line}");
}
fn main() {
    let failed_checks = ;
    let rollback_limit = 1;
    let action = if failed_checks == 0 {
        "monitor"
    } else if failed_checks <= rollback_limit + 2 {
        "rollback"
    } else {
        "escalate"
    };
    let line = format!("failed={failed_checks} {action}");
    println!("{line}");
}
fn main() {
    let failed_checks = ;
    let rollback_limit = 1;
    let action = if failed_checks == 0 {
        "monitor"
    } else if failed_checks <= rollback_limit + 2 {
        "rollback"
    } else {
        "escalate"
    };
    let line = format!("failed={failed_checks} {action}");
    println!("{line}");
}
action report The report prints both the observed failure count and the chosen remediation action.
rollback threshold `rollback_limit + 2` keeps the rollback branch deterministic and visible.
escalation Counts beyond the rollback range become explicit escalation decisions.