Repository navigation
Conversation
This was referenced Oct 4, 2026
check:pi-dependencies and check:pi-patches detected pnpm's patched instance by matching the literal `patch_hash=` segment in realpath output. Windows shortens `.pnpm` store directory names (long-path limit), so the segment disappears and both checks misreport a healthy install (vastsa#1361). The patch hash is now proven through the lockfiles: the root pnpm-lock.yaml patchedDependencies entry declares the 64-hex hash and the virtual-store lockfile must embed it in the installed snapshot's `version: <v>(patch_hash=...)` line, which survives the shortened directories. The installed manifest is still version-checked directly. The native fork fixture compared `foreignPath.split("/").at(-1)` with readdirSync output; on Windows the split never breaks the path, so the assertion compared an absolute path against a file name. Use path.basename instead. Validated: the fork test now passes on Windows (it failed on pristine main); the two-stage hash chain verified against this machine's 0.99.1 lockfiles (declared hash resolves, stale virtual store correctly fails the embed check).
yexisu
force-pushed
the
fix/windows-dev-env-checks
branch
from
October 4, 2026 03:17
a70812f to
a7e393b
Compare
Contributor
Author
|
Rebased onto current |
Owner
|
Thanks for contributing the Windows portability fixes. The issue is real, and #1363 now covers both the patch-check and path-test failures with a seven-case shortened-store regression suite; its CI passed and it has merged. Closing this duplicate as superseded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two Windows-only dev-environment failures from #1361 (Linux CI unaffected):
check:pi-dependencies/check:pi-patchesdetect pnpm's patched instance by matching the literalpatch_hash=segment inrealpathSyncoutput. Windows shortens.pnpmstore directory names (long-path limit), the segment disappears, and both checks misreport a healthy install.native-pi-session.test.ts"never deletes a foreign publication" comparedforeignPath.split("/").at(-1)withreaddirSyncoutput; on Windows the split never breaks the path, so an absolute path was compared against a bare file name.Fix
pnpm-lock.yamlpatchedDependenciesentry declares the 64-hex hash forname@version, andnode_modules/.pnpm/lock.yamlmust embed that hash in the installed snapshot'sversion: <v>(patch_hash=...)line. This survives Windows's shortened directories, is stricter than the old substring match, and is unchanged on Linux. The installed manifest is still version-checked directly via realpath.foreignPath.split("/").at(-1)!replaced withbasename(foreignPath).Validation
native-pi-session.test.tstargeted run 1/1pnpm-lock.yaml, and the stale 0.99.1 virtual-store snapshot correctly fails the embed check (proving the check is strict)check:pi-*end-to-end run requires a 1.0.1 install this machine does not have yet; logic verified as above, CI covers the restFixes #1361