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
33 changes: 24 additions & 9 deletions .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,34 @@ env:
on:
push:
branches: [main, master]
pull_request:
paths:
- '.github/workflows/casket-pages.yml'
- 'site/**'
workflow_dispatch:
inputs:
deploy:
description: 'Deploy the built site (false validates the build only)'
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
type: boolean
default: false
permissions:
actions: read
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
group: "pages-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Checkout casket-ssg
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: hyperpolymath/casket-ssg
ref: c190d2882d9ff27205dd5a5b6db6da12cc647a70
path: .casket-ssg
- name: Setup GHCup
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
Expand All @@ -38,7 +46,7 @@ jobs:
~/.cabal/packages
~/.cabal/store
.casket-ssg/dist-newstyle
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
key: ${{ runner.os }}-ghc982-casket-c190d2882d9ff27205dd5a5b6db6da12cc647a70-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
- name: Build casket-ssg
working-directory: .casket-ssg
run: cabal build
Expand Down Expand Up @@ -89,20 +97,27 @@ jobs:
mkdir -p _site
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
touch ../_site/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4; nested artifact action is SHA-pinned
with:
path: '_site'
deploy:
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.deploy)
permissions:
actions: read
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 15
needs: build
steps:
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

201 changes: 19 additions & 182 deletions .github/workflows/echidna-verify.yml
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

6 changes: 5 additions & 1 deletion .github/workflows/header-refc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
# Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
name: Header RefC soundness
on:
workflow_call:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: header-refc-${{ github.ref }}
group: header-refc-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
header-refc:
Expand Down Expand Up @@ -48,9 +49,12 @@ jobs:
version: '0.15.2'
- name: Total Idris kernel, actual ABI, exhaustive pairs and rejecting mutant
run: bash scripts/test-header-bridge.sh
- name: Fresh Idris2 decoder contract and pure Zig native witnesses
run: bash scripts/test-refc-decoder.sh
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: header-refc-evidence
path: build/header-evidence/
if-no-files-found: error

14 changes: 13 additions & 1 deletion .github/workflows/header-theory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
# Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
name: Header theory replay
on:
workflow_call:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: header-theory-${{ github.ref }}
group: header-theory-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
theory:
Expand All @@ -35,10 +36,20 @@ jobs:
~/.opam
~/.local/header-proof-tools
key: header-theory-ubuntu2404-systemghc-agda2643-lean4150-rocq920-ocaml511-${{ hashFiles('.github/workflows/header-theory.yml') }}
# Cache contains tools only; the exact version checks run on every replay.
restore-keys: |
header-theory-ubuntu2404-systemghc-agda2643-lean4150-rocq920-ocaml511-
- name: Build pinned proof tools
if: steps.proof-cache.outputs.cache-hit != 'true'
run: |
set -euo pipefail
# A fallback cache may have the same pinned tools under an older
# workflow hash. Check the installed versions before reusing it.
if [[ $("$HOME/.local/header-proof-tools/bin/agda" --version 2>/dev/null) == 'Agda version 2.6.4.3' ]] &&
[[ $("$HOME/.local/header-proof-tools/lean-4.15.0-linux/bin/lean" --version 2>/dev/null) == 'Lean (version 4.15.0,'* ]] &&
[[ $(opam exec --switch=header-proof -- coqc --version 2>/dev/null) == 'The Rocq Prover, version 9.2'* ]]; then
exit 0
fi
mkdir -p "$HOME/.local/header-proof-tools/bin"
cabal update
# Hosted images also put a newer, incompatible GHC on PATH.
Expand Down Expand Up @@ -68,3 +79,4 @@ jobs:
name: header-theory-evidence
path: build/header-proof-evidence/
if-no-files-found: error

1 change: 1 addition & 0 deletions .github/workflows/secret-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
Loading
Loading