Replace per-switch network simulation with aggregate per-DC statistical model
Balance Check / balance-simulation (push) Successful in 48s
Balance Check / multi-run-balance (push) Successful in 1m24s
CI / build-and-push (push) Successful in 43s

Eliminates the 22K-object switchRegistry that caused O(n×m) scans 4x per tick.
Network health is now tracked as aggregate counts per tier (totalByTier/healthyByTier)
with RepairBatch timers, cutting late-game tick cost from ~50ms to ~0.3ms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 20:06:40 -04:00
parent 57a81be769
commit 19f652b43a
4 changed files with 181 additions and 365 deletions
+2 -1
View File
@@ -162,7 +162,8 @@ function CohortStageBreakdown({ cohorts }: { cohorts: DeploymentCohort[] }) {
function NetworkHealthIndicator({ dc }: { dc: DataCenter }) {
const ns = dc.networkSummary;
if (ns.switchIds.length === 0) return null;
const torTotal = ns.totalByTier?.tor ?? 0;
if (torTotal === 0) return null;
const hasDisconnected = ns.racksDisconnected > 0;
const hasDegraded = ns.racksDegraded > 0;