Jun 6, 2026 at 2:04pm
#1
Severity: 🟡 Medium (0.53) | Type: ❓ Unclassified
Report
[Fallout 76] Medium: routing_policy lacks an exactly-one-active constraint Source: https://github.com/nateking-dev/HAOL/issues/76 ## Problem Nothing enforces that exactly one `routing_policy` row has `active = TRUE`. `getActivePolicy` uses `LIMIT 1`, so two activated policies produce undefined behavior. ## Fix Add a generated-column unique index, e.g.: `is_active_marker TINYINT GENERATED ALWAYS AS (IF(active, 1, NULL)) STORED, UNIQUE KEY uk_one_active (is_active_marker)` (migration). Audit ref: M21.
GameAi Intelligence | Issue #8881 |