# SPDX-License-Identifier: MPL-2.0 # Proof lanes: Agda, Rocq and Lean, each checked inside the pinned Guix shell # (build/channels.scm and build/manifest.scm; re-anchoring plan WO 1.4, # ruling D-8 (a)). No path filter: every commit gets a run, so a receipt can # name any commit. A missing prover fails the gate; it never skips. name: Proof Policy Gate on: pull_request: push: branches: [main] workflow_dispatch: permissions: contents: read concurrency: group: proof-lanes-${{ github.ref }} cancel-in-progress: true env: GUIX_VERSION: "1.5.0" # SHA-256 of guix-binary-1.5.0.x86_64-linux.tar.xz from ftp.gnu.org. Its # OpenPGP signature (key A28BF40C3E551372662D14F741AAE7DCCA3D8351, a Guix # maintainer) was verified when this digest was taken, 2026-11-10. GUIX_SHA256: "aa41025489c5061543e9c48873eaa829b900b2da75d40f9648913622f5f47817" # The versions the pinned channel gives. A different version fails the run: # a new version means each receipt is earned again (WO 1.4). AGDA_VERSION: "2.7.0.1" ROCQ_VERSION: "8.18.0" LEAN_VERSION: "4.29.0" JUST_VERSION: "1.56.0" JUST_SHA256: "fa2a8ec1015d9df5330941ade12437488fc40d33f9c9f8cd4eb70a26de11b639" BUN_VERSION: "1.4.4" BUN_SHA256: "bf8ccbfb2b0b80159e0f9a6d15c55317add8077534dbc6130a3edb52fccb395c" jobs: proof-lanes: name: Agda, Rocq and Lean in the pinned Guix runs-on: ubuntu-24.04 timeout-minutes: 120 steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Guix (checksum-pinned binary release) run: | set -euo pipefail cd "$RUNNER_TEMP" curl --proto '=https' --proto-redir '=https' --tlsv1.2 --fail --silent --show-error --location \ "https://ftp.gnu.org/gnu/guix/guix-binary-${GUIX_VERSION}.x86_64-linux.tar.xz" --output guix.tar.xz echo "${GUIX_SHA256} guix.tar.xz" | sha256sum --check --strict sudo tar --warning=no-timestamp -xf guix.tar.xz -C / sudo groupadd --system guixbuild for i in 1 2 3 4; do sudo useradd -g guixbuild -G guixbuild -d /var/empty -s /usr/sbin/nologin \ -c "Guix build user $i" --system "guixbuilder$i" done G=/var/guix/profiles/per-user/root/current-guix sudo sh -c "nohup $G/bin/guix-daemon --build-users-group=guixbuild > /var/log/guix-daemon.log 2>&1 &" for _ in $(seq 30); do [ -S /var/guix/daemon-socket/socket ] && break; sleep 1; done [ -S /var/guix/daemon-socket/socket ] || { sudo cat /var/log/guix-daemon.log; exit 1; } sudo "$G/bin/guix" archive --authorize < "$G/share/guix/ci.guix.gnu.org.pub" sudo "$G/bin/guix" archive --authorize < "$G/share/guix/bordeaux.guix.gnu.org.pub" echo "$G/bin" >> "$GITHUB_PATH" - name: Pinned toolchain from build/channels.scm and build/manifest.scm id: toolchain run: | set -euo pipefail guix time-machine -C build/channels.scm -- describe guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- sh -euc ' agda --version | tee /dev/stderr | grep -qF "Agda version ${AGDA_VERSION}" coqc --version | tee /dev/stderr | grep -qF "version ${ROCQ_VERSION}" lean --version | tee /dev/stderr | grep -qF "version ${LEAN_VERSION}"' - name: Agda lane (gate, then planted controls) if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} run: | guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- sh -euc ' bash scripts/check-proofs.sh agda bash tests/proofs/gate_controls_test.sh agda' - name: Rocq lane (gate, then planted controls) if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} run: | guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- sh -euc ' bash scripts/check-proofs.sh coq bash tests/proofs/gate_controls_test.sh coq' - name: Lean lane (gate, then planted controls) if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} run: | guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- sh -euc ' bash scripts/check-proofs.sh lean4 bash tests/proofs/gate_controls_test.sh lean4' # The golden path (re-anchoring plan WO 2.5): `just check` runs the view # checks (catalogue, census tests, atlas, claims registry, bridges) and the # three proof gates in one recipe, then its controls show that a stale view # and a failing proof each fail it. just and Bun come as checksum-pinned # release archives; the registry reads receipts with the pinned canon reader. - name: Install just and Bun (checksum-pinned release archives) if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} run: | set -euo pipefail b="$RUNNER_TEMP/golden-bin"; mkdir -p "$b"; cd "$RUNNER_TEMP" curl --proto '=https' --proto-redir '=https' --tlsv1.2 --fail --silent --show-error --location \ "https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz" --output just.tar.gz echo "${JUST_SHA256} just.tar.gz" | sha256sum --check --strict tar -xzf just.tar.gz -C "$b" just curl --proto '=https' --proto-redir '=https' --tlsv1.2 --fail --silent --show-error --location \ "https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" --output bun.zip echo "${BUN_SHA256} bun.zip" | sha256sum --check --strict unzip -q -j bun.zip bun-linux-x64/bun -d "$b" echo "$b" >> "$GITHUB_PATH" - name: Canon proof-receipt reader (metadatastician/standards, pinned) if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} run: | set -euo pipefail r="$RUNNER_TEMP/receipt-reader" git init -q "$r" git -C "$r" remote add origin https://github.com/metadatastician/standards.git git -C "$r" config core.sparseCheckout true printf '1-formats/deed/tools/\nscripts/check-proof-receipt.sh\nscripts/proof-inputs-sha256.sh\n' > "$r/.git/info/sparse-checkout" git -C "$r" fetch -q --depth 1 origin 940a27af1e25a73a2d55daa78d0763e6749fd935 git -C "$r" checkout -q FETCH_HEAD - name: Golden path (just check), then its controls if: ${{ !cancelled() && steps.toolchain.outcome == 'success' }} env: MATHESIS_STANDARDS: ${{ runner.temp }}/receipt-reader run: | # The receipt's git checks (PROOF-POLICY ยง8.5.3) need origin/main with its # history: the checkout is shallow. git fetch -q --no-tags --unshallow origin +refs/heads/main:refs/remotes/origin/main guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- sh -euc ' just --version bun --version just check bash tests/golden/check_controls_test.sh'