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.

failed_checks
rollback_action_report.rs
Replay: real traced execution (multi-file project)
fn main() {
    let failed_checks = 2;
    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 = 0;
    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 = 4;
    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}");
}
  1. failed_checks ← 2, rollback_limit ← 1, action ← "rollback", line ← "failed=2 rollback"

    1fn main() {2    let failed_check→ 2s = 2; //@failed_checks=2, 0, 43    let rollback_limi→ 1t = 1;4    let actio→ "rollback"n = if failed_check2s == 0 {5        "monitor"6    } else if failed_check2s <= rollback_limi1t + 2 {7        "rollback"8    } else {9        "escalate"10    };11    let lin→ "failed=2 rollback"e = format!("failed={failed_checks} {action}");12    println!("{line}");13}
    outputfailed=2 rollback
  1. failed_checks ← 0, rollback_limit ← 1, action ← "monitor", line ← "failed=0 monitor"

    1fn main() {2    let failed_check→ 0s = 0;3    let rollback_limi→ 1t = 1;4    let actio→ "monitor"n = if failed_check0s == 0 {5        "monitor"6    } else if failed_check0s <= rollback_limi1t + 2 {7        "rollback"8    } else {9        "escalate"10    };11    let lin→ "failed=0 monitor"e = format!("failed={failed_checks} {action}");12    println!("{line}");13}
    outputfailed=0 monitor
  1. failed_checks ← 4, rollback_limit ← 1, action ← "escalate", line ← "failed=4 escalate"

    1fn main() {2    let failed_check→ 4s = 4;3    let rollback_limi→ 1t = 1;4    let actio→ "escalate"n = if failed_check4s == 0 {5        "monitor"6    } else if failed_check4s <= rollback_limi1t + 2 {7        "rollback"8    } else {9        "escalate"10    };11    let lin→ "failed=4 escalate"e = format!("failed={failed_checks} {action}");12    println!("{line}");13}
    outputfailed=4 escalate
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.