"""Feature flags for the test-session rework rollout. Flags are controlled via environment variables. Use the helper functions (rather than `os.getenv` directly) so defaults remain consistent and the rollout can be reviewed from a single place. """ from src.utils.env import env_bool def ais_verdict_enabled() -> bool: """Per-turn AIS (Attributable to Identified Sources) labels. When False, labels are still computed and persisted in shadow mode so distributions can be analyzed before the new verdict takes over. """ return env_bool("ENABLE_AIS_VERDICT", False) def wilson_session_verdict_enabled() -> bool: """Session-level verdict computed via Wilson 95% CI on AIS accuracy. When False, the legacy goal-based verdict is used. """ return env_bool("ENABLE_WILSON_SESSION_VERDICT", False) def turn_level_bugs_enabled() -> bool: """Allow bug tickets to be linked to a specific turn with pre-filled context.""" return env_bool("ENABLE_TURN_LEVEL_BUGS", False) def prompt_editor_ui_enabled() -> bool: """Expose the per-session prompt editor and model-override UI.""" return env_bool("ENABLE_PROMPT_EDITOR_UI", True)