Repository navigation
Fix vlt backtest flakes on artifact preflight fetch drops - #1154
Merged
Mikola Lysenko (mikolalysenko) merged 1 commit intoOct 8, 2026
Merged
Conversation
The vlt native backtest retries a cell only when the CLI reports a patch-API transport failure. Two other transport failures fall through and fail the job (and its lock-diff, which then compares a refused Linux lock against a patched Windows one): - The hosted artifact preflight's own fetch drops (vlt_preflight.rs "fetch error <e>" / "http 5xx"). The CLI withholds the dep, writes nothing and exits 0, so the cell reads as a safe refusal although the cell's own probe of the same URL verified seconds earlier. The reason is only in the success envelope, which never reached the row. - vlt's own registry fetch times out or resets (ETIMEDOUT, ECONNRESET, EAI_AGAIN, socket hang up). Keep the preflight reasons on the row and treat those two signatures as transient. Deterministic reasons (content-encoding, sha512 mismatch, 4xx, an over-cap body, a non-http URL, ENOTFOUND, ECONNREFUSED) stay final, and a cell that keeps failing still fails after three attempts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhQVTZiJczw9jt27ZysyRy
Collaborator
Author
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 12061bb. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 8, 2026
Collaborator
Author
|
Burn-down agent: labeled Ready for review at head
Generated by Claude Code |
Mikola Lysenko (mikolalysenko)
deleted the
ci-janitor/vlt-backtest-preflight-retry
branch
October 8, 2026 21:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
vlt patch compatibilityis the most re-run workflow in the repo: of its last 500 runs (~36 h), 31 needed a re-run or ended red. Clustering the first-attempt failures, the biggest group is the native backtest (native (…) › Backtest against production) failing on a transport blip that the backtest's own retry does not recognize, and that failure then also turnslock-diffred:BAD 1.0.0-rc.14-hosted-direct: safe-refusal (expected patched) failing=[]vlt-lock.json differs across OS for 1.0.0-rc.14 hosted direct(a cascade: the refused Linux lock compared against a patched Windows lock)BAD 1.0.10-hosted-two-versions: safe-refusal (expected patched) failing=[]vlt install exited 1: … code: 'ETIMEDOUT', syscall: 'connect'and was not retried againlock-difffirst-attempt failures in the window)Each one costs a manual re-run of the failed vlt legs and blocks the PR's compat status until then.
Root cause
run_with_retriesre-runs a cell only whentransient(row)says the failure was transport. It matched just two CLI strings (error sending request for url (,API request failed with status 5xx). Two transport failures slip through:vlt_preflight.rs). Onfetch error <e>orhttp 5xxit withholds the dep withredirect_vlt_artifact_unverifiable("vlt would fail to verify : ; nothing was written …"), writes nothing and exits 0. The backtest then sees no changed files and scores a safe refusal (failing=[]), even though its own probe of the same URL had just verified. Since the run succeeded, the envelope never reached the row (cliFailuresholds only non-zero exits), so no retry could see the reason.ETIMEDOUT,ECONNRESET,EAI_AGAIN,socket hang up), surfacing asRuntimeError: vlt install exited 1: …on the row.Fix
scripts/backtest-vlt.pyonly:Cell.patch_runkeeps everyredirect_vlt_artifact_unverifiabledetail from the scan/get envelope (exit 0 or not) on the row aspreflightFailures.transient()also matches:PREFLIGHT_TRANSPORT_FAILURE:vlt would fail to verify <url>: http 5xxor: fetch error …, except the deterministic fetch errors (too largecap,refusing a non-http(s) artifact URL);VLT_TRANSPORT_FAILURE:ETIMEDOUT/ECONNRESET/EAI_AGAIN/socket hang up.content-encoding <v>(the real BLOCKED case, still handled byblocked_refusal),sha512 mismatch, 4xx,offline,ENOTFOUNDandECONNREFUSED(a wrongly rewritten URL fails that way too).This is the existing narrowly scoped retry (3 attempts, fresh tree each, earlier attempts recorded under
transportRetrieson the row), extended to two more documented transport signatures. A cell that keeps failing still fails, andmatchesExpectationrows never retry. No assertion is weakened and no cell or leg moves.Proof
scripts/tests/test_backtest_harnesses.py(VltRetryTests): each transient preflight reason and network errno retries, each deterministic one does not, and a successful (exit-0) run's preflight reason reachesresult.jsonand the classifier. Without the fix: 10 failures + 1 error; with it: all pass.python3 -B -m unittest discover -s scripts/tests(whatci.ymlruns): 257 tests OK.pathsincludescripts/backtest-vlt.py, so the vlt compatibility workflow runs the full native matrix on this PR.Limitation: the artifact blobs from the failing runs can't be downloaded from this environment, so the exact preflight detail of the two
hosted-*: safe-refusalfailures wasn't read directly. Exit 0 with nothing written andfailing=[]on a must-patch hosted cell, right after the cell's own probe verified the same URL, matches the preflight-withheld path, and both cells passed on re-run against the same binary. I haven't ruled out other exit-0 no-write paths from the logs alone. If a future failure shows a different reason,preflightFailuresnow puts it inresult.json.Where each test still runs
Unchanged: every cell, leg and check runs where it did before (PR, main push, nightly).
🤖 Generated with Claude Code
https://claude.ai/code/session_01MhQVTZiJczw9jt27ZysyRy
Generated by Claude Code