-
Notifications
You must be signed in to change notification settings - Fork 1
233 lines (205 loc) · 9.12 KB
/
Copy pathproof.yml
File metadata and controls
233 lines (205 loc) · 9.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# =============================================================================
# LadybugDB — Integration Proof Suite
# =============================================================================
# Runs the mathematical proof tests that verify ladybug-rs architectural
# claims against the published literature (Berry-Esseen, NARS, Pearl, etc.)
#
# Four test suites:
# proof_foundation — 13 proofs (F-1 through F-7c)
# proof_reasoning_ladder — 8 proofs (RL-1 through RL-8)
# proof_tactics — 12 proofs (T-01 through T-34)
# proof_level_a_gaps — 6 proofs (A.1.4 through A.6.2)
#
# Total: 39 proofs verifying cognitive substrate invariants.
#
# Rust version: pinned to 1.94.0 to match Dockerfile build environment.
# RUSTFLAGS: -D warnings with targeted -A for noise lints in evolving codebase.
# =============================================================================
name: Proof Suite
on:
push:
branches: [main]
paths:
- 'src/**'
- 'tests/proof_*.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/proof.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'tests/proof_*.rs'
- 'Cargo.toml'
- 'Cargo.lock'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Allow specific lints that are noise in a 115K-line evolving codebase.
# Actual logic errors still fail. Remove allows as cleanup progresses.
# Categories: unused-* (imports, vars, mut, assignments, parens),
# edition 2024 (unsafe-op-in-unsafe-fn, mismatched-lifetime-syntaxes),
# visibility (private-interfaces), and minor (dead-code, unexpected-cfgs,
# ambiguous-glob-reexports, overlapping-range-endpoints, confusable-idents).
RUSTFLAGS: "-D warnings -A unused -A dead-code -A private-interfaces -A mismatched-lifetime-syntaxes -A unsafe-op-in-unsafe-fn -A unexpected-cfgs -A ambiguous-glob-reexports -A overlapping-range-endpoints -A confusable-idents"
jobs:
# ---------------------------------------------------------------------------
# Quick check: does it compile at all?
# ---------------------------------------------------------------------------
compile-check:
name: Compile Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: cargo check
run: cargo check --lib --tests
# ---------------------------------------------------------------------------
# Foundation Proofs (Berry-Esseen, XOR algebra, NARS truth values)
# ---------------------------------------------------------------------------
proof-foundation:
name: Foundation Proofs (F-1 through F-7)
needs: compile-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: Run foundation proofs
run: cargo test --test proof_foundation -- --test-threads=1 --show-output
# ---------------------------------------------------------------------------
# Reasoning Ladder Proofs (Sun et al. 2025 tier verification)
# ---------------------------------------------------------------------------
proof-reasoning-ladder:
name: Reasoning Ladder Proofs (RL-1 through RL-8)
needs: compile-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: Run reasoning ladder proofs
run: cargo test --test proof_reasoning_ladder -- --test-threads=1 --show-output
# ---------------------------------------------------------------------------
# Tactics Proofs (34 cognitive tactics structural verification)
# ---------------------------------------------------------------------------
proof-tactics:
name: Tactics Proofs (T-01 through T-34)
needs: compile-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: Run tactics proofs
run: cargo test --test proof_tactics -- --test-threads=1 --show-output
# ---------------------------------------------------------------------------
# Level A Gap Proofs (hardening / race condition coverage)
# ---------------------------------------------------------------------------
proof-level-a-gaps:
name: Level A Gap Proofs (A.1.4 through A.6.2)
needs: compile-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: Run level A gap proofs
run: cargo test --test proof_level_a_gaps -- --test-threads=1
# ---------------------------------------------------------------------------
# Full unit test suite (all 884 #[test] in src/)
# ---------------------------------------------------------------------------
unit-tests:
name: Unit Tests (all modules)
needs: compile-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling repos (OBLIGATORY deps)
run: |
git clone --depth 1 https://github.com/AdaWorldAPI/ndarray.git ../ndarray
git clone --depth 1 https://github.com/AdaWorldAPI/crewai-rust.git ../crewai-rust
git clone --depth 1 https://github.com/AdaWorldAPI/n8n-rs.git ../n8n-rs
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@v2
- name: Run all unit tests
run: cargo test --lib -- --test-threads=4
# ---------------------------------------------------------------------------
# Summary
# ---------------------------------------------------------------------------
proof-summary:
name: Proof Summary
needs: [compile-check, proof-foundation, proof-reasoning-ladder, proof-tactics, proof-level-a-gaps, unit-tests]
runs-on: ubuntu-latest
if: always()
steps:
- name: Check results
run: |
echo "============================================"
echo " LADYBUG-RS PROOF SUITE RESULTS"
echo "============================================"
echo ""
echo " Compile: ${{ needs.compile-check.result }}"
echo " Foundation: ${{ needs.proof-foundation.result }}"
echo " Reasoning Ladder: ${{ needs.proof-reasoning-ladder.result }}"
echo " Tactics: ${{ needs.proof-tactics.result }}"
echo " Level A Gaps: ${{ needs.proof-level-a-gaps.result }}"
echo " Unit Tests: ${{ needs.unit-tests.result }}"
echo ""
PASS=true
for result in \
"${{ needs.compile-check.result }}" \
"${{ needs.proof-foundation.result }}" \
"${{ needs.proof-reasoning-ladder.result }}" \
"${{ needs.proof-tactics.result }}" \
"${{ needs.proof-level-a-gaps.result }}" \
"${{ needs.unit-tests.result }}"; do
if [ "$result" != "success" ]; then
PASS=false
fi
done
if [ "$PASS" = true ]; then
echo " ✅ ALL PROOF SUITES PASSED"
else
echo " ❌ SOME PROOF SUITES FAILED"
exit 1
fi
echo "============================================"