11# SPDX-License-Identifier: MPL-2.0
22# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33#
4- # Haec: every example lowers to a well-formed Trope IR document (bash + jq, no Python).
4+ # Haec: every example lowers to a well-formed Trope IR document AND round-trips
5+ # through the reference tropechecker to its expected verdict and witness.
6+ #
7+ # The round-trip is the one seam joining the three repos — Haec emits IR, the
8+ # checker returns a verdict — so it is built and asserted here rather than
9+ # skipped. TROPECHECK_REQUIRED=1 makes a missing binary a hard failure.
510name : " 🔴 Gate: Trope conformance"
611on :
712 push :
@@ -16,7 +21,56 @@ concurrency:
1621jobs :
1722 examples-lower-to-valid-ir :
1823 runs-on : ubuntu-latest
24+ timeout-minutes : 20
25+ # The reference checker is an Idris2 program whose verified core requires
26+ # Idris 2 *0.8.0*: under 0.7.0, Trope/Fidelity.idr fails to parse at the
27+ # lambda-impossible clause `No (\Refl impossible)`. Pinned by image digest.
28+ container :
29+ image : ghcr.io/stefan-hoeck/idris2-pack@sha256:de9781906050dc44704ec6de0108c86f899ef17b2642932b79e00245d613b8ad
1930 steps :
20- - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
21- - name : Examples lower to valid Trope IR
31+ - name : Checkout Haec
32+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
33+ with :
34+ path : haec
35+
36+ # Checked out as a SIBLING of haec/ so tests/check-examples.sh finds it at
37+ # $ROOT/../trope-checker — which also activates the schema drift guard.
38+ - name : Checkout trope-checker (reference checker + canonical IR schema)
39+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40+ with :
41+ repository : hyperpolymath/trope-checker
42+ ref : 69221ad6bec0c9286cb5c917edfad281e7e0089e # main @ 2026-07-28
43+ path : trope-checker
44+
45+ # The pinned idris2-pack image is minimal and ships no jq, which both the
46+ # test script and the conformance runner require.
47+ - name : Install container prerequisites (jq)
48+ shell : bash
49+ run : |
50+ set -euo pipefail
51+ if ! command -v jq >/dev/null 2>&1; then
52+ apt-get update -qq
53+ apt-get install -y -qq --no-install-recommends jq
54+ fi
55+ jq --version
56+ idris2 --version
57+
58+ # ADR 0002/0003: the Idris2 executable is the reference checker and reuses
59+ # the *proved* verified core, so the thing that runs is the thing that is
60+ # proved. Installing that core is therefore part of building the oracle.
61+ - name : Build the Idris2 reference checker
62+ shell : bash
63+ working-directory : trope-checker
64+ run : |
65+ set -euo pipefail
66+ idris2 --install verification/proofs/idris2/trope.ipkg
67+ ( cd src/idris2 && idris2 --build tropecheck.ipkg )
68+ test -x src/idris2/build/exec/tropecheck
69+ echo "reference checker built"
70+
71+ - name : Examples lower to valid Trope IR, and round-trip to their verdicts
72+ shell : bash
73+ working-directory : haec
74+ env :
75+ TROPECHECK_REQUIRED : ' 1'
2276 run : bash tests/check-examples.sh
0 commit comments