Trust undecided local projects automatically (#36935)

## What changed

- Replace the TUI directory-trust prompt with automatic trust for local projects whose trust level is unset. Keep explicit trust settings and remote workspaces unchanged.
- Persist trust for the resolved Git or configured project root, then reload configuration so project-local settings take effect.
- Fall back to an in-memory trust override and an embedded app server when the config update cannot be persisted.

## Testing

- Cover persisted and in-memory trust, custom project-root markers, and the working directories selected by resume and fork flows.

GitOrigin-RevId: 8fd51eb4cd88267073324bfd7dc4106a56d7c745
This commit is contained in:
Eric Traut
2026-08-04 17:49:54 +00:00
committed by copyberry
parent 90314a9207
commit 1e59dc5bda
12 changed files with 388 additions and 690 deletions
+2 -1
View File
@@ -219,7 +219,8 @@ mod reload {
layers,
config.config_layer_stack.requirements().clone(),
config.config_layer_stack.requirements_toml().clone(),
)?)
)?
.with_project_root(config.config_layer_stack.project_root().cloned()))
}
fn deserialize_effective_config(
+5
View File
@@ -159,6 +159,7 @@ async fn apply_role_preserves_unspecified_keys() {
TomlValue::String("base-model".to_string()),
)])
.await;
let project_root = config.config_layer_stack.project_root().cloned();
config.codex_linux_sandbox_exe = Some(PathBuf::from("/tmp/codex-linux-sandbox"));
config.main_execve_wrapper_exe = Some(PathBuf::from("/tmp/codex-execve-wrapper"));
let role_path = write_role_config(
@@ -187,6 +188,10 @@ async fn apply_role_preserves_unspecified_keys() {
(config.model.as_deref(), config.model_reasoning_effort),
(Some("spawn-model"), Some(ReasoningEffort::Low)),
);
assert_eq!(
config.config_layer_stack.project_root(),
project_root.as_ref()
);
assert_eq!(
config.codex_linux_sandbox_exe,
Some(PathBuf::from("/tmp/codex-linux-sandbox"))