mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
Allow model catalogs to omit writable-root sentences (#64837)
## Why The environment context already lists writable paths. An empty catalog template previously fell back to the bundled writable-root sentence, so a model catalog had no way to omit that repeated list. ## What changed Treat an empty `writable_root` or `writable_roots` template as a request to omit the corresponding sentence. Missing, null, invalid nonempty, and oversized templates still use the bundled wording. Suppressed roots leave the full path budget available for denied-read paths and globs and never trigger an omitted-path warning on their own. ## Testing Cover empty singular and plural templates and verify that suppressed roots leave room for denied-read entries. A model-switch scenario checks that Codex appends the updated permissions message once and preserves the earlier conversation, filesystem permissions, and approval settings. GitOrigin-RevId: 105819fb07ff829be8f111b3676656373aeb7892
This commit is contained in:
@@ -909,11 +909,13 @@ pub struct PermissionMessages {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub approved_command_prefix_saved: Option<CodexCachedStr>,
|
||||
/// Single writable-root sentence with exactly one `{{ roots }}` placeholder.
|
||||
/// Missing, null, empty, invalid, or oversized templates use the bundled sentence.
|
||||
/// An empty string suppresses the sentence. Missing, null, invalid, or oversized
|
||||
/// templates use the bundled sentence.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub writable_root: Option<CodexCachedStr>,
|
||||
/// Multiple writable-roots sentence with exactly one `{{ roots }}` placeholder.
|
||||
/// Missing, null, empty, invalid, or oversized templates use the bundled sentence.
|
||||
/// An empty string suppresses the sentence. Missing, null, invalid, or oversized
|
||||
/// templates use the bundled sentence.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub writable_roots: Option<CodexCachedStr>,
|
||||
/// Optional presentation before the harness-owned omission and no-bypass warning.
|
||||
|
||||
Reference in New Issue
Block a user