feat(codex): emit and preserve :minimal filesystem baseline#1960
Open
saitota wants to merge 5 commits into
Open
feat(codex): emit and preserve :minimal filesystem baseline#1960saitota wants to merge 5 commits into
saitota wants to merge 5 commits into
Conversation
Always emit `:minimal = "read"` in the Codex permission profile so that `include_platform_defaults` is enabled, providing the platform/runtime read access needed for basic sandboxed command execution on macOS, Linux, and Windows (openai/codex#13434, rust-v0.112.0-alpha.8). Also preserve existing :root and :tmpdir baseline values on round-trips so user-customized Codex-native sandbox settings survive Rulesync generate passes without being imported into Rulesync's permission model. Closes dyoshikawa#1876
…E assert - Add `:slash_tmp` to CODEX_FILESYSTEM_BASELINE_KEYS to match all 5 special paths defined in codex-rs parse_special_path (:minimal/:root/:tmpdir/:slash_tmp/:workspace_roots) - Remove dead `Object.keys(filesystem).length > 0` guard since filesystem is always non-empty after being initialized with `:minimal = "read"` - Add `filesystem[":minimal"] === "read"` assertion to E2E test to catch regressions per CLAUDE.md Tool x Feature matrix requirement - Clarify :minimal comment to reference FileSystemSpecialPath::Minimal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Codex CLI
v0.112.0-alpha.8introduced:minimalas aFileSystemSpecialPaththat enablesinclude_platform_defaults(), providing the platform/runtime read access needed for sandboxed command execution on macOS, Linux, and Windows. Without:minimal = "read"in the profile, commands fail inside the sandbox on those platforms.Rulesync's existing model had no concept of these Codex-native sandbox baseline paths (
:minimal,:root,:tmpdir,:slash_tmp), so they were silently dropped on import and never emitted on generate.Changes
":minimal" = "read"in the generatedpermissions.<profile>.filesystemtable:minimal,:root,:tmpdir,:slash_tmpon import so they never pollute rulesync's permission model (they're Codex-native baselines, not user rules):root,:tmpdir,:slash_tmpvalues verbatim on regeneration viamergeWithExistingProfileObject.keys(filesystem).length > 0guard (filesystem is always non-empty after:minimalinit):minimal = "read"assertion to E2E test per Tool × Feature matrix requirementdocs/reference/file-formats.mdCloses #1876
References
FileSystemSpecialPath::Minimalandinclude_platform_defaults()Test plan
pnpm fmt:check/oxlint/typecheck— cleancspell/secretlint— cleancodexcli-permissions.test.ts— 39 pass (6 new cases covering:minimalemit, import skip, round-trip,:root/:tmpdir/:slash_tmppass-through)codexclipermissions case updated to assertfilesystem[":minimal"] === "read"