fix: close foundational shell and proof-integrity gaps (#193) #313
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: MPL-2.0 | |
| name: ECHIDNA Validation | |
| on: | |
| push: | |
| paths: | |
| - 'proofs/**' | |
| - 'impl/rust-cli/src/**' | |
| - 'impl/rust-cli/tests/**' | |
| - 'scripts/validate-with-echidna.sh' | |
| - '.github/workflows/echidna-validation.yml' | |
| pull_request: | |
| paths: | |
| - 'proofs/**' | |
| - 'impl/rust-cli/**' | |
| schedule: | |
| - cron: '0 6 * * 1' # Weekly on Monday at 06:00 UTC | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| contents: read | |
| jobs: | |
| echidna-verify: | |
| name: ECHIDNA Proof Verification | |
| # Keep this integration check out of required PR CI until ECHIDNA verify | |
| # supports project roots for Lean, Coq, and Agda. The pinned revision makes | |
| # scheduled results reproducible while that upstream contract is repaired. | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.2 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@9f151aca7c3990bab7afe2d82ac58088d3b01074 # v2 | |
| with: | |
| workspaces: impl/rust-cli | |
| - name: Build ECHIDNA from source | |
| env: | |
| ECHIDNA_REF: e1347cd3552ac6ec7c404da3d941baee3bb51817 | |
| run: | | |
| git init /tmp/echidna | |
| cd /tmp/echidna | |
| git remote add origin https://github.com/hyperpolymath/echidna.git | |
| git fetch --depth 1 origin "$ECHIDNA_REF" | |
| git checkout --detach FETCH_HEAD | |
| test "$(git rev-parse HEAD)" = "$ECHIDNA_REF" | |
| cargo build --release --bin echidna | |
| echo "/tmp/echidna/target/release" >> "$GITHUB_PATH" | |
| - name: Install proof provers | |
| # Ubuntu 24.04 (noble) packages neither `lean` nor `isabelle`, and | |
| # apt-get exits 100 on any unknown package. Lean 4 comes via elan | |
| # (pinned + checksum-verified, same as lean-verification.yml). | |
| # Isabelle stays uninstalled; validate-with-echidna.sh reports SKIP | |
| # for absent provers rather than failing. | |
| run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends coq agda z3 | |
| curl -sSfL https://raw.githubusercontent.com/leanprover/elan/v3.1.1/elan-init.sh -o elan-init.sh | |
| echo "f5d473c923c093759ae3839073bec2a58e82cb8bc0e4083930e76090da75b310 elan-init.sh" | sha256sum -c - | |
| sh elan-init.sh -y | |
| rm -f elan-init.sh | |
| echo "$HOME/.elan/bin" >> "$GITHUB_PATH" | |
| - name: Verify ECHIDNA available | |
| run: echidna list-provers | |
| - name: Run ECHIDNA validation pipeline | |
| run: bash scripts/validate-with-echidna.sh --verbose | |
| env: | |
| ECHIDNA_BIN: /tmp/echidna/target/release/echidna | |
| correspondence: | |
| name: Lean 4 ↔ Rust Correspondence | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.0.2 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@9f151aca7c3990bab7afe2d82ac58088d3b01074 # v2 | |
| with: | |
| workspaces: impl/rust-cli | |
| - name: Run correspondence tests | |
| working-directory: impl/rust-cli | |
| run: cargo test --test correspondence_tests --verbose | |
| - name: Run property correspondence tests | |
| working-directory: impl/rust-cli | |
| run: cargo test --test property_tests --verbose | |
| - name: Run security tests | |
| working-directory: impl/rust-cli | |
| run: cargo test --test security_tests --verbose | |
| - name: Count proof holes | |
| run: | | |
| echo "=== Proof Hole Audit ===" | |
| echo "" | |
| echo "--- Lean 4 (sorry) ---" | |
| grep -rn "sorry" proofs/lean4/ || echo "(none)" | |
| echo "" | |
| echo "--- Coq (Admitted) ---" | |
| grep -rn "Admitted" proofs/coq/ || echo "(none)" | |
| echo "" | |
| echo "--- Agda (postulate) ---" | |
| grep -rn "postulate" proofs/agda/ || echo "(none)" | |
| echo "" | |
| LEAN_HOLES=$(grep -r "sorry" proofs/lean4/ 2>/dev/null | wc -l || echo 0) | |
| COQ_HOLES=$(grep -r "Admitted" proofs/coq/ 2>/dev/null | wc -l || echo 0) | |
| AGDA_HOLES=$(grep -r "postulate" proofs/agda/ 2>/dev/null | wc -l || echo 0) | |
| TOTAL=$((LEAN_HOLES + COQ_HOLES + AGDA_HOLES)) | |
| echo "Total proof holes: $TOTAL (Lean: $LEAN_HOLES, Coq: $COQ_HOLES, Agda: $AGDA_HOLES)" | |
| echo "" | |
| if [ "$TOTAL" -gt 35 ]; then | |
| echo "WARNING: Proof holes increased beyond baseline (31). Investigate." | |
| exit 1 | |
| fi |