Skip to content

fix(cli): preserve symlinks during sandbox upload#1595

Merged
johntmyers merged 2 commits into
mainfrom
1425-upload-preserve-symlinks/jm
May 27, 2026
Merged

fix(cli): preserve symlinks during sandbox upload#1595
johntmyers merged 2 commits into
mainfrom
1425-upload-preserve-symlinks/jm

Conversation

@johntmyers
Copy link
Copy Markdown
Collaborator

@johntmyers johntmyers commented May 27, 2026

Summary

Preserve symlink entries when building sandbox upload tar archives instead of dereferencing them into their targets. This also routes single symlink uploads around git-filter canonicalization and uses symlink-aware existence checks so dangling symlinks are handled consistently.

Related Issue

Fixes #1425

Supersedes #1561

Changes

  • Replaced recursive upload archive building with symlink_metadata-based traversal that emits symlink tar entries.
  • Bypass git_sync_files for single symlink uploads so tracked, untracked, and dangling symlinks reach the archive writer.
  • Use symlink-aware local path checks for sandbox upload, create-time --upload, and legacy sync upload paths.
  • Added regression tests for directory symlinks, file-list symlinks, single symlinks, and dangling symlinks.

Testing

  • cargo test -p openshell-cli symlink
  • cargo test -p openshell-cli
  • cargo fmt --all -- --check
  • git diff --check
  • mise run pre-commit
  • Docker gateway smoke test against docker-dev on 0.0.51-dev.5+gac6a0a02

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

TaylorMutch
TaylorMutch previously approved these changes May 27, 2026
@github-actions
Copy link
Copy Markdown

@johntmyers johntmyers added the test:e2e Requires end-to-end coverage label May 27, 2026
@johntmyers johntmyers self-assigned this May 27, 2026
@github-actions
Copy link
Copy Markdown

Label test:e2e applied for a79b083. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@johntmyers johntmyers merged commit b6d5825 into main May 27, 2026
48 checks passed
@johntmyers johntmyers deleted the 1425-upload-preserve-symlinks/jm branch May 27, 2026 18:46
st-gr pushed a commit to st-gr/OpenShell that referenced this pull request May 28, 2026
* fix(cli): preserve symlinks during sandbox upload

* docs(sandboxes): document upload symlink behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sandbox upload dereferences symlinks — uploaded as real directories, breaking git

2 participants