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:
gabec-openai
2026-03-12 11:20:31 -07:00
committed by GitHub
parent cfe3f6821a
commit 4fa7d6f444
4 changed files with 159 additions and 49 deletions

View File

@@ -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();