A remediation report can map a failure count to a concrete next action while keeping the signal and action visible in one row.

Program

Play the program to choose the failed check count and inspect the remediation action.

failed_checks
rollback_action_report.f90
Replay: real traced execution (multi-file project)
program rollback_action_report_demo
    implicit none
    integer :: failed_checks
    character(len=10) :: action

    failed_checks = 2
    if (failed_checks == 0) then
        action = 'monitor'
    else if (failed_checks <= 2) then
        action = 'rollback'
    else
        action = 'escalate'
    end if
    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)
end program rollback_action_report_demo
program rollback_action_report_demo
    implicit none
    integer :: failed_checks
    character(len=10) :: action

    failed_checks = 0
    if (failed_checks == 0) then
        action = 'monitor'
    else if (failed_checks <= 2) then
        action = 'rollback'
    else
        action = 'escalate'
    end if
    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)
end program rollback_action_report_demo
program rollback_action_report_demo
    implicit none
    integer :: failed_checks
    character(len=10) :: action

    failed_checks = 4
    if (failed_checks == 0) then
        action = 'monitor'
    else if (failed_checks <= 2) then
        action = 'rollback'
    else
        action = 'escalate'
    end if
    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)
end program rollback_action_report_demo
  1. failed_checks ← 2

    6failed_checks = 27if (failed_checks == 0) then
    values this step2failed_checks
  2. if (failed_checks == 0) then

    6failed_checks = 27if (failed_checks == 0) then8    action = 'monitor'
    values this step2failed_checks
  3. else if (failed_checks <= 2) then

    8    action = 'monitor'9else if (failed_checks <= 2) then10    action = 'rollback'
    values this step2failed_checks
  4. action ← rollback

    9else if (failed_checks <= 2) then10    action = 'rollback'11else
    values this steprollbackaction
  5. print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)

    13    end if14    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)15end program rollback_action_report_demo
    outputfailed=2 rollback
    values this step2failed_checksrollbackaction
  1. failed_checks ← 0

    6failed_checks = 07if (failed_checks == 0) then
    values this step0failed_checks
  2. if (failed_checks == 0) then

    6failed_checks = 07if (failed_checks == 0) then8    action = 'monitor'
    values this step0failed_checks
  3. action ← monitor

    7if (failed_checks == 0) then8    action = 'monitor'9else if (failed_checks <= 2) then
    values this stepmonitoraction
  4. print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)

    13    end if14    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)15end program rollback_action_report_demo
    outputfailed=0 monitor
    values this step0failed_checksmonitoraction
  1. failed_checks ← 4

    6failed_checks = 47if (failed_checks == 0) then
    values this step4failed_checks
  2. if (failed_checks == 0) then

    6failed_checks = 47if (failed_checks == 0) then8    action = 'monitor'
    values this step4failed_checks
  3. else if (failed_checks <= 2) then

    8    action = 'monitor'9else if (failed_checks <= 2) then10    action = 'rollback'
    values this step4failed_checks
  4. action ← escalate

    11else12    action = 'escalate'13end if
    values this stepescalateaction
  5. print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)

    13    end if14    print '(A, I0, 1X, A)', 'failed=', failed_checks, trim(action)15end program rollback_action_report_demo
    outputfailed=4 escalate
    values this step4failed_checksescalateaction
action label The `action` character value carries the remediation decision as ordinary program state.
tiered decision The `if`/`else if` chain separates monitor, rollback, and escalation cases.
report row The print line keeps the raw failure count beside the selected action.