Add a managed feature gate for in-app voice (#49683)

## What changed

Register `in_app_voice` as a stable, default-enabled feature and add it to the configuration schema. The gate is intended for managed requirements to control permission for voice in desktop apps; permission does not establish voice availability or provider support.

## Testing

Add app-server coverage for reporting `in_app_voice = false` from `requirements.toml` in both requirements and feature-list responses. Extend the CLI feature-list test to verify that cloud-managed requirements disable the gate despite a user-configured `true` value, without rewriting the user configuration.

GitOrigin-RevId: 6ec3bc0176fdb3e1714b0136bf812bd56591f6a1
This commit is contained in:
vishnu-oai
2026-09-30 17:20:35 +00:00
committed by copyberry
parent fcbed044c8
commit 6996cde697
4 changed files with 74 additions and 2 deletions
+10 -2
View File
@@ -218,7 +218,7 @@ async fn features_list_honors_cloud_managed_feature_requirements() -> Result<()>
let chatgpt_base_url = format!("{}/backend-api", server.uri());
let codex_home = TempDir::new()?;
let user_config = format!(
"cli_auth_credentials_store = \"file\"\nchatgpt_base_url = \"{chatgpt_base_url}\"\n\n[features]\nfast_mode = true\n"
"cli_auth_credentials_store = \"file\"\nchatgpt_base_url = \"{chatgpt_base_url}\"\n\n[features]\nfast_mode = true\nin_app_voice = true\n"
);
std::fs::write(codex_home.path().join("config.toml"), &user_config)?;
@@ -258,7 +258,7 @@ async fn features_list_honors_cloud_managed_feature_requirements() -> Result<()>
"enterprise_managed": [{
"id": "managed-feature-requirements",
"name": "Managed feature requirements",
"contents": "[features]\nfast_mode = false\n",
"contents": "[features]\nfast_mode = false\nin_app_voice = false\n",
}],
},
})))
@@ -290,6 +290,14 @@ async fn features_list_honors_cloud_managed_feature_requirements() -> Result<()>
fast_mode.split_whitespace().collect::<Vec<_>>(),
["fast_mode", "stable", "false"]
);
let in_app_voice = stdout
.lines()
.find(|line| line.starts_with("in_app_voice "))
.context("feature list should include in_app_voice")?;
insta::assert_snapshot!(
in_app_voice.split_whitespace().collect::<Vec<_>>().join(" "),
@"in_app_voice stable false"
);
assert_eq!(
std::fs::read_to_string(codex_home.path().join("config.toml"))?,
user_config