Conversation
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc0f61af1f
ℹ️ 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".
03e72f1 to
24f01e1
Compare
7336736 to
bb76782
Compare
f965330 to
1bb4cb8
Compare
b9f3284 to
7aa7447
Compare
802324c to
8ce7db8
Compare
aa3919e to
188df1b
Compare
eef356e to
daed594
Compare
8eb3d14 to
93aef9b
Compare
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.
Why
The app-server should let clients change the thread's named permission profile association and workspace roots without letting them replace the underlying
PermissionProfilevalue outright. The server needs to stay in control of profile definitions while still supporting the operations clients actually need:workspaceRootsBecause
permissions/workspaceRootsare experimental fields, tightening that contract is preferable to continuing to accept more expressive payloads that the server should not honor.What Changed
thread/start,thread/resume,thread/fork, andturn/startnow treatpermissionsas a profile id (Option<String>) instead of a structured profile payload.PermissionProfile;workspaceRootscan be replaced independently.sandbox/sandboxPolicywhen it is a no-op or maps to a named profile plus compatible workspace roots.sandboxPolicy: workspaceWritefor acwdthat is already a workspace root, while still rebinding roots for a changedcwdand honoring non-empty legacywritableRoots.fileSystemSandboxPolicydata when aTurnContextItempredates the serializedpermissionProfilefield, so resume keeps deny entries and internal writable-root grants instead of falling back to the coarser legacy sandbox projection.Compatibility
--add-dir, when the currentcwdis already among the thread roots.workspaceRoots, but they cannot submit arbitraryPermissionProfilevalues through the app-server API.permissionProfilewas serialized still resume from their serialized filesystem policy when present, which protects split-policy details such as deny rules and Codex-internal writable roots used by memories.Verification
The targeted regression coverage here focused on the app-server call paths where older clients or persisted threads could drift from the server's effective permissions:
thread_start_selects_permission_profile_by_idthread_resume_running_applies_workspace_roots_and_active_profile_nameturn_start_updates_cwd_without_replacing_workspace_roots_v2turn_start_legacy_workspace_sandbox_updates_workspace_roots_for_cwdturn_start_legacy_workspace_sandbox_preserves_extra_rootsturn_start_rejects_unknown_permission_selection_before_starting_turnlegacy_workspace_sandbox_preserves_current_extra_roots_when_cwd_is_still_a_rootlegacy_workspace_sandbox_honors_non_empty_legacy_writable_rootslegacy_workspace_selection_validation_requires_exact_projectionpersisted_thread_permission_state_clears_stale_active_profilepersisted_thread_permission_state_uses_legacy_turn_context_file_system_policyStack created with Sapling. Best reviewed with ReviewStack.