Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions runtime/conformance/reports/rust.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@
"proven_by": [
"handshake-comline2/hello",
"handshake-comline2/hello-symmetric-wide",
"handshake-comline2/hello-subset",
"handshake-comline2/hello-empty",
"handshake-comline2/answer-accept",
"handshake-comline2/answer-refuse",
Expand Down Expand Up @@ -525,6 +526,8 @@
"handshake-comline2/offer-same-version-differs-warn",
"handshake-comline2/offer-unknown-protocol",
"handshake-comline2/offer-only-unknown-protocols",
"handshake-comline2/offer-subset-offered",
"handshake-comline2/offer-subset-local",
"handshake-comline2/offer-package-mismatch",
"handshake-comline2/offer-encoding-mismatch",
"handshake-comline2/offer-exchange-mismatch",
Expand All @@ -538,18 +541,22 @@
"handshake-comline2/conclude-same-version-differs-warn",
"handshake-comline2/conclude-protocol-refused",
"handshake-comline2/conclude-refused",
"handshake-comline2/conclude-subset",
"handshake-comline2/conclude-answer-beyond-offer",
"handshake-comline2/conclude-malformed",
"handshake-comline2/conclude-exchange-mismatch",
"handshake-comline2/symmetric-accept",
"handshake-comline2/symmetric-initiator-degrade",
"handshake-comline2/symmetric-responder-newer-consumer-refuse",
"handshake-comline2/symmetric-line-mismatch",
"handshake-comline2/symmetric-unknown-protocol",
"handshake-comline2/symmetric-subset-local",
"handshake-comline2/symmetric-same-version-differs-warn",
"handshake-comline2/symmetric-exchange-mismatch",
"handshake-comline2/symmetric-peer-refused",
"handshake-comline2/finish-accept",
"handshake-comline2/finish-accept-refusing",
"handshake-comline2/finish-refused-unlisted",
"handshake-comline2/finish-refused"
]
},
Expand Down
34 changes: 33 additions & 1 deletion runtime/conformance/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ proven, the formats of these files, and the catalog of names they share. A runti
tool implements against this repository, and pins it like any other
dependency. Comline's own runtimes do the same.

Version: **0.11** ([`VERSION`](VERSION)). While Comline is in its early days
Version: **0.12** ([`VERSION`](VERSION)). While Comline is in its early days
(0.x), a minor version may change anything, and the change is named in the
pull request that makes it and in [the changes](#changes) below.

Expand Down Expand Up @@ -229,6 +229,38 @@ What an implementation answers, and how its answers are judged:

### Changes

- **0.12:** `comline@2` cases for a Hello that lists a subset of the package's
protocols (named connections, specification#13): an end provides some of the
package's protocols and calls some of the other side's, and its Hello lists
exactly those. No existing case changes. New cases, all in
`handshake-comline2`:
- `hello-subset`: the `hello` case's bytes with protocol 0's entry gone and
the count one. `hello` is the default, a Hello that lists every protocol on
the package's connection: its bytes are what they were.
- `offer-subset-offered`: the offer lists protocol 0 alone, and the responder,
which also has protocol 1, answers only what was offered. Under
`scope = protocol` its result has protocol 1 refused on its own
(`unknown_protocol`): calls to it fail locally.
- `offer-subset-local`: the responder lists protocol 1 alone and the offer
both, so protocol 0 is refused (`unknown_protocol`) in the answer and the
responder's result has no protocol 0.
- `conclude-subset`: the initiator offered protocol 0 alone and the answer
takes it. `conclude-answer-beyond-offer`: an answer that also names
protocol 1, which the offer didn't list, is `malformed`.
- `symmetric-subset-local`: an end listing protocol 0 alone, against a peer
that lists both: its verdict refuses protocol 1, and its result has no
protocol 1.
- `finish-refused-unlisted`: the peer's verdict refuses protocol 1, which this
end never listed, and what this end agreed doesn't change.

A protocol a result doesn't hold, and one it holds as refused, are the ones
whose calls fail locally (`Unavailable`) and that `provide` refuses on a
connection that ran a Hello. That behaviour is the runtime's, not a message or
a negotiation step, so no case states it: the ops have nothing to ask a
runtime about a call or about providing (runtime#124 holds it in the
runtime's own tests, and
[specification#13](https://github.com/ComlineProject/specification/issues/13)
the question of whether the corpus should).
- **0.11:** a framing states `protocol`: `named`, when a request's frame names the
protocol it calls into, by number or wire id, so several protocols can share one
transport, or `unnamed`, when it doesn't and a call names only its function. A
Expand Down
2 changes: 1 addition & 1 deletion runtime/conformance/spec/REV
Original file line number Diff line number Diff line change
@@ -1 +1 @@
69882e92971e243b6b74a539a13b534d95b3abf7
3254e0ea0edc8537df453db5ee647cd63715ffe2
2 changes: 1 addition & 1 deletion runtime/conformance/spec/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11
0.12
2 changes: 1 addition & 1 deletion runtime/conformance/spec/catalog/encodings.cue
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ encodings: {
}
"datagram@1": {
kind: "framing"
title: "datagram"
title: "datagram@1"
description: "Comline's own binary framing of requests and responses."
aliases: ["datagram", "comline.datagram"]
frozen_as: "datagram"
Expand Down
2 changes: 1 addition & 1 deletion runtime/conformance/spec/catalog/gen/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@
"datagram@1": {
"kind": "framing",
"status": "stable",
"title": "datagram",
"title": "datagram@1",
"description": "Comline's own binary framing of requests and responses.",
"aliases": [
"datagram",
Expand Down
110 changes: 107 additions & 3 deletions runtime/conformance/spec/compiler/cases/bounded.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
},
{
"path": "src/api.ids",
"text": "use models::Blob\n\nprotocol Orders {\n function send(b: Blob);\n}\n"
"text": "use package::models::Blob\n\nprotocol Orders {\n function send(b: Blob);\n}\n"
}
],
"dependencies": []
Expand Down Expand Up @@ -295,7 +295,7 @@
},
{
"path": "src/api.ids",
"text": "use models::Blob\n\n@unverified = \"orders carry the upload\"\nprotocol Orders {\n function send(b: Blob);\n}\n"
"text": "use package::models::Blob\n\n@unverified = \"orders carry the upload\"\nprotocol Orders {\n function send(b: Blob);\n}\n"
}
],
"dependencies": []
Expand Down Expand Up @@ -354,7 +354,7 @@
},
{
"path": "src/api.ids",
"text": "use models::Blob\n\nprotocol Orders {\n function send(b: Blob);\n}\n"
"text": "use package::models::Blob\n\nprotocol Orders {\n function send(b: Blob);\n}\n"
}
],
"dependencies": []
Expand All @@ -371,6 +371,110 @@
"builds": true,
"diagnostics": []
}
},
{
"id": "bounded/unreached-unmarked",
"description": "a struct no protocol reaches, with a string without a maximum, is an error: it is a type another package can use",
"packages": [
{
"name": "app",
"config": "congregation app\nspecification_version = 1\n",
"schemas": [
{
"path": "src/models.ids",
"text": "struct Blob {\n data: string\n}\n"
}
],
"dependencies": []
}
],
"build": "app",
"expect": {
"builds": false,
"diagnostics": [
{
"code": "bounds::unbounded",
"severity": "error"
}
]
}
},
{
"id": "bounded/unreached-list-unmarked",
"description": "a struct no protocol reaches, with a list without a maximum, is an error too",
"packages": [
{
"name": "app",
"config": "congregation app\nspecification_version = 1\n",
"schemas": [
{
"path": "src/models.ids",
"text": "struct Blob {\n data: u8[]\n}\n"
}
],
"dependencies": []
}
],
"build": "app",
"expect": {
"builds": false,
"diagnostics": [
{
"code": "bounds::unbounded",
"severity": "error"
}
]
}
},
{
"id": "bounded/unreached-allowed-still-unmarked",
"description": "allowing @unverified in the package doesn't cover a type no protocol reaches: nothing marked it",
"packages": [
{
"name": "app",
"config": "congregation app\nspecification_version = 1\nsettings = { annotations = { unverified = { allowed = true } } }\n",
"schemas": [
{
"path": "src/models.ids",
"text": "struct Blob {\n data: string\n}\n"
}
],
"dependencies": []
}
],
"build": "app",
"expect": {
"builds": false,
"diagnostics": [
{
"code": "bounds::unbounded",
"severity": "error"
}
]
}
},
{
"id": "bounded/unreached-bounded",
"description": "a struct no protocol reaches, bounded, gives nothing up and builds",
"packages": [
{
"name": "app",
"config": "congregation app\nspecification_version = 1\n",
"schemas": [
{
"path": "src/models.ids",
"text": "struct Blob {\n data: char[max 64]\n tags: u8[max 16]\n}\n"
}
],
"dependencies": []
}
],
"build": "app",
"expect": {
"protocols": [],
"builds": true,
"diagnostics": []
}
}
]
}
Loading
Loading