Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: afb44ee779
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pub sandbox: SandboxPolicy, | ||
| pub permission_profile: PermissionProfile, | ||
| pub reasoning_effort: Option<ReasoningEffort>, |
There was a problem hiding this comment.
Keep thread response deserialization tolerant of missing profile
Adding permission_profile as a required field makes ThreadStartResponse/ThreadResumeResponse/ThreadForkResponse fail to deserialize when that field is absent, which breaks mixed-version clients and any stored payloads from older servers that predate this field. Existing lifecycle parsing paths intentionally tolerate some missing response fields, so this strict requirement is a wire-compatibility regression unless permission_profile is given a default (or made optional) during deserialization.
Useful? React with 👍 / 👎.
4874afe to
25420fc
Compare
5a57cef to
f02bf74
Compare
11e76d0 to
880130c
Compare
## Why #18274 made `PermissionProfile` the canonical file-system permissions shape, but the round-trip from `FileSystemSandboxPolicy` to `PermissionProfile` still dropped one piece of policy metadata: `glob_scan_max_depth`. That field is security-relevant for deny-read globs such as `**/*.env`. On Linux, bubblewrap sandbox construction uses it to bound unreadable glob expansion. If a profile copied from active runtime permissions loses this value and is submitted back as an override, the resulting `FileSystemSandboxPolicy` can behave differently even though the visible permission entries look equivalent. ## What changed - Add `glob_scan_max_depth` to protocol `FileSystemPermissions` and preserve it when converting to/from `FileSystemSandboxPolicy`. - Keep legacy `read`/`write` JSON for simple path-only permissions, but force canonical JSON when glob scan depth is present so the metadata is not silently dropped. - Carry `globScanMaxDepth` through app-server `AdditionalFileSystemPermissions`, generated JSON/TypeScript schemas, and app-server/TUI conversion call sites. - Preserve the metadata through sandboxing permission normalization, merging, and intersection. - Carry the merged scan depth into the effective `FileSystemSandboxPolicy` used for command execution, so bounded deny-read globs reach Linux bubblewrap materialization. ## Verification - `cargo test -p codex-sandboxing glob_scan -- --nocapture` - `cargo test -p codex-sandboxing policy_transforms -- --nocapture` - `just fix -p codex-sandboxing` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/18713). * #18288 * #18287 * #18286 * #18285 * #18284 * #18283 * #18282 * #18281 * #18280 * #18279 * #18278 * #18277 * #18276 * #18275 * __->__ #18713
31d1b49 to
ef231cf
Compare
4b6f600 to
50a4ca2
Compare
5ae72d8 to
8618f64
Compare
Why
App-server clients need a canonical view of the permissions that are active for a thread. Returning only legacy sandbox fields forces clients to keep interpreting
SandboxPolicyeven after core can derive a constrainedPermissionProfile.What changed
This adds the app-server v2
PermissionProfileAPI shape, includespermissionProfilein thread start/resume/fork responses, populates it from the config snapshot, and regenerates the TypeScript and JSON schema fixtures.Verification
cargo test -p codex-app-server-protocol permission -- --nocapturecargo test -p codex-tui permissions -- --nocaptureStack created with Sapling. Best reviewed with ReviewStack.