A committed pantry.lock cannot survive pantry install on a second platform, which makes it unusable as a checked-in lockfile for any repository that builds on more than one.
Reproduced in stacksjs/stacks, pantry 0.11.55 on ubuntu-latest against a lock generated by 0.11.48 on macOS arm64. CI installs and then asks git whether the file moved: 144 additions, 1,278 deletions.
Added on Linux
Native toolchain records that platform needs and macOS does not:
gnu.org/gcc/libstdcxx gnu.org/binutils gnu.org/gmp
gnu.org/mpfr gnu.org/mpc gnu.org/gettext
gnu.org/libiconv gnome.org/libxml2 tukaani.org/xzThis half is at least explicable - the platforms genuinely need different system packages. It still means one committed file cannot describe both, so it needs a representation (platform-conditional sections, or per-platform lock files) rather than a fix.
Removed on Linux, which is the part that looks wrong
About 80 records of the shape
"@stacksjs/<package>@0.74.32": {
"name": "@stacksjs/<package>",
"version": "0.74.32",
"source": "npm",
...
}These are npm workspace packages. They are not platform-specific, they resolve identically on both, and the macOS install records them while the Linux one drops them. A differing native record set is a platform requirement; a differing npm record set reads as non-deterministic set membership.
Line counts by shape among the removals:
248 "<name>": "<spec>:*", (dependency edges)
91 "<name>": { ... } (record openings)
91 "url": "https:..."
80 "version": "0.74.32",
80 "source": "npm",
77 "integrity": "...=="
54 "<name>": "^0.74.32",Why it matters beyond one repository
Any project that commits pantry.lock and runs CI on a different OS than its developers gets a permanently dirty working tree in CI. It cannot be told apart from real drift, so the usual response is to stop checking - which is how a lock silently goes stale. In this case it had: the same file was carrying workspace records a full release behind, and nobody could see it under the platform noise. That is stacksjs/stacks#2533.
What would resolve it
pantry installproduces byte-identicalpantry.lockon macOS and Linux for the same inputs, or- the format records platform-conditional sections explicitly, so one committed file describes every platform and an install on any of them is a no-op.
Either way the npm-record asymmetry wants explaining first, since it is the half that has no platform justification.