Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
5273d69
Match PortBench compose entrypoint
tadamcz Jun 1, 2026
29b6be5
fix AI slop
tadamcz Jun 1, 2026
8d87ca1
make image tag not depend on hash after all
tadamcz Jun 1, 2026
d08f1bb
Set summary compaction threshold
tadamcz Jun 1, 2026
a715529
bump sandbox memory to 32g
tadamcz Jun 1, 2026
7757ac4
bump sandbox memory to 64g
tadamcz Jun 1, 2026
ba5194d
remove AI slop
tadamcz Jun 2, 2026
6a818ba
Set deepagent continue prompt
tadamcz Jun 2, 2026
588e903
comment
tadamcz Jun 2, 2026
205dde4
Surface sandbox-exec failures (incl. OOM) to the agent
tadamcz Jun 2, 2026
12c6427
Let the agent drive PyPantograph directly from bash
tadamcz Jun 2, 2026
8eeff2d
Vendor PyPantograph docs into the agent image
tadamcz Jun 2, 2026
ff6e217
Vendor Pantograph's repl.md (protocol reference)
tadamcz Jun 2, 2026
d5d2c8b
Move Pantograph's repl.md into its own pantograph-docs/ folder
tadamcz Jun 2, 2026
c637624
Vendor the remaining Pantograph docs (rationale, contributing)
tadamcz Jun 2, 2026
b637723
Drop provenance header comments from vendored docs
tadamcz Jun 2, 2026
31e8177
Note ipynb origin in converted PyPantograph docs
tadamcz Jun 2, 2026
1dfdfb8
Drive safe_verify directly from the host checker
tadamcz Jun 2, 2026
830b0fc
Don't truncate SafeVerify output (it goes to the score, not the agent)
tadamcz Jun 2, 2026
e3ef4c4
Clear SafeVerify workspace before each check
tadamcz Jun 2, 2026
bf1fefc
Lower agent sandbox mem_limit to 10g based on profiling
tadamcz Jun 2, 2026
918f1d9
Set scorer mem_limit to 50g; document safe_verify memory profile
tadamcz Jun 2, 2026
af2e544
Bump version to 0.1.1
tadamcz Jun 2, 2026
5fceb65
Build sandbox images on the fly for local runs (PortBench pattern)
tadamcz Jun 2, 2026
5391a2a
Cache CI image builds in ECR (PortBench's buildx registry-cache setup)
tadamcz Jun 2, 2026
8c5fe83
Bump version to 0.1.2
tadamcz Jun 2, 2026
346435d
Raise bash tool timeout to 600s and safe_verify timeout to 900s
tadamcz Jun 3, 2026
53017e9
Lower bash tool timeout to 300s (5 minutes)
tadamcz Jun 3, 2026
ee99410
Counter agent defeatism in the prover instructions
tadamcz Jun 3, 2026
61598bb
Don't reveal checker internals in the no-loopholes warning
tadamcz Jun 3, 2026
4752dd2
Fix prompt tests for the lean_instructions() refactor
tadamcz Jun 3, 2026
2e68412
Expose arxiv_search's full API; document the metadata-search limit
tadamcz Jun 3, 2026
2d8b283
Stop leaking benchmark internals via arXiv cutoff messaging
tadamcz Jun 3, 2026
a1aa85f
improve example eval set
tadamcz Jun 3, 2026
580229d
Score agent-side SafeVerify failures instead of erroring the sample
tadamcz Jun 3, 2026
8d66864
Tell the agent when its submission OOMed/timed out SafeVerify
tadamcz Jun 3, 2026
597ff00
upgrade hawk
tadamcz Jun 3, 2026
deacad5
Fix arXiv test assertion and two mypy errors
tadamcz Jun 3, 2026
d888298
Let the agent disprove conjectures, not just prove them
tadamcz Jun 5, 2026
d96b687
Capture SafeVerify's --save JSON report on the score
tadamcz Jun 5, 2026
959532a
Strip the license banner before writing the proof file to the sandbox
tadamcz Jun 5, 2026
f885d33
tell agent about the axioms
tadamcz Jun 5, 2026
03f728a
Tell the agent to delete the original theorem when disproving
tadamcz Jun 5, 2026
46175b6
Show the agent the literal negateExpr source for disproofs
tadamcz Jun 5, 2026
189ed28
Add TODO tracking three SafeVerify bugs
tadamcz Jun 5, 2026
052c521
Fix task message contradicting the disproof path
tadamcz Jun 5, 2026
2c4705c
Deliver all instructions as one user prompt, task line first
tadamcz Jun 5, 2026
f3bcd45
clarify transitive imports
tadamcz Jun 5, 2026
67a1c00
Add react agent option alongside deepagent
tadamcz Jun 6, 2026
d5e593e
default to react
tadamcz Jun 6, 2026
f3b9845
Replace live arXiv tools with an offline grep corpus
tadamcz Jun 6, 2026
017a51a
Split corpus build into download/process/artifact stages
tadamcz Jun 6, 2026
ccb721d
Bump version to 0.1.3 for ECR image build
tadamcz Jun 6, 2026
200e5c4
Add scripts/bump_version.py; sync pyproject version
tadamcz Jun 6, 2026
701d411
Add checks.yml: version-consistency + pytest
tadamcz Jun 6, 2026
ae61acd
lockfile version
tadamcz Jun 6, 2026
54ece88
Replace apn_oeis names arg with named subsets
tadamcz Jun 6, 2026
481f386
Rename unproved subset random40 -> unproved40
tadamcz Jun 6, 2026
5dc0837
Fix SafeVerify private-name mismatch by sharing the compile module name
tadamcz Jun 6, 2026
d75d5bc
Add extract_plaintext.py: dump apn .eval transcripts to plain text
tadamcz Jun 6, 2026
d1eb199
Isolate OEIS specs per conjecture for true per-conjecture scoring
tadamcz Jun 6, 2026
3b67ef1
Fix OEIS isolation: keep dependency lemmas, comments, real compile gate
tadamcz Jun 6, 2026
80b63e4
Separate OEIS isolation generation from validation
tadamcz Jun 6, 2026
114fbc9
Name literature compose compose.yaml so Hawk recognizes it
tadamcz Jun 6, 2026
029cb7f
Strip trailing comments hanging off cut declarations
tadamcz Jun 6, 2026
cafddc4
Add SageMath to the agent sandbox as a full CAS
tadamcz Jun 6, 2026
737c2b1
Bump version to 0.1.4rc1 for fresh ECR build with SageMath
tadamcz Jun 6, 2026
fab1fb8
tell agent how many papers so it doesn't blindly search
tadamcz Jun 6, 2026
245835d
Pass --verbose to safe_verify for detailed mismatch diagnostics
tadamcz Jun 6, 2026
d9e2eb7
explain 38 vs 44 discrepancy
tadamcz Jun 7, 2026
0979809
Multi-file Lean proofs: let the agent structure its proof across modules
tadamcz Jun 7, 2026
c818f26
delete README
tadamcz Jun 7, 2026
bcd251e
Multi-file proofs: address review (single spec path, dead Dockerfile …
tadamcz Jun 7, 2026
f15cc55
Multi-file proofs: capture submission_contents in the scorer, not the…
tadamcz Jun 7, 2026
269416e
Run prover agent via as_solver so its conversation reaches the log
tadamcz Jun 7, 2026
c8af475
Drop vestigial OEIS sample metadata, keep oeis_id
tadamcz Jun 7, 2026
85b0808
test_oeis_isolation: drive Docker via the Inspect sandbox lifecycle, …
tadamcz Jun 7, 2026
247d8a7
Strip the license banner at the dataset source, not downstream
tadamcz Jun 7, 2026
1e40775
Warn at run time when a conjecture had multiple upstream formalizations
tadamcz Jun 7, 2026
0fa139d
Extract the multi-formalization warning into a helper
tadamcz Jun 7, 2026
ef72dca
rename
tadamcz Jun 7, 2026
c1df312
bump_version: also bump the project version in uv.lock
tadamcz Jun 7, 2026
d897f93
Bump version to 0.1.4rc2
tadamcz Jun 7, 2026
379724a
Add gold-proof e2e regression test; vendor gold proofs; fix docker-te…
tadamcz Jun 7, 2026
8149e38
Add agent-perspective e2e Lean soundness suite (tests/test_lean_vuln_…
tadamcz Jun 7, 2026
7471c96
Revert to single-file proofs to close the trusted-helper hole
tadamcz Jun 8, 2026
65afd6b
Bump version to 0.1.4rc3
tadamcz Jun 8, 2026
25bb864
Add failing (xfail) test for the root-code-exec TCB hole
tadamcz Jun 8, 2026
8bc8d85
Compile submissions in a separate untrusted sandbox, not the scorer
tadamcz Jun 8, 2026
86becad
Drop Zip-Slip mentions: GNU tar -x strips '..', so it was never real
tadamcz Jun 8, 2026
31707f6
Add a working_limit and a `resources` budget tool for the agent
tadamcz Jun 9, 2026
eae7d7f
Stop dropping single-file arxiv papers; rebuild corpus (0.1.4rc4)
tadamcz Jun 10, 2026
d8e3bf8
Tell the agent the corpus has ~475k papers, not ~200k
tadamcz Jun 10, 2026
be31378
Add jq to the agent workspace (0.1.4rc5)
tadamcz Jun 13, 2026
412a70c
hand-write prompt, cutting all the AI slop
tadamcz Jun 13, 2026
e9e1a51
encouragement
tadamcz Jun 13, 2026
24bf5e1
default gated to True
tadamcz Jun 13, 2026
26c3ed5
Add markdown backticks to code tokens in prompts
tadamcz Jun 13, 2026
938f8ff
comment
tadamcz Jun 13, 2026
e8d6eb5
sage
tadamcz Jun 13, 2026
0f6bad8
rg jq
tadamcz Jun 13, 2026
b670f9a
rg jq
tadamcz Jun 13, 2026
cbe5c9f
backticks
tadamcz Jun 13, 2026
ce2b28d
cheat
tadamcz Jun 13, 2026
08d3c9f
bump checker timeout to 30 minutes, many legitimate proofs seem to go…
tadamcz Jun 13, 2026
db3c77b
advice numerics
tadamcz Jun 13, 2026
fc654e4
prompt
tadamcz Jun 13, 2026
962cf46
remove AI slop from tool descriptions
tadamcz Jun 13, 2026
b2bf8fa
consistently install rg, bump version
tadamcz Jun 13, 2026
957b3a9
prompt order
tadamcz Jun 13, 2026
59148d7
newlines
tadamcz Jun 13, 2026
b3fa38a
newlines
tadamcz Jun 13, 2026
9f9d83c
Add lite subset: 100 randomly drawn OEIS conjectures
tadamcz Jun 20, 2026
ce3ba7c
Disproof check: negate the whole statement instead of NNF
tadamcz Jun 20, 2026
7708df9
Delete stale user_prompt tests out of sync with the prompt
tadamcz Jun 20, 2026
d2e3773
Bump version to 0.1.4rc7
tadamcz Jun 20, 2026
042e7a7
Add --parallel flag to extract_plaintext.py
tadamcz Jun 20, 2026
5ff5a1c
Add eval cost analysis from token usage
tadamcz Jun 20, 2026
62542a1
Show the exact negateExpr source in the disproof prompt; update NOTICE
tadamcz Jun 20, 2026
f764b4f
wording
tadamcz Jun 20, 2026
3b61ed7
cut
tadamcz Jun 20, 2026
d618630
Rename OEIS subsets to tsoukalas_proved_38 / tsoukalas_unproved_40
tadamcz Jun 20, 2026
9769004
resources tool: report the cost limit alongside tokens and time
tadamcz Jun 20, 2026
be2ce4f
possibly better wording
tadamcz Jun 20, 2026
05c995e
Treat oversized agent artifacts as verdicts, not sample errors
tadamcz Jun 21, 2026
804b27e
explicitly say "Token cost" instead of "Cost" in resources tool
tadamcz Jun 21, 2026
bf87b01
Give the resource-limit message for all too-expensive verdicts, not j…
tadamcz Jun 21, 2026
ce73270
word
tadamcz Jun 21, 2026
806808f
Add OEIS raw-data fetch script and downloaded records + history
tadamcz Jun 23, 2026
5821db1
Add OEIS conjecture provenance and citation metadata
tadamcz Jun 24, 2026
85e7314
add hawk download script
tadamcz Jul 21, 2026
83c4ea1
Add sample-level parallelism to extract_plaintext
tadamcz Jul 21, 2026
f29469b
Merge upstream PortBench improvements to hawk_download_eval_set
tadamcz Jul 21, 2026
42ac694
Add arXiv 2605.13171v1 TeX source
tadamcz Jul 24, 2026
f257c11
Remove unused model override from lean_prover
tadamcz Jul 24, 2026
25ed32b
Make all lean_prover arguments required
tadamcz Jul 24, 2026
8fe3b84
Split dataset-neutral isolation engine out of the OEIS scripts
tadamcz Jul 25, 2026
8f055d9
Add FC100OpenSet1 task: apn_fc100open (86 samples)
tadamcz Jul 25, 2026
a7816c0
Remove the FC100 smoke subset
tadamcz Jul 25, 2026
e00baa4
start removing a bit of AI slop
tadamcz Jul 25, 2026
f504c73
start removing a bit of AI slop
tadamcz Jul 27, 2026
27605da
start removing a bit of AI slop
tadamcz Jul 27, 2026
8c45405
remove a bit of AI slop
tadamcz Jul 27, 2026
f045413
remove a bit of AI slop
tadamcz Jul 27, 2026
e45a84c
remove a bit of AI slop
tadamcz Jul 27, 2026
327b3cc
remove a bit of AI slop
tadamcz Jul 27, 2026
940d4e6
remove a bit of AI slop
tadamcz Jul 27, 2026
70fe3b1
remove a bit of AI slop
tadamcz Jul 27, 2026
0175530
remove outdated TODO
tadamcz Jul 27, 2026
2ab2cad
Stop tracking arxiv-2605.13171v1 and arxiv-2605.22763v1
tadamcz Jul 27, 2026
ecd1f74
remove @develop from example-eval-set.yml
tadamcz Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
100 changes: 73 additions & 27 deletions .github/workflows/build-docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ jobs:
echo "Could not read apn.__version__" >&2
exit 1
fi
git_hash="$(git rev-parse HEAD)"
{
echo "BASE_IMAGE_TAG=LeanOpenProblems_base_${image_version}_${git_hash}"
echo "AGENT_IMAGE_TAG=LeanOpenProblems_agent_${image_version}_${git_hash}"
echo "SCORER_IMAGE_TAG=LeanOpenProblems_scorer_${image_version}_${git_hash}"
echo "BASE_IMAGE_TAG=LeanOpenProblems_base_${image_version}"
echo "CORPUS_IMAGE_TAG=LeanOpenProblems_corpus_${image_version}"
echo "AGENT_IMAGE_TAG=LeanOpenProblems_agent_${image_version}"
echo "AGENT_CORPUS_IMAGE_TAG=LeanOpenProblems_agent_corpus_${image_version}"
echo "SCORER_IMAGE_TAG=LeanOpenProblems_scorer_${image_version}"
} >> "$GITHUB_ENV"

- name: Setup buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Login to ECR
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
Expand All @@ -50,7 +54,7 @@ jobs:
id: image_tags
run: |-
repository="${IMAGE_NAME#*/}"
for image in base agent scorer; do
for image in base corpus agent agent_corpus scorer; do
tag_var="${image^^}_IMAGE_TAG"
tag="${!tag_var}"
if aws ecr describe-images \
Expand All @@ -66,48 +70,90 @@ jobs:
- name: Set reproducible build timestamp
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> "$GITHUB_ENV"

- name: Prepare base image
if: >-
steps.image_tags.outputs.base_exists != 'true' ||
steps.image_tags.outputs.agent_exists != 'true' ||
steps.image_tags.outputs.scorer_exists != 'true'
# The three images are stages of the single apn/lean/Dockerfile (which
# docker compose also builds on the fly for local runs). The base stage
# is pushed as its own image so that later CI runs can skip the
# expensive Lean + Mathlib build: the agent/scorer builds override the
# `base` stage with the pushed image via a named build context.
#
# Layer caches are pushed to ECR_CACHE_REGISTRY (mode=max: all layers,
# including intermediate stages), keyed by image tag like PortBench --
# ECR tags are immutable, so the cache ref must change with the version.
- name: Build and push base image
if: steps.image_tags.outputs.base_exists != 'true'
working-directory: apn/lean
run: |-
if [ "${{ steps.image_tags.outputs.base_exists }}" = "true" ]; then
docker pull "${IMAGE_NAME}:${BASE_IMAGE_TAG}"
docker tag "${IMAGE_NAME}:${BASE_IMAGE_TAG}" apn-lean-base
else
docker build \
-t apn-lean-base \
-t "${IMAGE_NAME}:${BASE_IMAGE_TAG}" \
-f Dockerfile.base \
.
docker push "${IMAGE_NAME}:${BASE_IMAGE_TAG}"
fi
docker buildx build \
--target base \
--cache-from "type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${BASE_IMAGE_TAG}" \
--cache-to "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${BASE_IMAGE_TAG}" \
--push \
-t "${IMAGE_NAME}:${BASE_IMAGE_TAG}" \
.

# The corpus stage is self-contained (FROM debian, downloads pinned public
# HF datasets) and frozen at a 2022 snapshot, so it's built once and reused
# across versions via the registry cache -- no base build context needed.
- name: Build and push corpus image
if: steps.image_tags.outputs.corpus_exists != 'true'
working-directory: apn/lean
run: |-
docker buildx build \
--target corpus \
--cache-from "type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${CORPUS_IMAGE_TAG}" \
--cache-to "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${CORPUS_IMAGE_TAG}" \
--push \
-t "${IMAGE_NAME}:${CORPUS_IMAGE_TAG}" \
.

- name: Build and push agent image
if: steps.image_tags.outputs.agent_exists != 'true'
working-directory: apn/lean
run: |-
docker build \
docker buildx build \
--target agent \
--build-context "base=docker-image://${IMAGE_NAME}:${BASE_IMAGE_TAG}" \
--cache-from "type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${AGENT_IMAGE_TAG}" \
--cache-to "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${AGENT_IMAGE_TAG}" \
--push \
-t "${IMAGE_NAME}:${AGENT_IMAGE_TAG}" \
-f Dockerfile.agent \
.
docker push "${IMAGE_NAME}:${AGENT_IMAGE_TAG}"

# agent_corpus = agent + the corpus layer; override both upstream stages
# with their pushed images so neither is rebuilt here.
- name: Build and push agent_corpus image
if: steps.image_tags.outputs.agent_corpus_exists != 'true'
working-directory: apn/lean
run: |-
docker buildx build \
--target agent_corpus \
--build-context "base=docker-image://${IMAGE_NAME}:${BASE_IMAGE_TAG}" \
--build-context "agent=docker-image://${IMAGE_NAME}:${AGENT_IMAGE_TAG}" \
--build-context "corpus=docker-image://${IMAGE_NAME}:${CORPUS_IMAGE_TAG}" \
--cache-from "type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${AGENT_CORPUS_IMAGE_TAG}" \
--cache-to "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${AGENT_CORPUS_IMAGE_TAG}" \
--push \
-t "${IMAGE_NAME}:${AGENT_CORPUS_IMAGE_TAG}" \
.

- name: Build and push scorer image
if: steps.image_tags.outputs.scorer_exists != 'true'
working-directory: apn/lean
run: |-
docker build \
docker buildx build \
--target scorer \
--build-context "base=docker-image://${IMAGE_NAME}:${BASE_IMAGE_TAG}" \
--cache-from "type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${SCORER_IMAGE_TAG}" \
--cache-to "mode=max,image-manifest=true,oci-mediatypes=true,type=registry,ref=${{ vars.ECR_CACHE_REGISTRY }}:${SCORER_IMAGE_TAG}" \
--push \
-t "${IMAGE_NAME}:${SCORER_IMAGE_TAG}" \
-f Dockerfile.scorer \
.
docker push "${IMAGE_NAME}:${SCORER_IMAGE_TAG}"

- name: Report image repository
run: |-
echo "LEAN_OPEN_PROBLEMS_IMAGE_NAME=${IMAGE_NAME}"
echo "Base image: ${IMAGE_NAME}:${BASE_IMAGE_TAG}"
echo "Corpus image: ${IMAGE_NAME}:${CORPUS_IMAGE_TAG}"
echo "Agent image: ${IMAGE_NAME}:${AGENT_IMAGE_TAG}"
echo "Agent-corpus image: ${IMAGE_NAME}:${AGENT_CORPUS_IMAGE_TAG}"
echo "Scorer image: ${IMAGE_NAME}:${SCORER_IMAGE_TAG}"
61 changes: 61 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Checks

on:
pull_request:
push:
branches:
- main

jobs:
# The CI image tags (LeanOpenProblems_*_<version>) are keyed on
# apn.__version__, while the wheel build uses pyproject.toml's version. The two
# must stay in lockstep (scripts/bump_version.py edits both) -- this guards
# against a bump that touches only one of them.
check-version:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: uv.lock

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml

- name: Check apn.__version__ matches pyproject.toml
run: |-
version_from_init="$(python -c "import apn; print(apn.__version__)")"
echo "Version from apn/__init__.py: $version_from_init"
version_from_pyproject="$(uv version --short)"
echo "Version from pyproject.toml: $version_from_pyproject"
if [ "$version_from_init" != "$version_from_pyproject" ]; then
echo "Version mismatch between apn/__init__.py and pyproject.toml"
exit 1
fi

tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: uv.lock

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml

- name: Install dependencies
run: uv sync

- name: Run tests
run: uv run pytest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ logs/
.inspect/
configs/history/

# Lean build artifacts (the lake projects ship source only; Docker builds them).
.lake/
apn/lean/extract_ranges/lake-manifest.json

# Cloned upstream sources kept for reference, not part of the repo
reference_sources/

Expand Down
Loading
Loading