Conversation
|
Hi @ehedlund, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
Summary of ChangesHello, 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 focuses on enhancing the maintainability and consistency of the core sandbox functionality. It modularizes the Linux sandbox argument generation and standardizes the testing approach across all operating systems, ensuring robust and predictable behavior, particularly for critical aspects like current working directory propagation. Highlights
Using Gemini Code AssistThe 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
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 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the prepareCommand method in LinuxSandboxManager by extracting its logic into several new private helper methods (getNetworkArgs, getBaseArgs, getGovernanceArgs, getAllowedPathsArgs, getForbiddenPathsArgs, and getMaskArgs) to improve modularity and testability. Corresponding unit tests for Linux, macOS, and Windows sandbox managers have been reorganized into describe blocks and expanded to cover network access, governance files, allowed paths, and forbidden paths. A minor update was also made to include cwd in the prepareCommand return for Windows. I have no feedback to provide.
|
Size Change: +861 B (0%) Total Size: 26.3 MB
ℹ️ View Unchanged
|
…ux helper methods
393e32d to
70d03ff
Compare
Summary
Standardizes the organization and logical grouping of the OS-specific sandbox unit tests across Linux, Windows, and macOS, while also refactoring
LinuxSandboxManagerfor better readability.Details
bwrapargument construction logic inprepareCommandinto focused helper methods (getBaseArgs,getNetworkArgs,getGovernanceArgs,getAllowedPathsArgs,getForbiddenPathsArgs,getMaskArgs).LinuxSandboxManager.test.ts,WindowsSandboxManager.test.ts, andMacOsSandboxManager.test.tsto utilize the exact same nesteddescribeblocks (prepareCommand,governance files,allowedPaths,forbiddenPaths) and identicalitassertions.req.cwdpropagation in Windows and Linux managers, ensuring consistent behavior across all supported OS sandboxes.Related Issues
Related to #1550
How to Validate
npm test -w @google/gemini-cli-core -- src/sandbox/packages/core/src/sandbox/to verify structural parallelism between the.test.tsfiles.Pre-Merge Checklist