24, "wing" => "Operations", "title" => "The server can be replaced", "promise" => "The whole platform can be rebuilt on a fresh machine from the tools repo, one bundle of secrets, and one backup.", "block" => "Nothing refers to the machine: a rehearsal restores everything onto a scratch box and checks every app answers. Its verdict reaches each app in RC_FACTS/backup.json.", "show" => function (?array $me): string { $b = fact("backup.json") ?? []; $p = $b["rehearsal_last_pass"] ?? null; $last = $b["rehearsal"] ?? null; if (!$last) return '
No rehearsal has been recorded yet.
'; return "Last rehearsal " . ago(strtotime($last["at"])) . ": " . (($last["result"] ?? "") === "pass" ? "everything came back" : "it failed") . "." . ($p ? " Last one that passed: " . ago(strtotime($p["at"])) . "." : "") . "
"; }, "check" => function (): array { $p = fact("backup.json")["rehearsal_last_pass"] ?? null; if (!$p) return [false, "no rehearsal has passed yet"]; $days = intdiv(time() - strtotime($p["at"]), 86400); // Green within 14 days, amber (a warning, not an alarm) up to 90, red after. The Mac runs it weekly (tools/dev/rehearse-weekly.sh). if ($days > 90) return [false, "the last passing rehearsal was $days days ago"]; if ($days > 14) return [true, "the last rehearsal that passed was $days days ago: due", ["amber" => true]]; return [true, "the last rehearsal that passed was $days day(s) ago"]; }, ];