A real local dependency control exposes malformed package metadata in both Home and the pinned Bun executable (4982b91). This shared failure is not accepted as passing logical parity.
Reproduction: create two local folders with the same package name and versions 1.0.0 and 2.0.0. The project initially depends on file:../dependency-one. Run --only-missing install, then --only-missing install -- file:../dependency-two, then add an unrelated local dev dependency, then --silent remove leading-flag-dependency. The second install exits zero but writes duplicate leading-flag-dependency keys with both folder paths into package.json and bun.lock. Remove subsequently exits one with Duplicate package path.
Home source: 9e1656f7c3cd4b76200819e88a630f09b028e5c7; executable SHA-256 5e7a26d1b366fad80626c7ff19052d119cb19235b84f15a8f85378e49bb4f3ed. Bun control SHA-256 47a87c1dea30da59c2733cce80118ea59bd338c616c6378f1c7f55e5f2b92c87. The original logs and fixtures were under zig-out/bun-port-709/leading-flags-verification/, but were lost when that worktree disappeared on September 8. Committed summaries and the recorded hashes survived. A fresh native reproduction on source 6053c6c again captures the duplicate keys directly in local-identity-before.log; see the current checkpoint comments and retained evidence.
The original private control checked parsed JSON, which collapses duplicate keys; its earlier ok fields are insufficient evidence of metadata integrity. The raw artifacts and final failing remove are authoritative.
Investigate identity resolution in PackageManager/PackageJSONEditor.zig: non-aliased local requests use the literal path through getName() before resolution, while new keys use getResolvedName(). Fix the actual edit/install lifecycle so an existing package is preserved by --only-missing, with no duplicate keys or inconsistent lockfile. Add a regression that rejects duplicate JSON keys and verifies a subsequent install/remove succeeds. No deleting lockfiles, bypassing validation, source rewriting, or retry-based acceptance.