Skip to content

fix(make): build the guest ELFs the prover targets read - #918

Open
Oppen wants to merge 2 commits into
mainfrom
fix/test-elf-deps
Open

fix(make): build the guest ELFs the prover targets read#918
Oppen wants to merge 2 commits into
mainfrom
fix/test-elf-deps

Conversation

@Oppen

@Oppen Oppen commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What

The prover make targets now build every guest ELF the prover suite reads, and a
lint guard keeps that list from drifting.

Why

test-prover, test-prover-all, test-prover-debug, test-prover-cuda and
test-disk-spill depended on compile-recursion-elfs only. Everything else the
suite reads off disk — executor/program_artifacts/rust/*.elf (8 guests, via
std::fs::read) and executor/program_artifacts/asm/*.elf (via
test_utils::run_asm_elf) — was never built, so on a clean checkout those targets
panic with Failed to read ELF / "run make compile-programs-rust". CI does not see
it: its jobs call make compile-programs-rust explicitly first.

test-fast additionally runs -p executor, whose tests/rust.rs reads ~30 of the
Rust guests, so it needs the full set rather than the prover subset.

How

  • PROVER_TEST_GUESTS — the 8 Rust guests prover tests read (allocator,
    commit_sum, ecsm, ef_io_demo, ethrex, hint_min, hint_multi,
    pure_commit) — and compile-prover-test-elfs, which builds those plus the asm
    and recursion guests.
  • Not $(RUST_ARTIFACTS): the .elf rules are FORCE (cargo owns the dep graph),
    so depending on all 35 re-enters cargo 35 times on every local test run.
  • check-prover-test-elfs greps prover/src and prover/tests for
    program_artifacts/rust/*.elf and fails on any name missing from the list. It
    runs from lint, which CI already invokes, and costs one grep. Without it the
    next test that reads a new guest silently reintroduces the failure — which is how
    this got here.

Validation

Clean checkout in a fresh worktree (no program_artifacts/, no shared_target/):

  • make compile-prover-test-elfs → 8 Rust + 9 recursion + 218 asm artifacts, nothing else.
  • make test-prover557 passed, 0 failed, 24 ignored.
  • make lint → clean (includes the new guard).
  • Guard negative test: make check-prover-test-elfs PROVER_TEST_GUESTS="allocator"
    lists the 7 others and exits 1.

Split out of #874 review feedback; no code change, Makefile only.

Oppen added 2 commits August 10, 2026 14:14
test-prover, test-prover-all, test-prover-debug, test-prover-cuda and
test-disk-spill depended on compile-recursion-elfs only, so on a clean
checkout every test reading executor/program_artifacts/rust/*.elf or
*/asm/*.elf panicked with "elf not found". test-fast additionally runs the
executor suite, which reads most of the Rust guests.

compile-prover-test-elfs builds the asm guests, the recursion guests, and the
eight Rust guests the prover suite reads — not all 35, since the .elf rules
are FORCE and would re-enter cargo per guest on every run. check-prover-test-elfs
greps the prover sources and fails if one is missing from the list, so the
next test to read a new guest cannot silently reintroduce the failure; it
runs from lint, which CI already invokes.
The pattern matched [A-Za-z0-9_] only, so a guest directory with a hyphen would
have been skipped silently. Also states what the guard does not cover.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant