-
Notifications
You must be signed in to change notification settings - Fork 0
215 lines (187 loc) · 8.58 KB
/
Copy pathbenchmarks.yml
File metadata and controls
215 lines (187 loc) · 8.58 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
# Nightly / relevant-PR real-world and release-grade benchmarks.
name: benchmarks
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
pull_request:
paths:
- "benchmarks/**"
- "foundry/**"
- "scripts/build_foundry_corpus.py"
- "scripts/validate_foundry_corpus.py"
- "scripts/run_tool_selection_benchmark.py"
- "scripts/run_agent_held_out.py"
- "scripts/run_real_world.py"
- "scripts/run_property_tests.py"
- "scripts/run_metamorphic.py"
- "scripts/run_perf_budgets.py"
- "scripts/run_differential_backends.py"
- "scripts/run_leanlink_fuzz_stubs.py"
- "scripts/run_ideal_membership_benchmark.py"
- "scripts/smoke_ideal_membership.py"
- "scripts/generate_exact_ideal_replay_module.py"
- "scripts/ci/run_cr_exact_lean_e2e.py"
- "scripts/ci/run_cr_exact_lean_e2e_production.py"
- "tests/forensic/test_ideal_benchmark_scoring.py"
- "registry/maturity-inventory.json"
- "registry/capabilities/**"
- "adapters/common/exact_replay/**"
- "MathEvidence/Checkers/IdealMembership/**"
- "MathEvidence/Core/ExprSerialize.lean"
- "MathEvidence/Exe/DeclarationIdentity.lean"
- "adapters/common/ideal_membership.py"
- "adapters/common/kernel_replay.py"
- "adapters/common/environment_lock.py"
- "agent/api/receipt.py"
- ".github/workflows/benchmarks.yml"
- ".github/workflows/lean.yml"
- ".github/workflows/release.yml"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Mathematical/task benchmark behavior (not assurance policy).
benchmark-task-suite:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Inventory benchmark trees
run: |
find benchmarks -type f | sort
test -d benchmarks/adversarial/seed
test -d benchmarks/real_world
test -d benchmarks/conformance
test -d benchmarks/agent/held_out
test -d benchmarks/tool_selection
test -d foundry/corpus/v0.1
echo "benchmarks skeleton ok"
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Install uv (SHA-pinned)
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
enable-cache: true
- name: Install dependencies (frozen lock required)
run: |
set -euo pipefail
test -f uv.lock
uv sync --frozen --extra dev --extra sympy
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Ideal-membership scoring trust regression
run: python -m pytest tests/forensic/test_ideal_benchmark_scoring.py -q
- name: Ideal-membership frozen 55-task corpus (candidate/checker tier)
env:
MATHEVIDENCE_IDEAL_BACKEND: sympy
run: |
set -euo pipefail
python scripts/run_ideal_membership_benchmark.py --tier candidate | tee /tmp/ideal-candidate.json
python - <<'PY'
import json
from pathlib import Path
p = json.loads(Path("/tmp/ideal-candidate.json").read_text(encoding="utf-8"))
manifest = json.loads(
Path("benchmarks/ideal_membership/manifest.json").read_text(encoding="utf-8")
)
expected_scored = int(manifest["passTasks"]) + int(manifest["xfailTasks"])
assert p.get("tier") == "candidate", p.get("tier")
assert p.get("taskCount") == manifest.get("taskCount"), (p.get("taskCount"), manifest.get("taskCount"))
assert p.get("scoredTasks") == expected_scored, (p.get("scoredTasks"), expected_scored)
assert p.get("skipped") == manifest.get("skipTasks"), (p.get("skipped"), manifest.get("skipTasks"))
assert p.get("passed") == p.get("scoredTasks"), (p.get("passed"), p.get("scoredTasks"))
assert p.get("criticalFalseAcceptCount") == 0, p.get("criticalFalseAcceptTasks")
assert not p.get("criticalFalseAcceptTasks"), p.get("criticalFalseAcceptTasks")
assert p.get("adapterCheckerDisagreementCount") == 0, p.get("adapterCheckerDisagreementTasks")
for task in p.get("tasks") or []:
assert (task.get("lean") or {}).get("resultStatus") is None, task.get("id")
print(
"ideal frozen corpus OK:",
p.get("taskCount"),
"tasks; scored=", p.get("scoredTasks"),
"false_accepts=", p.get("criticalFalseAcceptCount"),
)
PY
- name: Agent held-out suite
run: python scripts/run_agent_held_out.py
- name: Real-world bottleneck obligations
run: python scripts/run_real_world.py
- name: Property tests
run: python scripts/run_property_tests.py
- name: Metamorphic suite
run: python scripts/run_metamorphic.py
- name: Perf budgets (blocking on regression)
run: python scripts/run_perf_budgets.py
- name: Differential backends (skip/fixture without Wolfram)
run: python scripts/run_differential_backends.py
- name: Build Foundry corpus (idempotent)
run: python scripts/build_foundry_corpus.py
- name: Validate Foundry corpus
run: python scripts/validate_foundry_corpus.py
- name: Tool-selection benchmark
run: python scripts/run_tool_selection_benchmark.py
# Bounded exact theorem subset: backend-proposed multipliers -> exact Lean
# theorem -> Lean.Environment identity -> strict Certification Record.
# The full 55-task corpus runs separately above. Benchmark score never grants
# CR eligibility.
ideal-release-grade:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Install elan (checksum-pinned release asset)
run: bash scripts/ci/install-elan-pinned.sh
- name: Restore pinned Mathlib build cache
run: |
set -euo pipefail
lake exe cache get
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Install uv (SHA-pinned)
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
enable-cache: true
- name: Install dependencies (frozen lock required)
run: |
set -euo pipefail
test -f uv.lock
uv sync --frozen --extra dev --extra sympy
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- name: Build exact replay dependencies
run: |
set -euo pipefail
echo "::notice title=ideal-release-grade setup::Lake build of exact-replay deps. Failure here is setup/replay, not benchmark scoring."
lake build MathEvidenceCheckers mathevidence-declaration-identity
- name: Ideal membership bounded exact theorem subset
env:
MATHEVIDENCE_IDEAL_BENCH_TIER: release
MATHEVIDENCE_IDEAL_BACKEND: sympy
run: |
set -euo pipefail
echo "::notice title=ideal-release-grade bench::Bounded exact-CR subset. The full 55-task candidate/checker corpus is a separate job."
python scripts/run_ideal_membership_benchmark.py --tier release | tee /tmp/ideal-release.json
python - <<'PY'
import json
p = json.load(open("/tmp/ideal-release.json", encoding="utf-8"))
tasks = p.get("tasks") or []
release_tasks = p.get("releaseCertificationTasks") or []
assert p.get("tier") == "release", p.get("tier")
assert p.get("taskCount") == len(release_tasks) == len(tasks) and len(tasks) > 0
assert {t.get("id") for t in tasks} == set(release_tasks)
assert p.get("passed") == p.get("scoredTasks") and p.get("scoredTasks", 0) > 0
assert p.get("criticalFalseAcceptCount") == 0, p.get("criticalFalseAcceptTasks")
assert "OfflineFixtures" not in (p.get("scoringRule") or "")
for t in tasks:
lean = t.get("lean") or {}
assert lean.get("resultStatus") == "soundness_verified", (t.get("id"), lean)
assert lean.get("certificationRecordDigest"), t.get("id")
assert lean.get("identityAuthority") == "Lean.Environment ConstantInfo", lean
assert "crEligible" not in p
print("ideal bounded exact subset OK:", p.get("passed"), "Certification Records")
PY