mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Warn about ignored configuration settings (#44691)
## Why Unrecognized settings can be silently ignored, leaving typos or deprecated configuration unnoticed. ## What changed - Collect warnings for unrecognized fields in effective configuration and requirements layers, including unknown feature keys in configuration. - Report sources and field names without configuration values, show up to three entries, and provide migration hints for `network_proxy`, `allowed_permissions`, and `include_view_image_tool`. - Emit project-specific warnings when starting a thread and suppress repeated startup warnings in the app server and TUI. ## Testing Add coverage for merged configuration, disabled layers, startup and project warning delivery, omission of configuration values, and warning deduplication. GitOrigin-RevId: 464cef87882502b19865ae10b50b6f82defb7296
This commit is contained in:
@@ -1424,10 +1424,23 @@ impl ThreadRequestProcessor {
|
||||
.map_err(|err| config_load_error(&err))?;
|
||||
}
|
||||
|
||||
// Thread config can include project-local warnings absent at initialization.
|
||||
let mut config_warnings = config
|
||||
.startup_warnings
|
||||
.iter()
|
||||
.map(|summary| ConfigWarningNotification {
|
||||
summary: summary.clone(),
|
||||
details: None,
|
||||
path: None,
|
||||
range: None,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
if let Ok(Some(err)) =
|
||||
codex_core::check_execpolicy_for_warnings(&config.config_layer_stack).await
|
||||
{
|
||||
let notification = crate::exec_policy_config_warning(&err);
|
||||
config_warnings.push(crate::exec_policy_config_warning(&err));
|
||||
}
|
||||
for notification in config_warnings {
|
||||
if !initial_config_warnings.contains(¬ification) {
|
||||
listener_task_context
|
||||
.outgoing
|
||||
|
||||
Reference in New Issue
Block a user