Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
249 changes: 249 additions & 0 deletions .github/workflows/publish-preprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
name: publish-priority-preprint

on:
workflow_run:
workflows: [verify-priority-package]
types: [completed]

permissions:
contents: write
actions: read

concurrency:
group: publish-priority-preprint
cancel-in-progress: false

jobs:
publish:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.head_repository.full_name == github.repository
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Check out the exact verified main commit
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.workflow_run.head_sha }}
persist-credentials: true

- name: Validate evidence, create tag, and publish prerelease
env:
GH_TOKEN: ${{ github.token }}
VERIFIED_SHA: ${{ github.event.workflow_run.head_sha }}
SOURCE_RUN_ID: ${{ github.event.workflow_run.id }}
run: |
set -euo pipefail

readonly version="$(tr -d '\r\n' < VERSION)"
if [[ "${version}" != "0.1.0-preprint" ]]; then
echo "unexpected release version: ${version}" >&2
exit 1
fi

readonly tag="v${version}"
readonly short="${VERIFIED_SHA:0:12}"
readonly artifact="erdos36-priority-package-${VERIFIED_SHA}"
readonly archive="erdos36-${version}-${short}.zip"
readonly checksum="${archive}.sha256"
readonly pdf="erdos36-preprint-${version}.pdf"
readonly archive_root="erdos36-${version}-${short}"
readonly source_tree="$(git rev-parse 'HEAD^{tree}')"
readonly expected_run_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}"
readonly assets_dir="${RUNNER_TEMP}/preprint-assets"
readonly actual_files="${RUNNER_TEMP}/actual-files.txt"
readonly expected_files="${RUNNER_TEMP}/expected-files.txt"
mkdir -p "${assets_dir}"

source_conclusion="$(
gh api "/repos/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}" \
--jq .conclusion
)"
source_sha="$(
gh api "/repos/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}" \
--jq .head_sha
)"
source_event="$(
gh api "/repos/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}" \
--jq .event
)"
source_branch="$(
gh api "/repos/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}" \
--jq .head_branch
)"
source_repository="$(
gh api "/repos/${GITHUB_REPOSITORY}/actions/runs/${SOURCE_RUN_ID}" \
--jq .head_repository.full_name
)"
if [[ "${source_conclusion}" != "success" || \
"${source_sha}" != "${VERIFIED_SHA}" || \
"${source_event}" != "push" || \
"${source_branch}" != "main" || \
"${source_repository}" != "${GITHUB_REPOSITORY}" ]]; then
echo "source verification run is not a successful run for this main commit" >&2
exit 1
fi

current_main_sha="$(
gh api "/repos/${GITHUB_REPOSITORY}/git/ref/heads/main" \
--jq .object.sha
)"
if [[ "${current_main_sha}" != "${VERIFIED_SHA}" ]]; then
echo "refusing to publish a stale main verification run" >&2
exit 1
fi

gh run download "${SOURCE_RUN_ID}" --repo "${GITHUB_REPOSITORY}" \
--name "${artifact}" --dir "${assets_dir}"

find "${assets_dir}" -maxdepth 1 -type f -printf '%f\n' | sort > "${actual_files}"
printf '%s\n' \
central_verification.128.json \
central_verification.128.log \
central_verification.128.rc \
central_verification.json \
central_verification.log \
central_verification.rc \
composite_verification.json \
"${archive}" \
"${checksum}" \
"${pdf}" \
outer_verification.json | sort > "${expected_files}"
diff -u "${expected_files}" "${actual_files}"

(
cd "${assets_dir}"
sha256sum -c "${checksum}"
unzip -tq "${archive}"
grep -Fqx '0' central_verification.rc
grep -Fqx '0' central_verification.128.rc
)
python3 scripts/verify_release.py "${assets_dir}/${archive}"

internal_pdf_sha="$(
unzip -p "${assets_dir}/${archive}" \
"${archive_root}/preprint.pdf" | sha256sum | awk '{print $1}'
)"
external_pdf_sha="$(sha256sum "${assets_dir}/${pdf}" | awk '{print $1}')"
if [[ "${internal_pdf_sha}" != "${external_pdf_sha}" ]]; then
echo "external PDF differs from the PDF inside the verified archive" >&2
exit 1
fi

jq -e --arg sha "${VERIFIED_SHA}" --arg tree "${source_tree}" \
'.status == "PASS" and .source_commit == $sha and
.source_tree == $tree and .source_dirty == false and
.precision_bits == 96' \
"${assets_dir}/central_verification.json" >/dev/null
jq -e --arg sha "${VERIFIED_SHA}" --arg tree "${source_tree}" \
'.status == "PASS" and .source_commit == $sha and
.source_tree == $tree and .source_dirty == false and
.precision_bits == 128' \
"${assets_dir}/central_verification.128.json" >/dev/null
jq -e --arg sha "${VERIFIED_SHA}" --arg tree "${source_tree}" \
'.status == "PASS" and .source_commit == $sha and
.source_tree == $tree and .source_dirty == false' \
"${assets_dir}/composite_verification.json" >/dev/null
jq -e '.status == "PASS"' \
"${assets_dir}/outer_verification.json" >/dev/null

unzip -p "${assets_dir}/${archive}" \
"${archive_root}/COMMIT_SHA.txt" | grep -Fqx "${VERIFIED_SHA}"
unzip -p "${assets_dir}/${archive}" \
"${archive_root}/PROVENANCE.json" | \
jq -e \
--arg sha "${VERIFIED_SHA}" \
--arg tree "${source_tree}" \
--arg run_url "${expected_run_url}" \
'.commit == $sha and .tree == $tree and
.ci_run_url == $run_url and
.status == "preliminary-unrefereed-not-lean-verified"' >/dev/null

remote_tag_sha="$(
git ls-remote --tags origin "refs/tags/${tag}^{}" |
awk 'NR == 1 {print $1}'
)"
if [[ -z "${remote_tag_sha}" ]]; then
remote_tag_sha="$(
git ls-remote --tags origin "refs/tags/${tag}" |
awk 'NR == 1 {print $1}'
)"
fi
if gh release view "${tag}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then
if [[ -z "${remote_tag_sha}" ]]; then
echo "release ${tag} exists but its tag is missing" >&2
exit 1
fi
release_json="$(
gh release view "${tag}" --repo "${GITHUB_REPOSITORY}" \
--json isDraft,isPrerelease,name,body,assets
)"
jq -e \
--arg title "${tag} — preliminary Parseval-prefix bound for Erdős Problem 36" \
'.isDraft == false and .isPrerelease == true and .name == $title' \
<<<"${release_json}" >/dev/null
grep -Fq "${remote_tag_sha}" <<<"$(jq -r .body <<<"${release_json}")"
expected_assets="$(
printf '%s\n' \
"GITHUB_RELEASE_SHA256SUMS.txt" \
"erdos36-${version}-${remote_tag_sha:0:12}.zip" \
"erdos36-${version}-${remote_tag_sha:0:12}.zip.sha256" \
"${pdf}" | sort
)"
actual_assets="$(jq -r '.assets[].name' <<<"${release_json}" | sort)"
if [[ "${actual_assets}" != "${expected_assets}" ]]; then
echo "existing release has an incomplete or unexpected asset set" >&2
exit 1
fi
echo "verified prerelease ${tag} already exists at ${remote_tag_sha}"
exit 0
fi

if [[ -n "${remote_tag_sha}" && "${remote_tag_sha}" != "${VERIFIED_SHA}" ]]; then
echo "refusing to move existing unpublished tag ${tag}: ${remote_tag_sha}" >&2
exit 1
fi

if [[ -z "${remote_tag_sha}" ]]; then
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git tag -a "${tag}" "${VERIFIED_SHA}" \
-m "Erdos 36 preliminary unrefereed preprint ${version}"
git push origin "refs/tags/${tag}"
fi

readonly release_manifest="${assets_dir}/GITHUB_RELEASE_SHA256SUMS.txt"
(
cd "${assets_dir}"
sha256sum "${archive}" "${checksum}" "${pdf}" > \
"$(basename "${release_manifest}")"
)
readonly archive_sha="$(sha256sum "${assets_dir}/${archive}" | awk '{print $1}')"
readonly pdf_sha="$(sha256sum "${assets_dir}/${pdf}" | awk '{print $1}')"
readonly notes="${RUNNER_TEMP}/RELEASE_NOTES.md"
sed \
-e "s/@VERIFIED_SHA@/${VERIFIED_SHA}/g" \
-e "s/@SOURCE_TREE@/${source_tree}/g" \
-e "s/@SOURCE_RUN_ID@/${SOURCE_RUN_ID}/g" \
-e "s/@ARCHIVE_NAME@/${archive}/g" \
-e "s/@ARCHIVE_SHA256@/${archive_sha}/g" \
-e "s/@PDF_NAME@/${pdf}/g" \
-e "s/@PDF_SHA256@/${pdf_sha}/g" \
release/RELEASE_NOTES.template.md > "${notes}"
if grep -q '@[A-Z0-9_]*@' "${notes}"; then
echo "unexpanded release-note token" >&2
exit 1
fi

gh release create "${tag}" \
"${assets_dir}/${archive}" \
"${assets_dir}/${checksum}" \
"${assets_dir}/${pdf}" \
"${release_manifest}" \
--repo "${GITHUB_REPOSITORY}" \
--verify-tag \
--prerelease \
--title "${tag} — preliminary Parseval-prefix bound for Erdős Problem 36" \
--notes-file "${notes}"
4 changes: 3 additions & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"title": "A Parseval-Prefix Improvement for Erdős' Minimum-Overlap Problem",
"version": "0.1.0-preprint",
"upload_type": "publication",
"publication_type": "preprint",
"publication_date": "2026-08-16",
"description": "Preliminary and unrefereed computer-assisted certificate supporting the proposed composite lower bound c_E > 0.3805603. The new central two-bin computation is checked with directed-rounding MPFR; the remaining 170 bins use SHA-256-pinned reports from Price's upstream Arb computation. This is not a solution of Erdős Problem 36, has not been independently reproduced, and is not Lean-verified.",
"notes": "Created automatically from the GitHub prerelease. This Zenodo record contains the tagged source snapshot; the compiled PDF, deterministic release bundle, checksums, and generated verification evidence are GitHub Release assets. Original repository material outside paper/ is MIT-licensed, while original manuscript material under paper/ is CC BY 4.0; see LICENSE_SCOPE.md.",
"creators": [
{
"name": "Khanukov, Dmitry"
Expand All @@ -16,7 +18,7 @@
"computer-assisted proof",
"interval arithmetic"
],
"license": "cc-by-4.0",
"license": "other-open",
"access_right": "open",
"related_identifiers": [
{
Expand Down
6 changes: 4 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ abstract: >-
C/MPFR verifier; 170 outer bins rely on SHA-256-pinned upstream Arb reports.
No claim is Lean-verified or independently reproduced.
preferred-citation:
type: generic
type: unpublished
title: "A Parseval-Prefix Improvement for Erdős' Minimum-Overlap Problem"
authors:
- family-names: Khanukov
given-names: Dmitry
year: 2026
notes: "Preliminary, unrefereed preprint; no DOI has been assigned."
version: "0.1.0-preprint"
status: preprint
notes: "Preliminary, unrefereed preprint."
12 changes: 7 additions & 5 deletions SHA256SUMS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
1c3010f076bb83f37a1b7cf94e6424daf7226062e0cc69ed980346261e0688d4 .gitattributes
89e7f779678eb78849a92e752242b996ced3ab0a537694e8322957bac957d2f6 .github/ISSUE_TEMPLATE/independent-reproduction.md
ef04439a1d30c1422e756c4f820befa321c3f3d1d66530ff40019a5320a86dd9 .github/pull_request_template.md
ef3156d92463a6ba38ebe7acb3db40083fecbb3ddbb9d302f111e692b3a0481f .github/workflows/publish-preprint.yml
2e5675046d9e21f42e84d7d991fb0dc607662d8dd419cdffb09ef59f8628c48f .github/workflows/verify.yml
2f91657e175c2389151601d71825a567051ef664531e5e9c9ea1cac1c5f68243 .gitignore
85906581af7977ee33acca9b1e821ab6879d596548ef5ca61c396aeaa7332b0b .zenodo.json
7d145e4516473c32f854a610c60114afa051321e9d3f491932f4a150934a984a .zenodo.json
6726183b795f656f4830a82792f331f7f8c386d76bb3f9f3e7d157ec6cce633f AUTHORS_AND_CREDIT.md
09ff9963d723d5765783dbadd832377b84a77891b8ee4f692372e74d925f605e CHANGELOG.md
b22ccfed74cb9777df8b94556dead36561ed7f305eb1600b8b8c470dce54bfff CITATION.cff
3c4b4ea2d7af3730a137fb942ffe67435672c3e4e722097d71387bf1b93fbef1 CITATION.cff
28561b48a552673314d3462c762125aa4bfa01518e12d83755c70d0de4904d12 CONTRIBUTING.md
d6e596a9f71dcbf0a61bbdd3c42dd52898a5ca75e331c2e41ca3a3abff23a800 Dockerfile
d7e109421301c414b17d92b50b572a3c53db5fe3909edbb62c29724fcca6b82a LICENSE
Expand All @@ -24,21 +25,22 @@ d285f074bc425453e186def756e201ed170171a0c61cd1bd95d6e3c1258e7ee2 certificate/RE
ae5c4815202d4d66b582207086bce249bd10ab4974cb84528ee8293f18f9fa0e docs/ERDOS_PROBLEMS_SUBMISSION.md
7262d16bc8299678d71f742e7abaa4b4c73656c1f8617706bf1c053be27c7922 docs/FORMALIZATION_STATUS.md
5fc62309bd2eac1d672ae701c42037037e014340a613885752a8e24c1f02ac29 docs/INDEPENDENT_REVIEW.md
511d82625d4aba22d1e6fde6a202e7a03812a547d5deb584529e666ae99aebee docs/PREPRINT_RELEASE.md
ffd90a80025746bceecbff97307aaa012b72ec2906e83e7ec8fffbc43528f2b3 docs/PREPRINT_RELEASE.md
e7a2d47bf8468c61fd02d5fb99cb2f92a9eb4d63fd89078751e8348f541eca53 docs/PRIORITY_AND_ACCEPTANCE.md
b33fd50765236ef5d180f7baf641de68c469b6d38cea05b6390ffb761d628c1d docs/REPRODUCIBILITY.md
9bf5d17d718cd2fbb20da19f72396a680cd29f846c82c4637f59200930bba73b docs/TRUST_BOUNDARY.md
92b380521ab4331e0cc3f53ea6f74e96f01e6e1d0773300e3ea5e8fe856c02f6 paper/LICENSE
f7328b1816952f0e7aa7489e177cd944ede3f170868a3a599f51660863fcd533 paper/LICENSE
36bbca2f5820451aee6321d0bd1be9fe58401219a18a28962959980182c4a3a8 paper/README.md
51b216dd11fdbabf10153271b0bfdeebc197437f6fd6bf0e84971cd80d53ee49 paper/author-config.tex
ace97e511d2844103b3eb99414e42cdbe5aa8d1afcb63d49fc9514c091994f0b paper/computational_record.txt
58ff13a8815fdf90dfd636c8795c0e2f778cf3b41d4412bc1271cd48ebb6753a paper/main.tex
c86502f0e1eca0c6aae6fd9d4054fce994468777c9a20fb4ddcf49b13ff285d7 paper/references.bib
e01a1421e605b0ae923dca03f9b6d14e0bc2c9f366852d1da06057c3ef460549 paper/references.tex
8ab8b33e9d7a1ae7abed0dee43e7766fefdc357aec93a9933ea559265a30f5e6 release/RELEASE_NOTES.template.md
7949c8209c8534ca13a4a3d974d928ad1922403bb9a243d1f4a4610dc2f0fde1 scripts/build_arxiv.py
b41d5b2ffd17d65f4d53b9f2d4b58255f35d4fc70ebc464243d27d681fbddd69 scripts/build_paper.sh
4462bb7500841ffa6256a38db812cbdeab60b07fba8225715d26c09b42bc72f8 scripts/build_release.py
0cb1c34f3791feb35de1d9b9de0b479e16d8bda5f3daf038023b2d9255942d6b scripts/check_repo.py
2d8dccbd0d8687c9262d6b383bd00f6d9f29e47c4ce417144cf0da00eaa3ca91 scripts/check_repo.py
2c54615afe0a3c80e68cc14fd3eb7a505640acdb2d73913ecfa43f48e839e1db scripts/parse_central_log.py
4ef859f8cf7c15d993e4e75b4ab7622d021a48dd69621b2ea860190de9db189d scripts/update_checksums.py
fcd3416b6de6e8c6ba6d672d3c196e9df802c93e9f9769739e9a87137ae1ec43 scripts/verify_all.sh
Expand Down
Loading