Skip to content

Surface lockstep backend errors instead of folding them into a short trace - #56

Merged
harshverma27 merged 1 commit into
mainfrom
claude/issue-46-fix
Jun 30, 2026
Merged

harshverma27 merged 1 commit into
mainfrom
claude/issue-46-fix

Conversation

@harshverma27

Copy link
Copy Markdown
Owner

Summary

  • Fixes lockstep collect() swallows backend errors and reports false divergence #46
  • lockstep::collect() treated a backend Err the same as a clean Ok(None) end-of-stream, silently truncating the ObservationTrace. compare() would then report the truncated trace as an ordinary Diverged result, indistinguishable from a real behavioral divergence — masking the actual observation failure.
  • collect() now returns Result<ObservationTrace, HilError>: Ok(None)/timeout still end the loop normally (a partial trace is expected and valid), but a backend Err propagates as Err instead of being folded into a misleadingly short trace.
  • Updated nucleus-cli's run_lockstep to handle the new Result return, reporting a backend failure distinctly from a real divergence.
  • Updated the QEMU e2e test (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_none and collect_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

…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.
@harshverma27
harshverma27 merged commit b5cd699 into main Jun 30, 2026
5 checks passed
@harshverma27
harshverma27 deleted the claude/issue-46-fix branch June 30, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lockstep collect() swallows backend errors and reports false divergence

2 participants