ci(certora): retry transient Certora cloud errors in nightly - #774
ci(certora): retry transient Certora cloud errors in nightly#774alcueca wants to merge 1 commit into
Conversation
The nightly-certora suite intermittently reddens (and pages Slack) when Certora's
cloud fails to RETURN results ("request failed" / "Could not find job results")
even though the proof itself passed ("No errors found by Prover!"). certoraRun
exits non-zero on that backend blip, which at the run level is indistinguishable
from a real violation. Seen 2026-08-05 (all 10 jobs) and 2026-08-07 (1 job), both
on unchanged commit 39f9d31 that passed on adjacent nights.
Wrap certoraRun in a retry that fires ONLY on the transient retrieval errors
(matched by pattern), up to 3 attempts with 60s backoff. Real rule violations do
not match the pattern and fail fast — no wasted re-proofs. Output is streamed live
(tee) while captured for matching. A persistent outage still fails after the
retries, so genuine problems are never masked.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR adds bounded retries around nightly Certora runs to tolerate known cloud result-retrieval failures while preserving synchronous verdict handling.
Confidence Score: 4/5The PR appears safe to merge, with a non-blocking recommendation to narrow the transient-error pattern so unrelated failures still fail fast. The retry remains bounded and ultimately propagates the original nonzero Certora status, but the generic Files Needing Attention: .github/workflows/nightly-certora.yml Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Run certoraRun and capture output] --> B{Exit code zero?}
B -->|Yes| C[Return success]
B -->|No| D{Attempts exhausted or no regex match?}
D -->|Yes| E[Return certoraRun failure]
D -->|No| F[Wait 60 seconds]
F --> A
Reviews (1): Last reviewed commit: "ci(certora): retry transient Certora clo..." | Re-trigger Greptile |
| # fast (no wasted re-proofs). | ||
| MAX_ATTEMPTS=3 | ||
| RETRY_SLEEP=60 | ||
| TRANSIENT_RE='Could not find job results|request failed|An error occurred' |
There was a problem hiding this comment.
Overbroad transient-error pattern
If a non-transient Certora configuration, compilation, or internal failure emits An error occurred, this generic alternative classifies it as transient and resubmits the complete proof up to two additional times, delaying the nightly failure notification. Restricting the pattern to known result-retrieval errors keeps substantive failures on the intended fail-fast path.
| TRANSIENT_RE='Could not find job results|request failed|An error occurred' | |
| TRANSIENT_RE='Could not find job results|request failed' |
Knowledge Base Used: CI, Testing, and Fuzzing
Problem
nightly-certoraintermittently reddens (and pages Slack) when Certora's cloud fails to return results —certoraRunprintsERROR: request failed/Could not find job resultsand exits non-zero even though the proof itself passed (No errors found by Prover!). At the run level this is indistinguishable from a real rule violation.Observed on unchanged commit
39f9d31(which passed on adjacent nights):main / C), withNo errors found by Prover!right above the retrieval errorFix
Wrap
certoraRunin a retry that fires only on the transient retrieval errors (matched by pattern), up to 3 attempts with 60s backoff:tee) while captured for matching — CI logs unchanged.Validated: YAML parses,
bash -nclean, and a behavioral harness confirmed transient→3 attempts/fail, violation→1 attempt/fail-fast, success→1 attempt.+30/-1, one call site changed (run_certorawraps the direct call).🤖 Generated with Claude Code