Repository navigation
Surface lockstep backend errors instead of folding them into a short trace - #56
Merged
Merged
Conversation
…trace collect() treated a backend Err the same as a clean Ok(None) end-of-stream, producing a truncated ObservationTrace that compare() would report as an ordinary Diverged result -- indistinguishable from a real behavioral difference. collect() now returns Result<ObservationTrace, HilError> so a genuine observation failure surfaces as an error instead of a misleading divergence.
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
lockstep::collect()treated a backendErrthe same as a cleanOk(None)end-of-stream, silently truncating theObservationTrace.compare()would then report the truncated trace as an ordinaryDivergedresult, indistinguishable from a real behavioral divergence — masking the actual observation failure.collect()now returnsResult<ObservationTrace, HilError>:Ok(None)/timeout still end the loop normally (a partial trace is expected and valid), but a backendErrpropagates asErrinstead of being folded into a misleadingly short trace.nucleus-cli'srun_lockstepto handle the newResultreturn, reporting a backend failure distinctly from a real divergence.crates/nucleus-hil/tests/e2e_lockstep_qemu.rs) for the new signature.Test plan
cargo test -p nucleus-hil --lib— 58 passed, including two new regression tests:collect_stops_cleanly_on_ok_noneandcollect_surfaces_backend_error_instead_of_a_false_short_trace.cargo clippy -p nucleus-hil -p nucleus-cli --all-targets -- -D warnings— clean.cargo fmt --all -- --check— clean.Generated by Claude Code