mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Actions targeting a secondary environment could be reviewed with the primary environment's denied-read restrictions. Each review needs the permission context of the environment that owns the action, including when a Guardian session is reused across environments. ## What changed - Carry `environment_id` through environment-scoped approval requests and their planned-action JSON. - Select and label permission context using the target environment, explicitly stating when it has no denied-read paths or globs. - Reject reviews for unavailable target environments and reject environment IDs longer than 256 bytes before Guardian inference, while preserving manual approval routing for oversized IDs. ## Testing Add coverage for `exec_command`, `apply_patch`, and `request_permissions` reviews switching environments while preserving the existing review prefix. Extend tests for environment-specific restrictions, unavailable environments, action serialization, and the 256-byte ID boundary. GitOrigin-RevId: ad3292edddb1c6f5b180142c6857cba6f1308328