docs(AGENTS): fix reproducibility guidance (sandbox sets SOURCE_DATE_EPOCH) - #266
Conversation
…_EPOCH The sandbox already exports SOURCE_DATE_EPOCH=0 and PYTHONHASHSEED=0, and minimal-check's disallowed-patterns checker rejects re-setting them. The guidance from #259 wrongly told authors to export them (and claimed the sandbox does not pin the clock), which made the nspr repro PR fail CI. - State the sandbox provides both; do not set them in build.sh. - Replace the bad export bullet with the correct pattern (pin the specific stamp; nspr SH_DATE/SH_NOW as the example). - Fold libtool .la cleanup into the C/C++ bullet; make explicit that authors apply only the bullet for their build system. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdates the "Reproducibility (required)" section of ChangesDeterminism documentation update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Good fix — the old guidance was actively causing CI failures and confusing both humans and bots. The factual corrections and the "only apply your bullet" framing are solid improvements.\n\nLeft two minor nits on the nspr example bullet (clarity, not correctness). Neither is a blocker.
| - **A build that bakes in its own wall-clock time** despite `SOURCE_DATE_EPOCH` (version | ||
| strings, generated headers): pin that specific stamp rather than re-exporting | ||
| `SOURCE_DATE_EPOCH`. For example `nspr` overrides the make variables its version header | ||
| is generated from (`SH_DATE` from `$SOURCE_DATE_EPOCH`, `SH_NOW=` to omit the build time). |
There was a problem hiding this comment.
Nit: The other bullets show the exact flags/exports to paste into build.sh, but this one describes the strategy without a concrete snippet. A one-liner example (even pseudo-code) would make it as copy-pasteable as the rest:
# nspr example: derive SH_DATE from the sandbox-provided epoch; suppress SH_NOW
make SH_DATE="$(date -u -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %T')" SH_NOW= ...Optional — the prose is accurate as-is, but the worked example would lower the bar for new contributors.
| - **A build that bakes in its own wall-clock time** despite `SOURCE_DATE_EPOCH` (version | ||
| strings, generated headers): pin that specific stamp rather than re-exporting | ||
| `SOURCE_DATE_EPOCH`. For example `nspr` overrides the make variables its version header | ||
| is generated from (`SH_DATE` from `$SOURCE_DATE_EPOCH`, `SH_NOW=` to omit the build time). |
There was a problem hiding this comment.
Ultra-nit: `SH_NOW=` reads as if the value was accidentally omitted. Consider `SH_NOW=""` (or `SH_NOW=` (empty)) to make it visually explicit that the empty string is intentional, not a typo. Readers unfamiliar with nspr's Makefile may stumble here.
What
Corrects the Reproducibility (required) guidance added in #259, which had two factual errors and one framing issue that caused real fallout.
Why
The build sandbox already exports
SOURCE_DATE_EPOCH=0andPYTHONHASHSEED=0, andminimal-check'sbuild script disallowed-patternschecker actively rejects re-setting them in abuild.sh. But the merged guidance said the opposite:export SOURCE_DATE_EPOCH=0(andPYTHONHASHSEED=0) — which fails CI.This already bit us: the
nsprreproducibility PR followed the guidance, addedexport SOURCE_DATE_EPOCH=0, and failedminimal-check. CodeRabbit also cited the guidance to (incorrectly) request the same export on an unrelated PR.A secondary issue: the bullets read as a universal checklist, so the C/autotools items (e.g. libtool
.lacleanup) got applied to non-C packages.Changes
SOURCE_DATE_EPOCH=0/PYTHONHASHSEED=0and must not be set inbuild.sh.SOURCE_DATE_EPOCH=0" bullet with the correct pattern for builds that ignoreSOURCE_DATE_EPOCH: pin the specific stamp (withnspr'sSH_DATE/SH_NOWas the worked example)..lacleanup into the C/C++ bullet (where it belongs) and make explicit that authors apply only the bullet for their build system, not all of them.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation