Repository navigation
comline@2: conformance cases for a Hello that lists a subset of the package's protocols (specification#13) - #19
Merged
Conversation
…ackage's protocols (specification#13) (0.12) New handshake-comline2 cases: hello-subset (the exact bytes), offer-subset-offered, offer-subset-local, conclude-subset, conclude-answer-beyond-offer, symmetric-subset-local and finish-refused-unlisted. No existing case changes; hello stays the default Hello that lists every protocol. Calls outside the Hello, providing outside it and the no-Hello case are runtime behaviour the ops can't ask about; the changes entry says so.
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 #13 (the cases the ops can state; see "What the format can't say"). Epic: ComlineProject/core#288. Runtime: ComlineProject/runtime#124. Decision: Named connections (docs#188 records the answers of 2026-11-15).
A connection carries exactly what its Hello lists, and the Hello is built from what a side provides plus what it calls. These cases hold a runtime's
comline@2handshake to that for an end whose Hello lists a subset of the package's protocols. Spec 0.12; no existing case changes and no bytes move.New cases in
handshake-comline2(7)Base package as in the other cases: protocol 0 and protocol 1.
hello-subset(comline2_message): a Hello listing protocol 1 alone, bytes434f02...0101000100b0...0020001. It is thehellocase's bytes with protocol 0's entry gone and the count one, incanonical()order.offer-subset-offered(answer_offer,scope = protocol): the offer lists protocol 0 alone; the responder also has protocol 1. The answer names only what was offered. The responder's result has protocol 1 refused on its own (unknown_protocol), so calls to it fail locally; protocol 0 is accepted.offer-subset-local(answer_offer): the responder lists protocol 1 alone and the offer lists both. Protocol 0, which only the offerer has, is refusedunknown_protocolin the answer; protocol 1 is accepted, and the responder's result has no protocol 0.conclude-subset(conclude_answer): the initiator offered protocol 0 alone and the answer takes it.conclude-answer-beyond-offer(conclude_answer): the initiator offered protocol 0 alone and the answer also names protocol 1, which the offer didn't list:malformed, so a connection can't gain a protocol its Hello didn't list.symmetric-subset-local(judge_hello): an end listing protocol 0 alone against a peer listing both. Its verdict refuses protocol 1 (unknown_protocol) and its result has no protocol 1.finish-refused-unlisted(finish): the peer's verdict refuses protocol 1, which this end never listed, and what this end agreed doesn't change.The default is unchanged
hello(every protocol on the package's connection) is today's bytes and is not touched; the subset's bytes differ from it only by the dropped entry. Nothing duplicates it.What the format can't say
These need an assertion no op makes, so no case states them. I did not add a field; this is the question for the format:
Unavailable), and nothing is sent. A negotiated result shows which protocols an end can call (a protocol absent from it, or refused in it, is onecheck_callrefuses; cases 2, 3 and 6 above show such results), but the ops have no way to ask a runtime to make a call and observe that nothing was written.provide_on). The same: the corpus has no op about providing.comline@1, or opened by hand): there is no negotiated result to hold, so there is nothing to state.runtime#124 holds these in the runtime's own tests. Whether the corpus should state them, as an op over a negotiated result (for example a
comline2_checkop: a negotiated result, a protocol and function, and whether the call is allowed, and likewise for providing), is a format decision I haven't made here.How the bytes were produced
By the Rust reference, as for the other
handshake-comline2cases: the cases were added toruntime/conformance/src/comline2.rsand written withCONFORMANCE_BLESS=1. Every existing case of the feature came out identical. The runtime change that adds them is not proposed yet;vectors_are_currentthere fails until it re-vendors this revision, as for every spec-led change.specs/check.sh --checkis clean; VERSION is 0.12, with its entry in the changes list (andrust/src/catalog.rs'sSPEC_VERSION, regenerated).