Skip to content

Make deny canonical for filesystem permission entries#23493

Merged
viyatb-oai merged 2 commits into
mainfrom
codex/viyatb/filesystem-entry-deny-alias
May 19, 2026
Merged

Make deny canonical for filesystem permission entries#23493
viyatb-oai merged 2 commits into
mainfrom
codex/viyatb/filesystem-entry-deny-alias

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented May 19, 2026

Why

Filesystem permission profiles used none for deny-read entries, which is less direct than the action the entry actually represents. This change makes deny the canonical filesystem permission spelling while preserving compatibility for older configs that still send none.

What changed

  • rename FileSystemAccessMode::None to Deny
  • serialize and generate schemas with deny as the canonical value
  • retain none only as a legacy input alias for temporary config compatibility
  • update filesystem glob diagnostics and regression coverage to use the canonical spelling
  • refresh config and app-server schema fixtures to match the new wire shape

Validation

  • cargo test -p codex-protocol
  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-core config_toml_deserializes_permission_profiles --lib
  • cargo test -p codex-core read_write_glob_patterns_still_reject_non_subpath_globs --lib

Earlier in the session, a broad cargo test -p codex-core run reached unrelated pre-existing failures in timing/snapshot/git-info tests under this environment; the targeted surfaces touched by this PR passed cleanly.

Co-authored-by: Codex noreply@openai.com
Comment thread codex-rs/core/src/config/permissions.rs Outdated
Comment thread codex-rs/core/src/config/permissions.rs Outdated
Comment thread codex-rs/core/src/config/permissions.rs Outdated
io::ErrorKind::InvalidInput,
format!(
"filesystem glob path `{path}` only supports `none` access; use an exact path or trailing `/**` for `{access}` subtree access"
"filesystem glob path `{path}` only supports `none` or `deny` access; use an exact path or trailing `/**` for `{access}` subtree access"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 12f9df1. This message now uses only deny.

Comment thread codex-rs/core/src/config/permissions_tests.rs Outdated
assert!(
err.to_string()
.contains("filesystem glob path `src/**/*.rs` only supports `none` access"),
.contains("filesystem glob path `src/**/*.rs` only supports `none` or `deny` access"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 12f9df1. The expected error string now uses only deny.

Comment thread codex-rs/core/config.schema.json Outdated
Comment thread codex-rs/protocol/src/permissions.rs Outdated
Comment thread codex-rs/protocol/src/permissions.rs Outdated
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai changed the title Accept deny for filesystem permission entries Make deny canonical for filesystem permission entries May 19, 2026
@viyatb-oai viyatb-oai marked this pull request as ready for review May 19, 2026 17:54
@viyatb-oai viyatb-oai requested a review from a team as a code owner May 19, 2026 17:54
@bolinfest bolinfest self-requested a review May 19, 2026 17:57
Comment on lines +821 to +835
"oneOf": [
{
"enum": [
"read",
"write"
],
"type": "string"
},
{
"description": "`none` is a legacy input alias retained temporarily for compatibility.",
"enum": [
"deny"
],
"type": "string"
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This codegen seems a bit unfortunate...

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12f9df1292

ℹ️ 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".

Read,
Write,
None
Deny
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve none alias in v2 filesystem access

When an app-server client built against the previous v2 schema replies to item/permissions/requestApproval (or sends an experimental additional-permissions payload) with an entry whose access is still "none", this v2 enum now rejects the JSON before it can be converted to the core type that still has #[serde(alias = "none")]. Since the prior generated TypeScript exposed "none" as the valid value, mixed-version clients will fail permission approvals involving deny-read entries unless this wrapper enum also accepts the legacy alias on Deny.

Useful? React with 👍 / 👎.

Comment on lines +831 to +832
"enum": [
"deny"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow legacy none in the config schema

For users who still have existing config.toml permission profiles with "none", the Rust deserializer accepts them via the new alias, but the generated config.schema.json no longer does, so schema-based validation/editors will mark otherwise supported configs as invalid. If none is intentionally retained as a temporary compatibility input, this enum should include the legacy value (or another schema allowance) alongside canonical deny.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we drop support for the legacy alias, hopefully the codegen will be cleaned up!

@viyatb-oai viyatb-oai merged commit 3c76081 into main May 19, 2026
31 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/filesystem-entry-deny-alias branch May 19, 2026 18:03
@github-actions github-actions Bot locked and limited conversation to collaborators May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants