remove unreachable!(), improve panic messages, fix tautological test#139
Open
anaslimem wants to merge 1 commit intoagentclientprotocol:mainfrom
Open
remove unreachable!(), improve panic messages, fix tautological test#139anaslimem wants to merge 1 commit intoagentclientprotocol:mainfrom
anaslimem wants to merge 1 commit intoagentclientprotocol:mainfrom
Conversation
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
unreachable!()from retry loop (mcp_bridge.rs): Refactoredconnect_with_retryto use alast_erroraccumulator, eliminating theunreachable!()macro and replacing it with a real error return. The logic is now self-evident without tracing the loop.trace-viewer/lib.rs): Changed four bare.unwrap()calls onMutex::lock()to.expect("events mutex poisoned"). Same behaviour, but a crash now tells you exactly what failed instead of a generic Rust internal message.simple_agent.rs): Replaced the"TODO"literal in the dispatch error handler with"unhandled message"a string safe to ship and accurate for users who copy this example.assert!→debug_assert!for internal invariant (conductor.rs):assert!(self.proxies.is_empty())was firing in release builds. Changed todebug_assert!since this guards an internal precondition, not user input catches bugs in development without hard-crashing production.jsonrpc_error_handling.rs):assert!(result.is_ok() || result.is_err())is always true and validates nothing. Replaced withassert!(result.is_ok(), ...)so when issue docs: add missing READMEs for sacp-tee, sacp-test, and yopo crates #64 is fixed and the#[ignore]is removed, the test actually guards the intended behaviour.