From 537102e657c56583898b0570c52b6dfeca162995 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Thu, 12 Feb 2026 17:53:15 -0800 Subject: [PATCH] Added a test to verify that feature flags that are enabled by default are stable (#11275) We've had a few cases recently where someone enabled a feature flag for a feature that's still under development or experimental. This test should prevent this. --- codex-rs/core/src/features.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rs index 2fbf81403..005fb4c87 100644 --- a/codex-rs/core/src/features.rs +++ b/codex-rs/core/src/features.rs @@ -688,6 +688,21 @@ mod tests { } } + #[test] + fn default_enabled_features_are_stable() { + for spec in FEATURES { + if spec.default_enabled { + assert_eq!( + spec.stage, + Stage::Stable, + "feature `{}` is enabled by default but is not stable ({:?})", + spec.key, + spec.stage + ); + } + } + } + #[cfg(target_os = "linux")] #[test] fn use_linux_sandbox_bwrap_is_experimental_on_linux() {