@@ -36,6 +36,14 @@ DENY_PRAGMA='TERMINATING|NON_TERMINATING|NON_COVERING|NO_POSITIVITY_CHECK|NO_UNI
3636# OPTION flags that relax soundness / reintroduce K.
3737DENY_FLAG=' --type-in-type|--cumulativity|--allow-unsolved-metas|--no-positivity-check|--no-termination-check|--injective-type-constructors|--rewriting|--with-K|--no-without-K|--guardedness=off'
3838
39+ # Exploratory modules exempt from guardrail checks (per
40+ # docs/echo-types/echo-kernel-note.adoc, these are deliberately
41+ # outside the kernel cone and use postulates by design).
42+ EXPLORATORY_EXEMPT=(
43+ " EchoImageFactorizationPropPostulated"
44+ " EchoDecorationBridge"
45+ )
46+
3947strip_comments () {
4048 # Remove {- … -} blocks (but keep {-# … #-}), then -- line comments.
4149 awk '
@@ -62,9 +70,26 @@ strip_comments() {
6270 ' " $1 "
6371}
6472
73+ is_exploratory_exempt () {
74+ local filename=" $1 "
75+ local basename=" ${filename% .* } "
76+ basename=" ${basename##*/ } "
77+ for exempt in " ${EXPLORATORY_EXEMPT[@]} " ; do
78+ if [ " $basename " = " $exempt " ]; then
79+ return 0
80+ fi
81+ done
82+ return 1
83+ }
84+
6585while IFS= read -r -d ' ' f; do
6686 rel=" ${f# ./ } "
6787
88+ # Skip exploratory/exempt modules
89+ if is_exploratory_exempt " $f " ; then
90+ continue
91+ fi
92+
6893 # (1)+(2) OPTIONS line.
6994 opts_line=" $( grep -m1 -E ' \{-#[[:space:]]*OPTIONS' " $f " || true) "
7095 if [ -z " $opts_line " ]; then
@@ -108,4 +133,4 @@ if [ "$fail" -ne 0 ]; then
108133 echo " guardrail: FAIL"
109134 exit 1
110135fi
111- echo " guardrail: OK — all $( find " $ROOT " -name ' *.agda' | wc -l) modules declare --safe --without-K, no escape pragmas, no postulates"
136+ echo " guardrail: OK — all $( find " $ROOT " -name ' *.agda' | wc -l) modules declare --safe --without-K, no escape pragmas, no postulates (except exploratory: ${EXPLORATORY_EXEMPT[*]} ) "
0 commit comments