mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Narrow managed feature requirements diff
This commit is contained in:
@@ -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>>,
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user