mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
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:
@@ -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(
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user