fix: normalize Windows cache store paths - #22
Conversation
|
Warning Review limit reached
Next review available in: 54 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe cache directory now normalizes Windows extended-length pnpm store paths. A Windows workflow configures a root-level store and verifies that pnpm reports the extended-length path format. ChangesWindows cache path handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 QodoNormalize Windows pnpm store paths before caching
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 @.github/workflows/test.yaml:
- Line 106: Update the actions/checkout@v6 step in the pull-request workflow to
set persist-credentials to false. Preserve authenticated Git operations by
supplying a narrowly scoped token only to the specific steps that require it,
rather than retaining checkout credentials globally.
🪄 Autofix
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 390a73e6-93da-4374-b7cb-e9aa3494f960
⛔ Files ignored due to path filters (1)
dist/index.jsis excluded by!**/dist/**
📒 Files selected for processing (2)
.github/workflows/test.yamlsrc/cache-restore/run.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Analyze (actions)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-05-11T16:19:49.450Z
Learnt from: zkochan
Repo: pnpm/setup PR: 1
File: src/cache-restore/run.ts:35-35
Timestamp: 2026-05-11T16:19:49.450Z
Learning: When using `actions/exec` (`getExecOutput` / `exec`), it is valid for the `commandLine` option to include both the command and its arguments in a single string (e.g., `getExecOutput('pnpm store path --silent')`). The library tokenizes `commandLine` internally (via `argStringToArray()`), so this behaves like passing an equivalent command + args array (e.g., `getExecOutput('pnpm', ['store','path','--silent'])`). In code reviews, do not flag this as incorrect—this matches documented behavior and a production-tested pattern.
Applied to files:
src/cache-restore/run.ts
🪛 zizmor (1.29.0)
.github/workflows/test.yaml
[warning] 106-106: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🔇 Additional comments (2)
src/cache-restore/run.ts (1)
42-63: LGTM!.github/workflows/test.yaml (1)
99-105: LGTM!Also applies to: 108-124
Summary
pnpm store pathbefore passing the path to@actions/cacheWhy
On Windows, pnpm can return a store path such as
\\?\D:\.pnpm-store\v11. The cache restore accepts that path, but the post-job save rejects the?as a glob in the root segment:The consumer's tests all passed, but both Windows matrix jobs failed during
Post Run pnpm/setup@v2:https://github.com/pnpm/cmd-shim/actions/runs/31169376044/job/92837467051
Validation
pnpm exec tsc --noEmitpnpm run buildSummary by CodeRabbit
Bug Fixes
Tests