Implement IPC error handling and refactor command parsing in StreamFrame#1448
Open
Oluwasuyi-Timilehin wants to merge 1 commit into
Open
Conversation
|
@Oluwasuyi-Timilehin Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
dotandev
approved these changes
Jun 1, 2026
dotandev
left a comment
Owner
There was a problem hiding this comment.
the out file wasn't necessary, I have removed it.
Owner
|
fix ci errors, please. |
Author
|
@dotandev I already fixed CI |
Owner
|
alright, thank you. |
Owner
|
wait, did you just remove the file? there's no file for me to review again? |
Author
|
@dotandev No i just resolved the conflicts |
f6fa2ba to
daabc84
Compare
daabc84 to
25fa305
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.
#closes #1404
PULL REQUEST DOCUMENTATION
================================================================================
TITLE:
fix(ipc): Bubble up IPC parsing errors instead of unwrapping
================================================================================
DESCRIPTION:
Overview
This PR updates
simulator/src/ipc/mod.rsto remove unsafeunwrap()semantics during IPC command handling and serialize/deserialize operations. Instead of panicking, the IPC module now returns a customIpcErrorenum when stdin read, JSON parsing, or response serialization fails.Changes
Core Implementation
IpcErrorto represent IPC-specific IO, parse, and serialization failures.parse_command_frame()to centralize JSON command parsing and return structured errors.handle_stdin_command()to propagate errors throughResult<(), IpcError>rather than silently swallowing or panicking on invalid input.SnapshotRegistrysemantics while making error handling explicit.Testing
test_parse_command_frame_invalid_json_returns_errorfor invalid JSON command parsing.Verification
cargo checkinsimulatorsuccessfully.cargo test -qinsimulatorsuccessfully.Type of Change
Checklist
================================================================================
RELATED ISSUE
#closes