Windows unit tests fail on main: pnpm-registry-overrides fixtures are checked out as CRLF (mixes CRLF and LF line endings)

Open Beginner friendly
#2,238 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@mikolalysenko is already working on this.

Since Nov 25, 2026.

  • #2239 by @mikolalysenko — open

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
git, rust
Domain
testing-qa

Research direction

Start by reading .gitattributes beside the existing pnpm-hosted/** and redirect/** -text entries, then inspect the fixture tree under crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/. The failing tests are in crates/socket-patch-core/src/formats/pnpm/registry_alias.rs and crates/socket-patch-core/src/hosted/engine.rs; reproduce through the test (windows-latest, 1) job or a Windows checkout. Done when those seven tests pass with byte-exact fixtures.

Written by the indexing model from the issue text.

Description

agent:claimed agent:triaged ci-janitor priority:p1

[agent] PR shepherd: the test (windows-latest, 1) job fails on main at e685fb145 (run 45555390805), and the same 7 tests fail on every PR that runs the Windows tests (for example #2234, job 139041204826). It turns ci-ok (windows only) red. It is separate from #2235, which is the e2e pnpm 11 test.

test formats::pnpm::named_registries::tests::the_planned_file_is_the_one_the_fixtures_were_locked_with ... FAILED
test formats::pnpm::registry_alias::tests::shapes_outside_the_fixtures_are_refused ... FAILED
test formats::pnpm::registry_alias::tests::the_overrides_section_holds_exactly_the_wanted_pins ... FAILED
test formats::pnpm::registry_alias::tests::the_routed_shape_is_what_pnpm_writes ... FAILED
test formats::pnpm::registry_alias::tests::unpinning_one_release_leaves_the_rest ... FAILED
test formats::pnpm::registry_alias::tests::unpinning_restores_the_plain_shape ... FAILED
test hosted::engine::tests::the_registry_route_writes_what_pnpm_writes ... FAILED
test result: FAILED. 8059 passed; 7 failed

panicked at crates\socket-patch-core\src\formats\pnpm\registry_alias.rs:1216:74:
a v9 lock: "mixes CRLF and LF line endings"

panicked at crates\socket-patch-core\src\hosted\engine.rs:8633:13:
assertion `left == right` failed: both-versions
  left:  Some("packages:\n  - '.'\nnamedRegistries:\n ...")
  right: Some("packages:\r\n  - '.'\r\nnamedRegistries:\r\n ...")

Cause. These tests read the tests/fixtures/pnpm-registry-overrides golden fixtures that #2167 (5d8378e) added. .gitattributes marks pnpm-hosted/** and redirect/** as -text, but not pnpm-registry-overrides/**. On a Windows checkout git converts those fixtures to CRLF. The parser then sees mixed line endings, and the byte-exact comparisons fail.

Likely fix. Add crates/socket-patch-core/tests/fixtures/pnpm-registry-overrides/** -text to .gitattributes (with a comment like the existing ones), then confirm with a Windows run of test (windows-latest, 1). The CLI itself is probably fine: a real pnpm lock on Windows has one consistent line ending.


Generated by Claude Code

Dominant language
Rust
Stars
9
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
309

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SocketDev/socket-patch

All issues in SocketDev/socket-patch

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.