mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Raise Guardian's action review limit to 200,000 bytes (#44060)
## What changed Increase `GUARDIAN_MAX_ACTION_BYTES` from 8,000 to 200,000 bytes to allow larger actions to be reviewed. Keep unified exec stdin approvals capped at 8,000 bytes with a separate `MAX_STDIN_APPROVAL_BYTES` constant. ## Testing Update aggregate payload rejection coverage for the new limit and exercise MCP elicitation reviews with tool descriptions exceeding the previous 8,000-byte limit. GitOrigin-RevId: fd4b97980803a7a687449043931e6f1e57e260d3
This commit is contained in:
@@ -102,6 +102,7 @@ const UNIFIED_EXEC_ENV: [(&str, &str); 10] = [
|
||||
const NETWORK_ACCESS_DENIED_MESSAGE: &str =
|
||||
"Network access was denied by the Codex sandbox network proxy.";
|
||||
const LATE_NETWORK_DENIAL_GRACE_PERIOD: Duration = Duration::from_millis(100);
|
||||
const MAX_STDIN_APPROVAL_BYTES: usize = 8_000;
|
||||
const INTERRUPT: &str = "\u{3}";
|
||||
|
||||
/// Test-only override for deterministic unified exec process IDs.
|
||||
@@ -862,7 +863,7 @@ impl UnifiedExecProcessManager {
|
||||
// Bound the entire serialized action plus its reason, including JSON
|
||||
// escaping. Reject, never execute an unreviewed tail.
|
||||
let oversized = reviewed.text.len().saturating_add(approval_reason.len())
|
||||
> crate::guardian::GUARDIAN_MAX_ACTION_BYTES;
|
||||
> MAX_STDIN_APPROVAL_BYTES;
|
||||
let size_check_result = if reviewed.truncated {
|
||||
"formatter_truncated"
|
||||
} else if oversized {
|
||||
|
||||
Reference in New Issue
Block a user