[eric] backend: add preflight_enabled (default true) and preflight_rollout_pct (default 100) to AppSettings so the runtime preflight can be killed per-install via the existing settings sync or staged 5/25/100 by the cloud cohort gate without a release

This commit is contained in:
Eric
2026-05-28 02:49:06 -07:00
parent 6fc7e23bbe
commit e8fd9ceb5a
+4
View File
@@ -75,6 +75,10 @@ class AppSettings(BaseModel):
# Server-validated identity from /api/auth/signin-activate; user_email above is the self-reported onboarding value.
user_id: Optional[str] = None
signin_method: Optional[Literal["google", "stripe", "email"]] = None
# Runtime preflight (electron/preflight.js). Default-on; users opt out via this flag, env var OPENSWARM_DISABLE_PREFLIGHT=1, or the cloud-side cohort rollout knocking preflight_rollout_pct down.
preflight_enabled: bool = True
# 0-100; the cohort gate compares (hash(installation_id) % 100) < pct. 100 = everyone, 0 = nobody, used as the kill switch if a staged rollout finds a false-positive spike.
preflight_rollout_pct: int = 100
class CustomProvider(BaseModel):