Skip to content

fix: root-cause the macOS reproducibility false-MISMATCH (TMPDIR symlink aliasing) - #87

Merged
systemslibrarian merged 1 commit into
mainfrom
fix/repro-macos-symlink
Sep 5, 2026
Merged

systemslibrarian merged 1 commit into
mainfrom
fix/repro-macos-symlink

Conversation

@systemslibrarian

Copy link
Copy Markdown
Owner

The last open investigation, closed — and the answer upgrades a public assurance claim.

The experiment

Same clone, same SDK 10.0.400, clean obj: cwd inside the clone → byte-identical with nuget.org; the script's invocation → mismatch of exactly 476 bytes, all in PE timestamp/MVID/debug-stamp regions (hash-derived; code identical). Diffing the real csc arguments found it:

  • cwd=clone: /pathmap:"…,/private/var/folders/…/src/=/_/"
  • script: /pathmap:"…,/var/folders/…/src/=/_/"

macOS's /var → /private/var symlink: mktemp -d hands back the aliased spelling, SourceLink computes the source root from it, the compiler enumerates sources under the canonical path, the /_/ map never applies, and absolute paths leak into the deterministic input hash. A byte-perfect package was reported MISMATCH. The earlier external macOS report had the same cause.

The fix

One line: canonicalize the work dir (pwd -P).

The upgraded claim

Core and Hybrid v1.7.1 now verify MATCH on macOS arm64 — the published packages are proven byte-identical across Linux x64 (release CI), Linux arm64 (container), and macOS arm64. REPRODUCIBLE-BUILDS.md replaces the retracted cross-OS claim with the proven one plus verify-from-a-physical-path guidance.

Also corrected: AUDIT-SCOPE.md had pinned the v1.7.1 annotated-tag object hash as the commit; now names the real commit f062c10.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Sym7RJ7ehNhbMXytE5rMmS

…ink aliasing)

Controlled experiment: same clone, same SDK 10.0.400, clean obj — packing with
cwd inside the clone matched the published DLL byte-for-byte; the script's
invocation mismatched by exactly 476 bytes, all in the PE timestamp / MVID /
debug-stamp regions (hash-derived, code identical). Diffing the real csc args
exposed the cause: on macOS, mktemp -d returns /var/folders/... whose /var is
a symlink to /private/var. Built through the unresolved spelling, SourceLink's
computed source root (/var/...) disagreed with the compiler's canonical source
paths (/private/var/...), so the /_/ path map never applied, absolute paths
leaked into the deterministic input hash, and a byte-perfect package was
reported MISMATCH. The earlier external macOS-reproducibility report had the
same cause.

Fix: canonicalize the work dir (pwd -P). Verified: core AND Hybrid v1.7.1 now
verify MATCH on macOS arm64 — so the published packages are proven
byte-identical across Linux x64 (release CI), Linux arm64, and macOS arm64,
and REPRODUCIBLE-BUILDS.md replaces the retracted cross-OS claim with the
proven one plus the verify-from-a-physical-path guidance.

Also corrected: AUDIT-SCOPE.md pinned the v1.7.1 annotated-tag OBJECT hash
(e0d332a) as the commit; the actual commit is f062c10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sym7RJ7ehNhbMXytE5rMmS
@systemslibrarian
systemslibrarian merged commit fd0f2f5 into main Sep 5, 2026
@systemslibrarian
systemslibrarian deleted the fix/repro-macos-symlink branch September 5, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant