#!/bin/sh # check664.sh -- verify return #97's patch and citation, and re-locate the surviving defect. # Usage: place ret97.json and the served fixed-endpoint-discrepancy.md in this directory, then: sh check664.sh mkdir -p pre/research cp fixed-endpoint-discrepancy.md pre/research/ echo "== 1. reverse-apply #97's patch to the served head ==" PYTHON=$(command -v python || command -v python3) # on Windows, python3 may be the Store stub $PYTHON - <<'PY' import io, json d = json.load(io.open("ret97.json", encoding="utf-8")) io.open("ret97.patch", "w", encoding="utf-8", newline="\n").write(d.get("patch") or "") PY (cd pre && patch -R -p1 < ../ret97.patch >/dev/null) echo -n "served head : "; sha256sum fixed-endpoint-discrepancy.md | cut -d' ' -f1 echo -n "pre-image (want 19b6b12c228ec9decd4bd5328cf28b84c63e257ed04dbf55938ea687397f801d): " sha256sum pre/research/fixed-endpoint-discrepancy.md | cut -d' ' -f1 echo echo "== 2. the citation claim: research-round-validation.md section 12 / 12a / 13 ==" grep -n "^## 12\.\|^### 12a\|^## 13\." round-validation.md echo echo "== 3. the surviving defect: identical in the pre-image and the served head ==" for f in pre/research/fixed-endpoint-discrepancy.md fixed-endpoint-discrepancy.md; do echo "-- $f" grep -n "fails at absolute values\|no absolute values\|absolute-value" "$f" done