Skip to content

Commit 16cc925

Browse files
committed
ci: fix proof suite — pin Rust 1.93, allow noise lints, add compile-check + unit-tests
1 parent a03e53f commit 16cc925

1 file changed

Lines changed: 87 additions & 12 deletions

File tree

.github/workflows/proof.yml

Lines changed: 87 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
# proof_level_a_gaps — 6 proofs (A.1.4 through A.6.2)
1212
#
1313
# Total: 39 proofs verifying cognitive substrate invariants.
14+
#
15+
# Rust version: pinned to 1.93.0 to match Dockerfile build environment.
16+
# RUSTFLAGS: -D warnings with targeted -A for noise lints in evolving codebase.
1417
# =============================================================================
1518

1619
name: Proof Suite
@@ -23,6 +26,7 @@ on:
2326
- 'tests/proof_*.rs'
2427
- 'Cargo.toml'
2528
- 'Cargo.lock'
29+
- '.github/workflows/proof.yml'
2630
pull_request:
2731
branches: [main]
2832
paths:
@@ -34,52 +38,112 @@ on:
3438

3539
env:
3640
CARGO_TERM_COLOR: always
37-
RUSTFLAGS: "-D warnings"
41+
# Allow specific lints that are noise in a 115K-line evolving codebase.
42+
# Actual logic errors still fail. Remove allows as cleanup progresses.
43+
RUSTFLAGS: "-D warnings -A unused-imports -A dead-code -A private-interfaces -A mismatched-lifetime-syntaxes"
3844

3945
jobs:
46+
# ---------------------------------------------------------------------------
47+
# Quick check: does it compile at all?
48+
# ---------------------------------------------------------------------------
49+
compile-check:
50+
name: Compile Check
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: dtolnay/rust-toolchain@master
55+
with:
56+
toolchain: "1.93.0"
57+
- uses: Swatinem/rust-cache@v2
58+
- name: cargo check
59+
run: cargo check --lib --tests
60+
61+
# ---------------------------------------------------------------------------
62+
# Foundation Proofs (Berry-Esseen, XOR algebra, NARS truth values)
63+
# ---------------------------------------------------------------------------
4064
proof-foundation:
4165
name: Foundation Proofs (F-1 through F-7)
66+
needs: compile-check
4267
runs-on: ubuntu-latest
4368
steps:
4469
- uses: actions/checkout@v4
45-
- uses: dtolnay/rust-toolchain@stable
70+
- uses: dtolnay/rust-toolchain@master
71+
with:
72+
toolchain: "1.93.0"
4673
- uses: Swatinem/rust-cache@v2
4774
- name: Run foundation proofs
4875
run: cargo test --test proof_foundation -- --test-threads=1 -v
4976

77+
# ---------------------------------------------------------------------------
78+
# Reasoning Ladder Proofs (Sun et al. 2025 tier verification)
79+
# ---------------------------------------------------------------------------
5080
proof-reasoning-ladder:
5181
name: Reasoning Ladder Proofs (RL-1 through RL-8)
82+
needs: compile-check
5283
runs-on: ubuntu-latest
5384
steps:
5485
- uses: actions/checkout@v4
55-
- uses: dtolnay/rust-toolchain@stable
86+
- uses: dtolnay/rust-toolchain@master
87+
with:
88+
toolchain: "1.93.0"
5689
- uses: Swatinem/rust-cache@v2
5790
- name: Run reasoning ladder proofs
5891
run: cargo test --test proof_reasoning_ladder -- --test-threads=1 -v
5992

93+
# ---------------------------------------------------------------------------
94+
# Tactics Proofs (34 cognitive tactics structural verification)
95+
# ---------------------------------------------------------------------------
6096
proof-tactics:
6197
name: Tactics Proofs (T-01 through T-34)
98+
needs: compile-check
6299
runs-on: ubuntu-latest
63100
steps:
64101
- uses: actions/checkout@v4
65-
- uses: dtolnay/rust-toolchain@stable
102+
- uses: dtolnay/rust-toolchain@master
103+
with:
104+
toolchain: "1.93.0"
66105
- uses: Swatinem/rust-cache@v2
67106
- name: Run tactics proofs
68107
run: cargo test --test proof_tactics -- --test-threads=1 -v
69108

109+
# ---------------------------------------------------------------------------
110+
# Level A Gap Proofs (hardening / race condition coverage)
111+
# ---------------------------------------------------------------------------
70112
proof-level-a-gaps:
71113
name: Level A Gap Proofs (A.1.4 through A.6.2)
114+
needs: compile-check
72115
runs-on: ubuntu-latest
73116
steps:
74117
- uses: actions/checkout@v4
75-
- uses: dtolnay/rust-toolchain@stable
118+
- uses: dtolnay/rust-toolchain@master
119+
with:
120+
toolchain: "1.93.0"
76121
- uses: Swatinem/rust-cache@v2
77122
- name: Run level A gap proofs
78123
run: cargo test --test proof_level_a_gaps -- --test-threads=1
79124

125+
# ---------------------------------------------------------------------------
126+
# Full unit test suite (all 884 #[test] in src/)
127+
# ---------------------------------------------------------------------------
128+
unit-tests:
129+
name: Unit Tests (all modules)
130+
needs: compile-check
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v4
134+
- uses: dtolnay/rust-toolchain@master
135+
with:
136+
toolchain: "1.93.0"
137+
- uses: Swatinem/rust-cache@v2
138+
- name: Run all unit tests
139+
run: cargo test --lib -- --test-threads=4
140+
141+
# ---------------------------------------------------------------------------
142+
# Summary
143+
# ---------------------------------------------------------------------------
80144
proof-summary:
81145
name: Proof Summary
82-
needs: [proof-foundation, proof-reasoning-ladder, proof-tactics, proof-level-a-gaps]
146+
needs: [compile-check, proof-foundation, proof-reasoning-ladder, proof-tactics, proof-level-a-gaps, unit-tests]
83147
runs-on: ubuntu-latest
84148
if: always()
85149
steps:
@@ -89,18 +153,29 @@ jobs:
89153
echo " LADYBUG-RS PROOF SUITE RESULTS"
90154
echo "============================================"
91155
echo ""
156+
echo " Compile: ${{ needs.compile-check.result }}"
92157
echo " Foundation: ${{ needs.proof-foundation.result }}"
93158
echo " Reasoning Ladder: ${{ needs.proof-reasoning-ladder.result }}"
94159
echo " Tactics: ${{ needs.proof-tactics.result }}"
95160
echo " Level A Gaps: ${{ needs.proof-level-a-gaps.result }}"
161+
echo " Unit Tests: ${{ needs.unit-tests.result }}"
96162
echo ""
97-
if [ "${{ needs.proof-foundation.result }}" = "success" ] && \
98-
[ "${{ needs.proof-reasoning-ladder.result }}" = "success" ] && \
99-
[ "${{ needs.proof-tactics.result }}" = "success" ] && \
100-
[ "${{ needs.proof-level-a-gaps.result }}" = "success" ]; then
101-
echo " ALL PROOF SUITES PASSED"
163+
PASS=true
164+
for result in \
165+
"${{ needs.compile-check.result }}" \
166+
"${{ needs.proof-foundation.result }}" \
167+
"${{ needs.proof-reasoning-ladder.result }}" \
168+
"${{ needs.proof-tactics.result }}" \
169+
"${{ needs.proof-level-a-gaps.result }}" \
170+
"${{ needs.unit-tests.result }}"; do
171+
if [ "$result" != "success" ]; then
172+
PASS=false
173+
fi
174+
done
175+
if [ "$PASS" = true ]; then
176+
echo " ✅ ALL PROOF SUITES PASSED"
102177
else
103-
echo " SOME PROOF SUITES FAILED"
178+
echo " SOME PROOF SUITES FAILED"
104179
exit 1
105180
fi
106181
echo "============================================"

0 commit comments

Comments
 (0)