feat(error-trace): parse enriched execute-only failure metadata#233
Merged
Conversation
f5d0ea7 to
5fa86e8
Compare
0xernesto
approved these changes
Jun 23, 2026
| // improves the message/details when the producer supplies it. | ||
| if let Some(er) = parse_execution_result(raw) { | ||
| return Self::from_execute_failure_cause(er.failure_cause as i32); | ||
| let mut trace = Self::from_execute_failure_cause(er.failure_cause as i32)?; |
Contributor
There was a problem hiding this comment.
This still drops enriched messages when failure_cause is 0. The cluster producer sends failure_message for Err(ExecutionError) paths that map to UnspecifiedExecutionFailureCause, so handle non-empty failure_message before returning None and let finalize() drop generic text.
Read optional additive keys (failure_message, exit_code) from the ExecutionResult extra_data shape in from_cluster_extra_data: - failure_message improves message/details (source/kind preserved) - exit_code populates ErrorTrace.exit_code - failure_cause-only payloads parse exactly as before finalize() still redacts + bounds. Keep in sync with network-services copy.
5fa86e8 to
27b6771
Compare
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.
Summary
Adds parser support for enriched execute-only
extra_datainErrorTrace::from_cluster_extra_data.The parser now understands optional additive keys on the
ExecutionResultJSON shape:failure_messageimproves the trace message/details forErr(ExecutionError)failures.exit_codepopulatesErrorTrace.exit_codefor non-zero halt failures.Old
failure_cause-only payloads continue to parse as before.Scope
This is parser support only. It does not emit enriched metadata by itself.
This does not capture guest panic message/location. Capturing that requires a separate
SP1 executor change to preserve guest stderr/panic output.
Validation
cargo test -p spn-network-types error_trace --lib