const ALL = ["unsealed", "sealed"] as const; export type ParityMode = (typeof ALL)[number]; /** The modes a both-mode test runs: both, or the one `HF_PARITY_MODE` names (scripts/ci/sealed-parity.mjs). */ export function parityModes(env: string | undefined = process.env.HF_PARITY_MODE): ParityMode[] { if (!env) return [...ALL]; const mode = ALL.find((m) => m === env); if (!mode) throw new Error(`HF_PARITY_MODE must be one of ${ALL.join(", ")}, got "${env}"`); return [mode]; } export const PARITY_MODES = parityModes();