Skip to content

Compile every generated certificate in CI ​

Decision ​

CI asks Lean to compile both the translation and the certificate whenever the TypeScript or Go certifier reports coverage in the checked corpus. A certificate that covers only some functions must compile too. The certifier's success message and the manifest's proved status do not replace this check.

The existing certify jobs check TypeScript's translation, certificate and parser acceptance corpora. They also check five programs from the generator that the interpreter tests use, with seeds 20261130 through 20261134. The existing other job checks Go's translation corpus and certified projects. It now also attempts certification on Go's parser acceptance corpus and five differential programs with seed 20261130. The differential generator has a certificate-only mode, so this sample does not repeat the runtime checks. Each Go program gets its own certificate. These larger generated functions keep Lean's default elaboration budget, as the corpus checks do. Both jobs feed the required check status. We add no required context.

Known failures ​

The fixtures in tests/certificates reproduce issues #395, #396, #399, #402, #403, #405, #406 and #409. Issue #402 describes its input rather than quoting the file, so its fixture reconstructs the Boolean slice and OR loop. tests/certificates/expected-failures.tsv names each source and its issue. The fixed differential sample exposed another link-proof failure, which issue #410 tracks. Its entries name seed 20261130 and program indices 1, 2 and 4 instead of a source path. Only Lean's rejection of the certificate counts as an expected failure. Translation failures, generation refusals and compiler crashes still fail. When Lean accepts a listed certificate, CI fails and asks the fixing PR to remove the entry. Unlisted certificate failures always fail.

Cost and cache ​

The existing checks already compile the TypeScript translation corpus and Go translation certificates. The added work checks parser fixtures, eight issue repros and the fixed differential samples. A local cold check of the TypeScript additions took about two minutes. The Go sample took about a minute and a half, and the entire Go corpus check took three minutes and seventeen seconds. Even if we count all of that existing Go work as new, the total stays below eight minutes on this machine. CI runs the TypeScript shards and Go checks in parallel. We target less than ten minutes of added CI time rather than expanding the random sample without a bound.

The check caches successful translation and certificate oleans under .lake/certificate-check. Its cache identity includes the generated files, the translator binary, the Lean toolchain and every Lean source under tolean. Changes to the proof library therefore invalidate old successes. Actions restores these caches separately from the library build cache. Expected failures never use a cached success.

The TypeScript interpreter's hand-written fixtures live inside the runtime test suite. We do not extract that suite as part of this change. Its existing runtime checks remain unchanged.

This page is docs/decisions/2026-11-30-compile-covered-certificates.md at commit 5f1d031.