test: end-to-end Dispatch round-trip + Kind::resolve (rollout step 7c) - #3
Merged
Conversation
Kind::resolve(&[&str]) -> Option<usize>: a function's position in calls_names(), from Id (direct) or Named (lookup); a dispatcher maps None to RuntimeError::UnknownCall. Unit tests included. tests/dispatch_roundtrip.rs: a hand-written stand-in for comline-rust's output -- an Echo protocol with a client stub and a Dispatch impl, driven directly with MsgPack. Proves the whole contract surface fits together: the ok path, a raised typed error reconstructed client-side via the Envelope ordinal, and an out-of-range Kind -> UnknownCall. Also guard tests/mod.rs's setups module (the std-only setup/ layer) behind feature = "std" so cargo test --no-default-features compiles. All feature configs are green.
Kinflou
force-pushed
the
feat/runtime-dispatch-roundtrip
branch
from
September 1, 2026 14:21
b831892 to
a56aa9f
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.
Follows #2.
Kind::resolve(&[&str]) -> Option<usize>— a function's position in its protocol'scalls_names(), fromId(direct) orNamed(lookup). A generated dispatcher mapsNone→RuntimeError::UnknownCall. Unit-tested.tests/dispatch_roundtrip.rs— a hand-written stand-in for whatcomline-rustwill emit: anEchoprotocol with a client stub + aDispatchimpl, driven directly withMsgPack, no network. Proves the wholecontractsurface (Kind,WireFormat,Dispatch,Envelope,BufMut,CallError) fits together:! TooLongis reconstructed typed on the client from theEnvelopeordinal (CallError::App(SayError::TooLong(..))),Kind→RuntimeError::UnknownCall.tests/mod.rs'ssetups(thestd-onlysetup/layer) behindfeature = "std"—cargo test --no-default-featuresnow compiles.Verified
All feature configs green:
cargo test(9 lib + 3 round-trip + 1 ignored),--no-default-features(2),--features alloc(5).Next (7d)
Start reworking the stubbed
setup/— a realCallSystemthat carries aDispatchand aWireFormat, over the in-memory transport first, then TCP.