Repository navigation
docs(changeset): say that a forced install repairs the store too - #15192
Conversation
The note claimed files are restored "when the store content is intact". A repeat forced install refetches the package when the edit reached the store, so the qualifier described a limit that is not there. Cover that case: append through the hardlink, which mutates the store's copy, and assert that the forced install restores the bytes and leaves `pnpm store status` clean. The edit's mtime is moved past the store's 100ms verification skip window, which a same-millisecond edit falls into. Related to #919. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthrough
ChangesForce install repair
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested labels: ✨ Finishing Touches🧪 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 QodoClarify forced install store repair behavior
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
The house style gives each observable behavior its own sentence rather than joining two with a comma. Related to #919. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Two findings from the last round, one taken and one declined. Taken: the compound sentence. Fixed in 166ee31. I checked the precedents Qodo cited and they do settle it: #15121, #15120 and #14932 all use short separate sentences with no comma-joined behaviors, and #14932 runs to five of them. So entry length was never the problem, the join was. The sentence is now two:
Declined: "the regression test omits Windows hardlink coverage." The test is not platform-gated. It runs on Windows CI and passed on all three Windows shards of the previous head. Nothing in it is POSIX-specific: The nearby Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit 166ee31 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…m#15192) The note claimed files are restored "when the store content is intact". A repeat forced install refetches the package when the edit reached the store, so the qualifier described a limit that is not there. Cover that case: append through the hardlink, which mutates the store's copy, and assert that the forced install restores the bytes and leaves `pnpm store status` clean. The edit's mtime is moved past the store's 100ms verification skip window, which a same-millisecond edit falls into. Related to pnpm#919.
Summary
Related to #919. Follow-up to #15162, whose changeset is still pending release.
That changeset said files changed in
node_modulesare restored "when the store content is intact". The qualifier is wrong. A repeatpnpm install --forcerefetches the package when the edit also reached the store, so the store copy is repaired too andpnpm store statuscomes back clean. The limit the note described is not there.The claim came from a probe that appended to the file within the store's 100ms verification skip window (
checkPkgFilesIntegrity.ts:391, andcheck_pkg_files_integrity.rs:588on the v12 side). Inside that window the store treats the file as unverified-but-unchanged, so nothing is refetched. Outside it, which is every real edit, the refetch happens.This PR corrects the sentence and covers the case it describes: append through the hardlink so the store's copy is mutated too, move the mtime past the skip window, and assert that the forced install restores the original bytes and leaves
pnpm store statusat exit 0.pnpm v12 already behaves this way; I confirmed it against a built v12 binary, including that only the modified package is refetched. No v12 change is needed.
Validation
Sabotage-verified: with the
!opts.forceguard from #15162 removed from the bundled CLI, the new test fails on the tampered bytes; with it, it passes. 46 of 46 tests inpnpm11/pnpm/test/install/misc.tspass locally. No production code changes, so nothing else was run locally.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
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 (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpm install --forcenow reinstalls dependencies even when the manifest and lockfile are unchanged.node_modulesare restored, including cases where changes also affected the package store.Documentation
--forcebehavior and the existing conflict with--frozen-storeon repeat installs.