Map remaining capacity reserve to a hold, shift, or shed remediation action.

reserve selector The reserve value is the controlled selector for each report variant, not a live capacity read.
action bands Threshold branches separate a comfortable hold from an active shift or a forced shed.

Capacity Shift Remediation Report

reserve
capacity_shift_remediation_report.c
Replay: real traced execution (multi-file project)
#include <stdio.h>

int main(void) {
    int reserve = 8;
    int capacity = 20;
    const char *action = "shift";

    if (reserve >= 12) {
        action = "hold";
    }

    if (reserve < 6) {
        action = "shed";
    }

    printf("reserve=%d\n", reserve);
    printf("capacity=%d\n", capacity);
    printf("action=%s\n", action);
    return 0;
}
#include <stdio.h>

int main(void) {
    int reserve = 4;
    int capacity = 20;
    const char *action = "shift";

    if (reserve >= 12) {
        action = "hold";
    }

    if (reserve < 6) {
        action = "shed";
    }

    printf("reserve=%d\n", reserve);
    printf("capacity=%d\n", capacity);
    printf("action=%s\n", action);
    return 0;
}
#include <stdio.h>

int main(void) {
    int reserve = 16;
    int capacity = 20;
    const char *action = "shift";

    if (reserve >= 12) {
        action = "hold";
    }

    if (reserve < 6) {
        action = "shed";
    }

    printf("reserve=%d\n", reserve);
    printf("capacity=%d\n", capacity);
    printf("action=%s\n", action);
    return 0;
}
  1. reserve ← 8, capacity ← 20, action ← shift

    3int main(void) {4    int reserve→ 8 = 8; //@reserve=16, 45    int capacity→ 20 = 20;6    const char *action→ shift = "shift";78    if (reserve >= 12) {9        action = "hold";10    }1112    if (reserve < 6) {13        action = "shed";14    }1516    printf("reserve=%d\n", reserve8);17    printf("capacity=%d\n", capacity20);18    printf("action=%s\n", actionshift);19    return 0;20}
    outputreserve=8
    capacity=20
    action=shift
  1. reserve ← 4, capacity ← 20, action ← shift

    3int main(void) {4    int reserve→ 4 = 4;5    int capacity→ 20 = 20;6    const char *action→ shift = "shift";
  2. action ← shed

    12if (reserve4 < 6) {13    action→ shed = "shed";14}
  3. printf("reserve=%d ", reserve);

    16    printf("reserve=%d\n", reserve4);17    printf("capacity=%d\n", capacity20);18    printf("action=%s\n", actionshed);19    return 0;20}
    outputreserve=4
    capacity=20
    action=shed
  1. reserve ← 16, capacity ← 20, action ← shift

    3int main(void) {4    int reserve→ 16 = 16;5    int capacity→ 20 = 20;6    const char *action→ shift = "shift";
  2. action ← hold

    8if (reserve16 >= 12) {9    action→ hold = "hold";10}
  3. printf("reserve=%d ", reserve);

    16    printf("reserve=%d\n", reserve16);17    printf("capacity=%d\n", capacity20);18    printf("action=%s\n", actionhold);19    return 0;20}
    outputreserve=16
    capacity=20
    action=hold