Retire worktree and voice feature flags (#54175)

## What changed

- Remove feature-flag checks from managed worktree creation and repository-aware session discovery, while retaining local workspace and trust checks.
- Make TUI voice availability follow platform support instead of `features.realtime_conversation`.
- Ignore `features.worktrees` and `features.realtime_conversation` configuration overrides, warn when managed requirements reference them, and hide both flags from `/experimental`, including catalogs from older servers.

## Testing

Add coverage for ignored configuration overrides and managed requirements, and update session filtering, worktree grouping, and experimental feature discovery tests for the retired flags.

GitOrigin-RevId: 1d64e890e6e2f8a78926a9ea163126c0890b068e
This commit is contained in:
Benjamin Carlsson
2026-10-15 03:48:33 +00:00
committed by copyberry
parent 160b2b1ef6
commit bb64b894fd
38 changed files with 166 additions and 461 deletions
-5
View File
@@ -421,11 +421,6 @@ pub async fn run_main(cli: Cli, arg0_paths: Arg0DispatchPaths) -> anyhow::Result
.cloud_config_bundle(gate_cloud_config.clone())
.build()
.await?;
if !gate_config.features.enabled(Feature::Worktrees) {
anyhow::bail!(
"--worktree requires the worktrees feature; enable it with --enable worktrees"
);
}
if let Some(ExecCommand::Fork(args)) = command.as_mut() {
let saved_cwd = worktree::fork_source(
args,
+12 -30
View File
@@ -407,35 +407,17 @@ fn worktree_rejects_remote_defaults_before_allocation() -> anyhow::Result<()> {
}
#[test]
fn worktree_rejects_disabled_features_and_ignored_config_before_allocation() -> anyhow::Result<()> {
for (config, args, expected) in [
(
"",
vec!["--ignore-user-config", "prompt"],
"--worktree cannot be combined with --ignore-user-config",
),
(
"features.worktrees = false",
vec!["prompt"],
"--enable worktrees",
),
(
"features.worktrees = false",
vec!["fork", "missing"],
"--enable worktrees",
),
(
"features.worktrees = true",
vec!["-c", "features.worktrees=false", "prompt"],
"--enable worktrees",
),
] {
let test = test_codex_exec();
fs::write(test.home_path().join("config.toml"), config)?;
let output = test.cmd().arg("--worktree").args(args).output()?;
assert!(!output.status.success());
assert!(String::from_utf8_lossy(&output.stderr).contains(expected));
assert!(!test.home_path().join("worktrees").exists());
}
fn worktree_rejects_ignored_config_before_allocation() -> anyhow::Result<()> {
let test = test_codex_exec();
let output = test
.cmd()
.args(["--worktree", "--ignore-user-config", "prompt"])
.output()?;
assert!(!output.status.success());
assert!(
String::from_utf8_lossy(&output.stderr)
.contains("--worktree cannot be combined with --ignore-user-config")
);
assert!(!test.home_path().join("worktrees").exists());
Ok(())
}