Skip to content

Make Python release wheels reproducible - #69

Merged
bordumb merged 1 commit into
mainfrom
codex/reproducible-python-wheel
Aug 3, 2026
Merged

Make Python release wheels reproducible#69
bordumb merged 1 commit into
mainfrom
codex/reproducible-python-wheel

Conversation

@bordumb

@bordumb bordumb commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Derive Maturin's SOURCE_DATE_EPOCH from the exact Git commit timestamp.
  • Build the maintained Python wheel twice during normal bindings/compliance CI and require byte-identical SHA-256 digests before install testing.
  • Fail closed when the commit timestamp is missing, malformed, or outside the ZIP timestamp domain.
  • Advance and regenerate the frozen release-control identity.
  • Document the deterministic wheel contract and the authoritative cross-runner comparison.

Root cause

Release preparation run #5 completed both isolated builders, then rejected the candidate because the Python wheel differed between them.

Maturin uses SOURCE_DATE_EPOCH for wheel metadata timestamps. Auths did not set it, so separate runners packaged the same source with different ZIP timestamps. The release comparator correctly treated that as a terminal platform-reproducible mismatch.

Evidence

  • Two wheel builds from final commit 807daa398c8e9353784855322eca28e7b49d49ed, using its commit-derived epoch, produced the same SHA-256:
    • d4b9c709389e0a545b48b29ccca5cf9c683293d385cfa83899d8d637c944652a
    • d4b9c709389e0a545b48b29ccca5cf9c683293d385cfa83899d8d637c944652a
  • All 43 xtask unit tests passed.
  • Semantic freeze passed with 42 entries and 28 public Rust packages.
  • Formatting and diff whitespace checks passed.
  • The broader local bindings command passed Rust, WASM, and TypeScript checks, but this Mac's global npm cache stopped npm pack before Python with a pre-existing root-owned cache-file error. The two Python wheel builds were therefore run directly and passed byte comparison.

Affected claims

  • Same-platform Python wheels for one exact commit are byte reproducible.
  • Normal premerge bindings/compliance CI rejects wheel nondeterminism before release preparation.
  • The isolated release comparison remains authoritative across hosted runners.

Exclusions and remaining gates

  • No tag, prerelease, registry package, or release artifact is published.
  • The failed candidate preparation remains rejected and must not be promoted.
  • Pull-request CI must pass, then a new preparation must run against the new merged-main commit.

Signed-off-by: bordumb <bordumbb@gmail.com>
Auths-Id: did:keri:EMN-WRXNAkLfavKsaFHS0ehP7eB1s8a1alktBJoDhI7b
Auths-Device: did:keri:EAswoxxXY6-kXqYcc3mUngY8GOiwhDwXxFfjWXzCvuW6
Auths-Anchor-Seq: 1
@bordumb
bordumb merged commit a6e7f99 into main Aug 3, 2026
17 checks passed
@bordumb
bordumb deleted the codex/reproducible-python-wheel branch August 3, 2026 19:42
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