Files
vvsandClaude Opus 5 9c1638af07 Zenodo package (open release) and the PDF rebuilt with the published history's hashes.
make_open_package.py builds the archive from HEAD - source (git archive, LF line ends), the full history (git bundle), both simbracket wheels, README, requirements, reproduce.sh, LICENSE, NOTICE, SHA256SUMS - and refuses if any commit of the branch carries a string from a private list kept outside the repository, or if a text file has CRLF line ends; cleanroom_check.sh verifies the archive on Linux. Appendix D states that the history was rewritten once before publication to remove a server address, and that Table D1 is recomputed from the published history. lib/LICENSE so the wheels carry the licence. Server: verify 548 OK / 0 BAD, regression x2 1239 passed, PDF 32 pages, 0 errors, 0 overfull.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 10:17:07 +01:00

35 lines
1.8 KiB
Bash

#!/bin/bash
# Clean-room check of the Zenodo archive on Linux: unzip into an empty directory, install only the
# simbracket wheel from the archive (dependencies from the existing environment, nothing downloaded),
# run the verifier and the equivalence test from source/, and recompute Appendix D from the bundled
# history. Usage: cleanroom_check.sh <zip>
set -e
export OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1
PY=~/torchenv/bin/python
Z=$(readlink -f "$1")
R=~/zenodo_cleanroom
rm -rf $R && mkdir -p $R && cd $R
$PY -c "import zipfile,sys; zipfile.ZipFile(sys.argv[1]).extractall('.')" "$Z"
D=$(ls -d sim-numerics-*/)
cd $R/$D
echo "== checksums"; sha256sum -c --quiet SHA256SUMS && echo "all match"
$PY -m pip install --quiet --no-deps --target $R/site wheels/simbracket-*-linux_x86_64.whl
cd source
export PYTHONPATH=$R/site:.
$PY -c "import simbracket, simroot.pure; print('simbracket', simbracket.__file__); print('reference', simroot.pure.__file__)"
echo "== verify_article.py"
$PY -u verify_article.py > $R/verify.log 2>&1 || true
echo "OK $(grep -c '^ OK' $R/verify.log) BAD $(grep -c '^ BAD' $R/verify.log)"
grep '^ BAD' $R/verify.log || true
grep -A6 '^Traceback' $R/verify.log || true
tail -1 $R/verify.log
echo "== equivalence test"
$PY -m pytest tests/test_simbracket_equivalence.py -q -p no:cacheprovider 2>&1 | tail -1
echo "== Appendix D from the bundled history"
cd $R && git clone --quiet $R/$D/sim-numerics.bundle hist && cd hist
$PY -u check_prereg_order.py | grep '^| `' > $R/appD_from_history.txt
grep '^| `' $R/$D/source/results_prereg_order.txt > $R/appD_in_archive.txt
if diff -q $R/appD_from_history.txt $R/appD_in_archive.txt; then echo "Appendix D reproduced from the history: identical"; else echo "Appendix D DIFFERS"; fi
grep -c '^| `' $R/appD_from_history.txt
echo "=== CLEANROOM DONE ==="