[Codex] Register browser requirements feature keys (#18956)

## Summary
- register `in_app_browser` and `browser_use` as stable feature keys
- allow requirements/MDM feature requirements to pin those desktop
browser controls
- add coverage for browser requirements being accepted by config loading

## Testing
- `cargo fmt --all` (`just fmt` unavailable locally; rustfmt warned
about nightly-only `imports_granularity` config)
- `cargo test -p codex-features`
- `cargo test -p codex-core browser_feature_requirements_are_valid`
- Tested manually by setting in `requirements.toml` and seeing after app
restart state to reflect the setting was correct (at the time hiding the
`Browser Use` setting when the enterprise setting was set to false
This commit is contained in:
khoi
2026-04-22 15:27:15 -07:00
committed by GitHub
parent ee70b365ab
commit 568cdacc7e
4 changed files with 72 additions and 0 deletions
+14
View File
@@ -150,6 +150,20 @@ fn tool_search_is_stable_and_enabled_by_default() {
assert_eq!(Feature::ToolSearch.default_enabled(), true);
}
#[test]
fn browser_controls_are_stable_and_enabled_by_default() {
assert_eq!(Feature::InAppBrowser.stage(), Stage::Stable);
assert_eq!(Feature::InAppBrowser.default_enabled(), true);
assert_eq!(
feature_for_key("in_app_browser"),
Some(Feature::InAppBrowser)
);
assert_eq!(Feature::BrowserUse.stage(), Stage::Stable);
assert_eq!(Feature::BrowserUse.default_enabled(), true);
assert_eq!(feature_for_key("browser_use"), Some(Feature::BrowserUse));
}
#[test]
fn unavailable_dummy_tools_is_under_development_and_disabled_by_default() {
assert_eq!(