Skip to content

feat(app-server): add exclusive filesystem copies#28932

Draft
nornagon-openai wants to merge 1 commit into
mainfrom
nornagon/codex/app-server-fs-copy-exclusive
Draft

feat(app-server): add exclusive filesystem copies#28932
nornagon-openai wants to merge 1 commit into
mainfrom
nornagon/codex/app-server-fs-copy-exclusive

Conversation

@nornagon-openai

Copy link
Copy Markdown
Collaborator

Why

Codex Apps adapts app-server filesystem operations to its execution-host interface. Callers need an atomic copy mode that refuses to replace an existing destination and reports that condition consistently across local and remote hosts.

What

  • Add exclusive to fs/copy, defaulting to false.
  • Implement exclusive regular-file copies with create-new destination semantics so an existing file is never overwritten.
  • Preserve AlreadyExists across exec-server RPC and expose structured app-server error data as { "code": "EEXIST" }.
  • Cover local, remote, sandbox transport, and app-server destination-preservation behavior.
  • Update generated protocol schemas and API documentation.

This PR is intentionally limited to exclusive file copies. File-size metadata and symlink semantics are independent changes.

Validation

  • just write-app-server-schema
  • just test -p codex-app-server-protocol
  • just test -p codex-exec-server file_system_copy_exclusive_preserves_existing_destination
  • just test -p codex-app-server fs_copy_exclusive_preserves_existing_destination
  • just fix -p codex-file-system -p codex-exec-server -p codex-app-server-protocol -p codex-app-server
  • just fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant