Conversation
A cache hit whose output archive can't be extracted now fails the run with a non-zero exit code and is reported as failed, with its error, in the run summary and `--last-details`. The entry and its archive are removed from the local cache, so the next run misses instead of failing the same way. Remote hits are recorded locally before they're restored, so this covers them too; the next run fetches the remote entry again. Closes #767 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
wan9chi
force-pushed
the
fix-cache-hit-restore-failure
branch
from
September 27, 2026 16:40
8282c74 to
7a0993c
Compare
fspy benchmarklinuxmacoswindows |
This branch has not been deployed
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.
Motivation
When a cache hit's output archive can't be restored, for example because it was deleted or is corrupt,
vp runprints an error but exits 0, and both the summary and--last-detailsreport the task as a cache hit. CI passes without the task's outputs. The broken entry also stays in the cache, so every later run fails the same way untilvp cache clean. Remote hits reach the same state, because they're recorded locally before they're restored.Changes
TaskResult::RestoreFailed. It counts as failed rather than as a hit, sets a non-zero exit code, and--last-detailsshows it as→ Cache hit, but the outputs couldn't be restored(orRemote cache hit) followed by the error and its causes.Cache restore failed: failed to extract the output archive: …instead ofCache lookup failed: …. It no longer suggestsvp cache cleanor names the archive path, because the entry and its archive are removed automatically. That drops theprogram_nameparameter that only fed the hint.NotFoundmiss rather than a key mismatch. After a remote hit, the next run fetches the remote entry again.output_cache_testdeletes the archive of a cached task and checks the failed hit,--last-details, and the next run executing again. This runs on all platforms.remote_cache::restore_failure(ignored and not on Windows, like the other remote backend cases) makes a remote hit's restore fail and checks that the downloaded archive is removed and the next run fetches and restores the entry again.vtt rm --ext <suffix> <dir>removes the archive without hardcoding its name or the cache schema directory.Closes #767