Repository navigation
Bind guarded RefC decoding to its Idris2 contract and source replay #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c0b2247
Expose the guarded RefC decoder with its Idris2 word contract
hyperpolymath 9d0fa45
Repair Pages action pin and precisely classify historical scanner fix…
hyperpolymath 4b8dedd
Replay actual Proven gates weekly and validate Pages without deployment
hyperpolymath dfb5cad
Execute fresh Idris decoder oracle against actual Zig source in four …
hyperpolymath 272730a
Correct placement of Pages deployment guard and job permissions
hyperpolymath a38d22b
Check cached prover versions without pipefail early-exit ambiguity
hyperpolymath 81ebe3b
Allow explicit full-history secret validation on a repair branch
hyperpolymath bbc79b5
Classify exact historical malformed JWT authentication-refusal fixture
hyperpolymath a8f6fc5
Pin Casket source and budget cold hosted builds while cancelling stal…
hyperpolymath a388500
Scope Pages configuration to deployment and record decoder proof evid…
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,196 +1,33 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # ECHIDNA proof verification — formal verification of Agda and Idris2 proofs. | ||
| # | ||
| # Scope: | ||
| # - lol/proofs/theories/**/*.agda | ||
| # - a2ml/src/A2ML/Proofs.idr | ||
| # - avow-protocol/avow-lib/src/abi/*.idr | ||
| # | ||
| # Dogfooding: standards repo defines ECHIDNA trust pipeline; this workflow | ||
| # applies that pipeline to the repo's own proofs. | ||
|
|
||
| # Verify this repository's real proofs and ABI, using the same gates as each PR. | ||
| name: ECHIDNA Proof Verification | ||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'lol/proofs/**' | ||
| - 'a2ml/src/**/*.idr' | ||
| - 'avow-protocol/avow-lib/src/abi/*.idr' | ||
| - '.github/workflows/echidna-verify.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'lol/proofs/**' | ||
| - 'a2ml/src/**/*.idr' | ||
| - 'avow-protocol/avow-lib/src/abi/*.idr' | ||
| schedule: | ||
| # Weekly re-verification to catch stale-proof drift | ||
| - cron: '0 6 * * 1' | ||
| workflow_dispatch: | ||
| # Estate guardrail: cancel superseded runs so re-pushes / rebased PR | ||
| # updates do not pile up queued runs against the shared account-wide | ||
| # Actions concurrency pool. Applied only to read-only check workflows | ||
| # (no publish/mutation), so cancelling a superseded run is always safe. | ||
| permissions: | ||
| contents: read | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| jobs: | ||
| agda-lol: | ||
| name: Agda — lol/proofs | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||
| with: | ||
| submodules: recursive | ||
| - name: Install Agda | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y agda agda-stdlib | ||
| agda --version | ||
| - name: Type-check proofs | ||
| id: typecheck | ||
| run: | | ||
| set -euo pipefail | ||
| echo "=== Agda proofs under lol/proofs ===" | ||
| find lol/proofs/theories -name '*.agda' -print | ||
| cd lol/proofs | ||
| for f in $(find theories -name '*.agda'); do | ||
| echo "--- checking $f ---" | ||
| agda --safe --cubical-compatible --double-check "$f" 2>&1 | tee -a ../../agda-verify.log | ||
| done | ||
| - name: Postulate audit | ||
| run: | | ||
| echo "=== Postulate usage in lol/proofs ===" | ||
| grep -rn "postulate" lol/proofs/theories/ || echo "No postulates found" | ||
| - name: Upload log | ||
| if: always() | ||
| uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | ||
| with: | ||
| name: agda-verify-log | ||
| path: agda-verify.log | ||
| if-no-files-found: ignore | ||
| idris2-a2ml: | ||
| name: Idris2 — a2ml proofs | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||
| with: | ||
| submodules: recursive | ||
| - name: Cache pack | ||
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
| with: | ||
| path: | | ||
| ~/.pack | ||
| ~/.idris2 | ||
| key: ${{ runner.os }}-idris2-pack-${{ hashFiles('**/pack.toml', '**/*.ipkg') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-idris2-pack- | ||
| - name: Install Idris2 via pack | ||
| run: | | ||
| set -e | ||
| if command -v idris2 >/dev/null 2>&1; then | ||
| echo "idris2 already present: $(idris2 --version)" | ||
| exit 0 | ||
| fi | ||
| # Bootstrap: install pack, which installs idris2. | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential libgmp-dev chezscheme | ||
| # Clone pack bootstrap | ||
| git clone --depth 1 https://github.com/stefan-hoeck/idris2-pack.git "$HOME/idris2-pack" | ||
| cd "$HOME/idris2-pack" | ||
| # Use the bootstrap script in non-interactive mode | ||
| bash install.bash </dev/null || echo "::warning::pack install had warnings" | ||
| echo "$HOME/.pack/bin" >> "$GITHUB_PATH" | ||
| export PATH="$HOME/.pack/bin:$PATH" | ||
| pack install-api idris2 | ||
| idris2 --version | ||
| - name: Type-check A2ML.Proofs | ||
| run: | | ||
| export PATH="$HOME/.pack/bin:$PATH" | ||
| cd a2ml | ||
| idris2 --check src/A2ML/Proofs.idr 2>&1 | tee ../idris2-a2ml.log | ||
| - name: Upload log | ||
| if: always() | ||
| uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | ||
| with: | ||
| name: idris2-a2ml-log | ||
| path: idris2-a2ml.log | ||
| if-no-files-found: ignore | ||
| idris2-avow: | ||
| name: Idris2 — AVOW consent proofs | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | ||
| with: | ||
| submodules: recursive | ||
| - name: Cache pack | ||
| uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
| with: | ||
| path: | | ||
| ~/.pack | ||
| ~/.idris2 | ||
| key: ${{ runner.os }}-idris2-pack-${{ hashFiles('**/pack.toml', '**/*.ipkg') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-idris2-pack- | ||
| - name: Install Idris2 via pack | ||
| run: | | ||
| set -e | ||
| if command -v idris2 >/dev/null 2>&1; then | ||
| echo "idris2 already present: $(idris2 --version)" | ||
| exit 0 | ||
| fi | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential libgmp-dev chezscheme | ||
| git clone --depth 1 https://github.com/stefan-hoeck/idris2-pack.git "$HOME/idris2-pack" | ||
| cd "$HOME/idris2-pack" | ||
| bash install.bash </dev/null || echo "::warning::pack install had warnings" | ||
| echo "$HOME/.pack/bin" >> "$GITHUB_PATH" | ||
| export PATH="$HOME/.pack/bin:$PATH" | ||
| pack install-api idris2 | ||
| idris2 --version | ||
| - name: Type-check AVOW proofs | ||
| run: | | ||
| export PATH="$HOME/.pack/bin:$PATH" | ||
| cd avow-protocol/avow-lib | ||
| for f in src/abi/Consent.idr src/abi/Unsubscribe.idr src/abi/Types.idr; do | ||
| if [ -f "$f" ]; then | ||
| echo "--- checking $f ---" | ||
| idris2 --check "$f" 2>&1 | tee -a ../../idris2-avow.log | ||
| fi | ||
| done | ||
| - name: Upload log | ||
| if: always() | ||
| uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | ||
| with: | ||
| name: idris2-avow-log | ||
| path: idris2-avow.log | ||
| if-no-files-found: ignore | ||
| theory: | ||
| uses: ./.github/workflows/header-theory.yml | ||
| abi: | ||
| uses: ./.github/workflows/header-refc.yml | ||
| trust-summary: | ||
| name: Trust pipeline summary | ||
| needs: [agda-lol, idris2-a2ml, idris2-avow] | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| needs: [theory, abi] | ||
| if: always() | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - name: Summarise | ||
| run: | | ||
| echo "## ECHIDNA Trust Summary" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "| Target | Result |" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "|---|---|" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "| Agda lol/proofs | ${{ needs.agda-lol.result }} |" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "| Idris2 a2ml | ${{ needs.idris2-a2ml.result }} |" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "| Idris2 avow | ${{ needs.idris2-avow.result }} |" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "See artefacts for verification logs." >> "$GITHUB_STEP_SUMMARY" | ||
| - name: Require both real verification gates | ||
| env: | ||
| THEORY: ${{ needs.theory.result }} | ||
| ABI: ${{ needs.abi.result }} | ||
| run: | | ||
| printf 'Proven theory replay: %s\nActual Idris2/Zig ABI: %s\n' "$THEORY" "$ABI" >> "$GITHUB_STEP_SUMMARY" | ||
| test "$THEORY" = success | ||
| test "$ABI" = success | ||
|
|
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.