Skip to content

Follow directory symlinks in filesystem walks - #29844

Merged
jif-oai merged 2 commits into
mainfrom
jif/fs-walk-symlinks
Jun 24, 2026
Merged

Follow directory symlinks in filesystem walks#29844
jif-oai merged 2 commits into
mainfrom
jif/fs-walk-symlinks

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Stack 3 of 3. Stacked on #29842.

What changes

Adds an opt-in followDirectorySymlinks setting to fs/walk.

When enabled, the walk follows directory symlinks but continues to ignore symlinked files. Canonical directory identities prevent symlink cycles, while normal paths keep their existing spelling.

Environment skill discovery enables the setting so symlinked skill directories continue to work with the new single-RPC scan.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8aaa9ce5f5

ℹ️ 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".

Comment thread codex-rs/file-system/src/lib.rs
Comment thread codex-rs/file-system/src/lib.rs Outdated
jif-oai added a commit that referenced this pull request Jun 24, 2026
Stack 1 of 3. Follow-ups: #29842 and #29844.

## What changes

Adds a general bounded `fs/walk` operation to the exec server.

The operation returns file and directory entries plus recoverable
per-path errors. It skips symlinks, preserves the existing filesystem
sandbox routing, and enforces depth, directory, entry, and response-size
limits.

This PR only defines and wires the filesystem operation. It does not
change any callers yet.
@jif-oai
jif-oai force-pushed the jif/fs-walk-skills branch from 04ebef4 to 62d03ed Compare June 24, 2026 15:18
@jif-oai
jif-oai requested a review from a team as a code owner June 24, 2026 15:18
jif-oai added a commit that referenced this pull request Jun 24, 2026
Stack 2 of 3. Base: #29841. Follow-up: #29844.

## What changes

Environment skill discovery currently walks remote filesystems through
repeated `readDirectory` and `getMetadata` calls. This switches that
scan to the bounded `fs/walk` operation from the base PR.

```text
Before: readDirectory(root) -> getMetadata(...) -> readDirectory(child) -> ...
After:  fs/walk(root, limits) -> filter the result for SKILL.md
```

This makes environment skill discovery one RPC while preserving
traversal warnings and the existing depth and directory limits. The scan
also has an explicit entry limit. The follow-up restores
directory-symlink traversal.
Base automatically changed from jif/fs-walk-skills to main June 24, 2026 15:32
@jif-oai
jif-oai force-pushed the jif/fs-walk-symlinks branch from 8aaa9ce to d1d25ee Compare June 24, 2026 15:35
@jif-oai

jif-oai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d1d25ee7a7

ℹ️ 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".

Comment thread codex-rs/file-system/src/lib.rs
Comment thread codex-rs/file-system/src/lib.rs Outdated
Comment thread codex-rs/file-system/src/lib.rs Outdated
@jif-oai
jif-oai force-pushed the jif/fs-walk-symlinks branch from d1d25ee to 7356919 Compare June 24, 2026 17:22
@jif-oai
jif-oai force-pushed the jif/fs-walk-symlinks branch from 7356919 to c32566c Compare June 24, 2026 18:13
@jif-oai
jif-oai merged commit 96d8e34 into main Jun 24, 2026
30 of 31 checks passed
@jif-oai
jif-oai deleted the jif/fs-walk-symlinks branch June 24, 2026 19:52
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants