feat(ls): display symlink targets in long format output#165
Conversation
ls -l now shows `-> target` for symbolic links, matching GNU ls behavior. Adds Sandbox.Readlink and CallContext.ReadlinkFile to read symlink destinations through the sandbox. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70c2aa1aa4
ℹ️ 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".
ls -lF now shows indicators on the symlink target (e.g. dirlink -> subdir/, filelink -> file.txt*), matching GNU ls behavior. The target's FileInfo is obtained via StatFile and passed to indicator(). Dangling symlinks show no target indicator, also matching GNU ls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbff91ca17
ℹ️ 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".
- Use info.Mode() as fallback for symlink detection when DirEntry.Type() returns 0 (DT_UNKNOWN on some filesystems). - Remove skip_assert_against_bash from symlink scenarios — they use stdout_contains so UID/GID differences don't affect the comparison. Verified all three pass against bash via docker. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex conduct a comprehensive security and code review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20bcb577e7
ℹ️ 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".
GNU ls applies classification indicators to symlink targets only with -F (classify), not -p (append-slash). For example, ls -lF shows "link -> dir/" but ls -lp shows "link -> dir" without the trailing slash. Guard the target indicator call with opts.classify. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@codex conduct a comprehensive security and code review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
ls -lnow shows-> targetfor symbolic links, matching GNU ls behaviorSandbox.Readlinkmethod usingos.Root.Readlinkfor sandboxed symlink resolutionReadlinkFilethroughCallContextso builtins can read symlink destinationsTest plan
symlink_target.yaml(direct arg) andsymlink_target_in_dir.yaml(directory listing)allowedpaths,interp,tests,analysis🤖 Generated with Claude Code