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:
andrewgu-oai authored and copyberry committed 2026-09-11 00:55:51 +00:00
1 parent 9e22e74e8d
commit e53c444964
11 files changed
+305 -44

No files matched your search

+5 -2
View File
@@ -8,13 +8,16 @@ const FALLBACK_MODEL_METADATA_WARNING_SUFFIX: &str =
pub(super) struct WarningDisplayState {
/// Completed resume history does not end startup; active work does.
pub(super) startup_complete: bool,
/// Initialization config warnings may also arrive as ordinary thread warnings.
pub(super) startup_config_warnings: HashSet<String>,
fallback_model_metadata_slugs: HashSet<String>,
}
impl WarningDisplayState {
pub(super) fn should_display(&mut self, message: &str) -> bool {
fallback_model_metadata_warning_slug(message)
.is_none_or(|slug| self.fallback_model_metadata_slugs.insert(slug.to_string()))
!self.startup_config_warnings.contains(message)
&& fallback_model_metadata_warning_slug(message)
.is_none_or(|slug| self.fallback_model_metadata_slugs.insert(slug.to_string()))
}
}