Clarify cloud requirements error messages (#19078)

## Why
The current cloud-requirements failures say `workspace-managed config`,
which is ambiguous and can read like it refers to local managed config
such as `managed_config.toml`.

This code path only applies to cloud requirements, so the user-facing
message should name that source directly.

## What changed
- Updated the load failure in
[`codex-rs/cloud-requirements/src/lib.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/cloud-requirements/src/lib.rs)
to say `failed to load cloud requirements (workspace-managed policies)`.
- Updated the parse failure in the same file to use the same `cloud
requirements (workspace-managed policies)` terminology.
- Kept `workspace-managed` hyphenated because it is used as a compound
modifier.
- Updated the matching assertion in
[`codex-rs/app-server/src/codex_message_processor.rs`](https://github.com/openai/codex/blob/46e704d1f93054daa9a3b5a9100333c540c81d50/codex-rs/app-server/src/codex_message_processor.rs).
- Reused `CLOUD_REQUIREMENTS_LOAD_FAILED_MESSAGE` in the
`codex-cloud-requirements` test where the test is asserting that
crate-local contract directly.

## Testing
`cargo test -p codex-cloud-requirements`
This commit is contained in:
Gav Verma
2026-04-22 23:07:08 -07:00
committed by GitHub
Unverified
parent 951be1a8a1
commit 2ef2d675d6
2 changed files with 13 additions and 9 deletions
@@ -10513,7 +10513,7 @@ mod tests {
let err = std::io::Error::other(CloudRequirementsLoadError::new(
CloudRequirementsLoadErrorCode::RequestFailed,
/*status_code*/ None,
"failed to load your workspace-managed config",
"Failed to load cloud requirements (workspace-managed policies).",
));
let error = config_load_error(&err);
@@ -10523,7 +10523,7 @@ mod tests {
Some(json!({
"reason": "cloudRequirements",
"errorCode": "RequestFailed",
"detail": "failed to load your workspace-managed config",
"detail": "Failed to load cloud requirements (workspace-managed policies).",
}))
);
}