fix(runtime): add persistent permission configuration - #4856
Closed
CxHsin wants to merge 2 commits into
Closed
Conversation
Generated-by: Codex
Generated-by: Codex
Contributor
Author
|
Duplicate of #4849; the fix commit has been pushed to the existing PR branch CxHsin:codex/permission-configuration. |
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.
Summary
Implements the basic persistent permission configuration requested in #3351.
The Runtime Host now owns canonical deny rules for commands and filesystem paths. The rules are persisted in Runtime Policy, exposed through the CLI/control-plane mutation, and enforced before local tool dispatch. Persistent denies apply to Bash, PTY input, file tools, and recursive Glob/Grep scopes; they take precedence over the session permission mode.
This also keeps the rules live for existing backends: glob matchers are compiled once per immutable rule snapshot, and each tool dispatch reads the current Host-owned snapshot. Updating the policy therefore affects the next dispatch without rebuilding the backend.
Fixes #3351
Scope and boundaries
Verification
Passed:
npm test was also attempted, but did not complete cleanly in this Windows environment. The failures were in existing platform/resource-sensitive tests involving symlink privileges, SQLite file locking, PTY/Shell behavior, and MCP/Eval external resources; the affected permission suites above pass independently.
AI use
Tool(s) and scope: Codex authored the implementation, tests, and this description. The affected commit includes the required Generated-by: Codex trailer.
Checklist
Does this PR entail a change in behavior?