Skip to content

feat: Warn and continue on unknown feature requirements#19038

Merged
xl-openai merged 1 commit intomainfrom
xl/requirements
Apr 23, 2026
Merged

feat: Warn and continue on unknown feature requirements#19038
xl-openai merged 1 commit intomainfrom
xl/requirements

Conversation

@xl-openai
Copy link
Copy Markdown
Collaborator

Requirements feature flags now fail open like config feature flags, but with a startup warning.

image

@xl-openai xl-openai requested a review from sayan-oai April 22, 2026 21:23
@xl-openai xl-openai requested a review from a team as a code owner April 22, 2026 21:23
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bbaf2f5bcc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 207 to +216
if let Some(feature) = feature_for_key(&key) {
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidData,
push_feature_requirement_warning(
&mut startup_warnings,
format!(
"invalid `features` requirement `{key}` from {source}: use canonical feature key `{}`",
"Using legacy `features` requirement `{key}` from {source}; prefer canonical feature key `{}`",
feature.key()
),
));
);
pinned_features.insert(feature, enabled);
continue;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Detect conflicting canonical and legacy requirement keys

parse_feature_requirements now accepts legacy aliases and unconditionally inserts them into pinned_features. If a managed requirements payload includes both canonical and legacy keys for the same feature with different values, whichever key sorts later silently overrides the other. This can invert enforced feature requirements (policy bypass) while only logging a warning.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's OK.

@xl-openai xl-openai merged commit 951be1a into main Apr 23, 2026
25 checks passed
@xl-openai xl-openai deleted the xl/requirements branch April 23, 2026 05:50
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants