Narrow managed feature requirements diff

This commit is contained in:
daniel-oai
2026-03-03 14:45:01 -08:00
parent 778a040fd9
commit 1427b3c00e
10 changed files with 16 additions and 41 deletions
+6
View File
@@ -814,6 +814,12 @@ where
Ok(())
}
/// Applies disable-only managed feature requirements after local config,
/// profile settings, and CLI/legacy feature overrides have been merged.
///
/// This lives in `codex-core` instead of `codex-config` so validation can rely
/// on the single canonical feature registry in `features.rs` without mirroring
/// that registry across crates.
fn apply_requirement_feature_constraints(
features: &mut Features,
requirement_features: Option<&Sourced<RequirementsFeaturesToml>>,
+3
View File
@@ -360,6 +360,9 @@ impl Features {
self.enabled.iter().copied().collect()
}
/// Clears feature flags whose prerequisites were disabled later in config
/// resolution, such as when managed requirements turn off a base feature
/// after local feature maps have already been applied.
pub(crate) fn normalize_dependencies(&mut self) {
if self.enabled(Feature::JsReplToolsOnly) && !self.enabled(Feature::JsRepl) {
tracing::warn!("js_repl_tools_only requires js_repl; disabling js_repl_tools_only");