Skip to content

Conversation

@xusd320
Copy link

@xusd320 xusd320 commented Jan 6, 2026

This pull request updates the DiskFileSystem implementation to support multiple denied root paths instead of just one. The changes enhance flexibility and security by allowing the filesystem to restrict access to several directories simultaneously. The most important changes are:

Denied paths handling

  • Replaced the single denied_path field with a collection denied_paths of type AutoSet<RcStr> in the DiskFileSystemInner struct, enabling multiple denied root paths.
  • Updated the is_path_denied method to check if a path matches any entry in denied_paths, rather than a single path.

API changes

  • Modified constructors: DiskFileSystem::new now initializes with an empty denied paths list, DiskFileSystem::new_with_denied_paths was added to allow specifying multiple denied paths, and the internal constructor was updated accordingly. [1] [2] [3]

Directory entry filtering

  • Updated directory reading logic to compute a set of denied entries for each directory based on all denied paths, filtering them out efficiently during directory traversal. [1] [2] [3]

@gemini-code-assist
Copy link

Summary of Changes

Hello @xusd320, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the DiskFileSystem implementation to support the denial of access to multiple root paths, moving from a single denied path configuration to a collection of denied paths. This change enhances the flexibility and security of the filesystem by allowing more granular control over restricted directories.

Highlights

  • Denied Paths Handling: The DiskFileSystem now supports multiple denied root paths by replacing a single denied_path field with a collection denied_paths of type AutoSet<RcStr>. The is_path_denied method has been updated to check against all entries in this collection.
  • API Changes: The DiskFileSystem::new constructor now initializes with an empty list of denied paths. A new constructor, DiskFileSystem::new_with_denied_paths, has been added to allow specifying multiple denied paths during initialization. The internal constructor was also updated to reflect these changes.
  • Directory Entry Filtering: The directory reading logic has been enhanced to efficiently filter out denied entries. It now computes a set of denied entries relevant to the current directory based on all configured denied paths, improving performance during directory traversal.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@xusd320 xusd320 changed the title refactor(turbopack-node): support execution by napi and worker_threads … feat(turbo-tasks-fs): support multiple denied paths in DiskFileSystem and use AutoSet Jan 6, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the DiskFileSystem to support multiple denied paths, which is a great enhancement for flexibility. The implementation is mostly correct, but I've identified a critical bug in the logic for filtering directory entries based on the denied paths. This bug could cause the denied paths feature to fail in common scenarios, such as when denying a file or directory in the root of the filesystem. I've provided a detailed comment with a suggested fix.

@xusd320 xusd320 force-pushed the feat/multi-denied-paths branch from 14db679 to f17cccb Compare January 6, 2026 10:10
@xusd320 xusd320 merged commit f694d5b into utoo Jan 6, 2026
11 of 24 checks passed
@xusd320 xusd320 changed the title feat(turbo-tasks-fs): support multiple denied paths in DiskFileSystem and use AutoSet feat(turbo-tasks-fs): support multiple denied paths in DiskFileSystem Jan 7, 2026
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.

2 participants