Operational Remediation Reports
Microtask Checkpoint Remediation Report
Admit checkpoint requests against a fixed capacity and turn the remaining slots into an admit, hold, or shed remediation action.
Microtask Checkpoint Remediation Report
microtask_checkpoint_remediation.js
const requests = 1;
const capacity = 3;
function remediate(count) {
let admitted = count;
if (admitted > capacity) {
admitted = capacity;
}
const remaining = capacity - admitted;
let action = "admit";
if (remaining === 1) {
action = "hold";
} else if (remaining === 0) {
action = "shed";
}
console.log(`requests=${count} admitted=${admitted} remaining=${remaining} ${action}`);
}
remediate(requests);
checkpoint capacity
The checkpoint capacity is modeled with a scalar counter, so the remaining slots stay deterministic and free of microtask-queue identity while driving the remediation action.