Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRust pnpm preserves inherited ChangesTMPDIR preservation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Parent as Parent process
participant BuildEnv as build_env_for_platform
participant Script as pacquet script
participant NodeOS as Node os.tmpdir()
Parent->>BuildEnv: Provide TMPDIR
BuildEnv->>Script: Preserve TMPDIR when unsafePerm is enabled
Script->>NodeOS: Resolve temporary directory
NodeOS-->>Script: Return inherited TMPDIR
Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoPreserve inherited TMPDIR for unsafePerm script runs
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pnpm/crates/cli/tests/run.rs (1)
399-404: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winPin this regression test to the
unsafePermbranch.The test sets
TMPDIRbut never explicitly enablesunsafePerm, so it relies on an implicit default or fixture configuration. Select the supportedunsafePerm=trueconfiguration explicitly to ensure this test always covers the preservation path; the executor test already covers the false branch. As per path instructions, CLI regression tests should prove the changed behavior through real command wiring.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/cli/tests/run.rs` around lines 399 - 404, Update the regression test invoking the pacquet command with show-tmp to explicitly select the supported unsafePerm=true configuration, while preserving the existing TMPDIR setup and assertions. Ensure it exercises the preservation path through real CLI wiring and leaves the false branch to the executor test.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/pacquet-preserve-tmpdir.md:
- Line 5: Update the changeset release note to state that inherited
user-provided TMPDIR is preserved only when unsafePerm is enabled, while normal
permissions continue using the package-local temporary directory. Keep the
wording concise and accurate.
---
Nitpick comments:
In `@pnpm/crates/cli/tests/run.rs`:
- Around line 399-404: Update the regression test invoking the pacquet command
with show-tmp to explicitly select the supported unsafePerm=true configuration,
while preserving the existing TMPDIR setup and assertions. Ensure it exercises
the preservation path through real CLI wiring and leaves the false branch to the
executor test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 77685b55-1713-46c1-97ee-a1d0b32b5a79
📒 Files selected for processing (4)
.changeset/pacquet-preserve-tmpdir.mdpnpm/crates/cli/tests/run.rspnpm/crates/executor/src/make_env.rspnpm/crates/executor/src/make_env/tests.rs
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "fix(executor): deduplicate Windows `TMPD..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
|
I also verified the review’s test-configuration nit. No test change is needed: explicit Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 5b11f05 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13445 +/- ##
==========================================
+ Coverage 87.64% 87.65% +0.01%
==========================================
Files 545 545
Lines 93978 94022 +44
==========================================
+ Hits 82367 82417 +50
+ Misses 11611 11605 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Addressed the valid Windows environment-key collision in commit The changeset intentionally remains Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 5a5923e |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
TMPDIRin pacquet script environments when scripts run withunsafePerm.node_modules/.tmpoverride whenunsafePermis disabled.os.tmpdir().TMPDIR, so no TypeScript change is required.Closes #13442.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users. It becomes a release note.
Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
TMPDIRwhen permissions allow it; otherwise they use the package’s dedicated temp directory.TMPDIR(and the runtime temp directory) stay consistent, including correct case-insensitive behavior on Windows.pacquet runpreserves an alternate temp directory and thatunsafePermcontrols whetherTMPDIRis preserved or overridden.