Repository navigation
refactor(reporter): save errors as a chain of causes - #761
Merged
Merged
Conversation
## Motivation The run summary saved each kind of error in its own way. Task errors used a six-variant enum whose message prefixes were rebuilt by hand when rendering. Upload failures picked their details separately for each client error variant. Task communication errors kept only their top message. #756 adds another set of these rules for remote cache read failures. `SavedError` replaces all of them. It keeps an error's message and the messages of its sources, so any error can be saved without its own conversion. `UploadError` now derives `thiserror`, which exposes its sources. The compact summary still shows only the message. `--verbose` and `--last-details` now show each cause on its own line below it: ``` ⚠ Not uploaded to the remote cache: network error ↳ error sending request for url (http://127.0.0.1:0/projects/test/store) ↳ client error (Connect) ↳ tcp connect error ↳ <os error> ``` The `✗` line printed after a failed task still shows the whole chain on one line. The e2e redaction now also hides OS error messages at the start of a cause line. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fspy benchmarklinuxmacoswindows |
wan9chi
added a commit
that referenced
this pull request
Sep 27, 2026
## Motivation #755 uploads task results to the remote cache, but nothing reads them back. Restoring them lets a task that ran on another machine, or before `vp cache clean`, replay instead of running again. ## Changes - `vt_remote_cache` adds `fetch` (`POST {endpoint}/fetch`), which returns an exact match, a fallback match with its key, or no match, and `download` (`GET {endpoint}/blob/{blob_id}`), which streams the blob's chunks. - After a local miss in `read` or `read-write` mode, `vp run` fetches the entry. An exact entry is validated like a local one. Its archive is downloaded to a `.tmp` file while being checked from the same stream, then renamed, recorded locally, and replayed as a hit. Hits never upload. - A fallback, a failed validation, or a failed read is a miss. If the local cache had an entry, its miss reason stays; otherwise the reason comes from the remote cache, such as `remote cache fetch failed` or `downloaded archive is corrupt`. Read failures aren't warnings, and `--verbose` and `--last-details` show their causes like other errors (#761). After a failed read, the `.tmp` file is removed and nothing is recorded. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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
The run summary saved each kind of error in its own way. Task errors used a six-variant enum whose message prefixes were rebuilt by hand when rendering. Upload failures picked their details separately for each client error variant. Task communication errors kept only their top message. #756 adds another set of these rules for remote cache read failures.
SavedErrorreplaces all of them. It keeps an error's message and the messages of its sources, so any error can be saved without its own conversion.UploadErrornow derivesthiserror, which exposes its sources.The compact summary still shows only the message.
--verboseand--last-detailsnow show each cause on its own line below it:The
✗line printed after a failed task still shows the whole chain on one line. The e2e redaction now also hides OS error messages at the start of a cause line.