Repository navigation
cadical: pin build.hpp's date and host (reproducible, 2.1.3) - #757
bryan-minimal wants to merge 4 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
|
Verification update from the x86_64 lab box (48-core, native minimald): 4-build gauntlet, all byte-identical. Four forced real builds ( One honest caveat on scope. A same-host gauntlet proves the 🤖 Generated with Claude Code |
|
Follow-up: the That is the build host's hostname and kernel release in 🤖 Generated with Claude Code |
… stray minimal.toml 2.1.3's scripts/make-build-header.sh is unchanged from 2.1.2: it still puts `date` and `uname -srmn` (wall clock, hostname, kernel release) into the DATE macro in .rodata. Instead of sed-editing the upstream script, the make step gets pinned `date` (SOURCE_DATE_EPOCH, UTC) and `uname` (kernel name + machine) on PATH, and a fixed-string check fails the build if build.hpp's DATE is not the pinned value. Also reverts minimal.toml, which an earlier commit on this branch changed by mistake (repro-lab tasks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reworked for cadical 2.1.3 (now on main via #999) in d45d1b9, on a merge of main. 2.1.3's make-build-header.sh is unchanged, so both pins are still needed. They now go in through PATH shims for |
cadical2.1.3 is not byte-reproducible without this.scripts/make-build-header.shputsdateanduname -srmn(the build's wall clock plus the host's hostname and kernel release) intobuild.hpp'sDATEmacro, which lands in.rodata. That script is unchanged from 2.1.2 to 2.1.3: upstream HEAD'sSOURCE_DATE_EPOCHsupport isn't in a release yet, and HEAD still embedsuname.Its other inputs are already deterministic in our sandbox: the git id is empty (no
.gitin the tarball),COMPILERisg++ --version, andFLAGSare ourCXXFLAGS.The fix (
build.shonly): instead of editing the upstream script, themakestep gets pinned commands onPATH:date→date -u -d @$SOURCE_DATE_EPOCH(the sandbox's epoch, per AGENTS.md)uname→ kernel name and machine only, with no hostname and no kernel releaseA fixed-string check then fails the build if
build.hpp'sDATEis not the pinned value, so a future upstream script that stops readingdate/unamefromPATHcan't silently reintroduce host data. The result isDATE "Thu Jan 1 12:00:00 AM UTC 1970 Linux aarch64".cadical --versionreports that pinned string, which is the intended trade.This also reverts
minimal.toml, which an earlier commit on this branch changed by mistake (repro-lab tasks).Verified in remote sessions, aarch64, a fresh
activateper build,--rebuild --verbose, each a real build with 87 compiler invocations. A temporary, uncommitted probe printed output hashes into the build log:usr/bin/cadicalsha256build.hppDATEdc05982c40847e87a2cf86852c408dfc5f1ec06c6f772368cb729d678ec9d4a5Thu Jan 1 12:00:00 AM UTC 1970 Linux aarch64dc05982c40847e87a2cf86852c408dfc5f1ec06c6f772368cb729d678ec9d4a5f0467e6db7400f2ca36f50526956bfdf687ff3e9bda46e38cf9ac471e4f95ffbFri Oct 23 07:47:43 PM UTC 2026 Linux (none) 6.12.111 aarch64f46e68f2525d513c24e1123647c0087b6a247973d72881f73bdae5bdf47e76c0Fri Oct 23 07:49:02 PM UTC 2026 Linux (none) 6.12.111 aarch64min check --packages cadicalpasses every check, standalone tests included, with no Skip.nickel format --check,bash -nandmip dump(amd64 + arm64) are clean.Not covered: a cross-host comparison on the same arch. With the hostname and kernel release removed and the date pinned, the remaining header inputs don't depend on the host, so it should hold, but only same-host double builds ran here.
Relates to gominimal/inbox#253.
🤖 Generated with Claude Code