mirror of
https://github.com/openai/codex.git
synced 2026-05-03 21:01:55 +03:00
Handle malformed agent role definitions nonfatally (#14488)
## Summary - make malformed agent role definitions nonfatal during config loading - drop invalid agent roles and record warnings in `startup_warnings` - forward startup warnings through app-server `configWarning` notifications ## Testing - `cargo test -p codex-core agent_role_ -- --nocapture` - `just fix -p codex-core` - `just fmt` - `cargo test -p codex-app-server config_warning -- --nocapture` Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -468,6 +468,14 @@ pub async fn run_main_with_transport(
|
||||
if let Some(warning) = project_config_warning(&config) {
|
||||
config_warnings.push(warning);
|
||||
}
|
||||
for warning in &config.startup_warnings {
|
||||
config_warnings.push(ConfigWarningNotification {
|
||||
summary: warning.clone(),
|
||||
details: None,
|
||||
path: None,
|
||||
range: None,
|
||||
});
|
||||
}
|
||||
|
||||
let feedback = CodexFeedback::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user