compat: record the v0.1.1 API and wire changes - #23
Conversation
The matrix is generated from the parity harness and shows what a Rust peer observes. It cannot show a Go API change, and it shows a wire change only as a single row. Add a hand-written section for both, starting with v0.1.1: the raw u8 and i8 encodings, the padded-varint rejection, and Event.Dropped. Say plainly that the varint strictness diverges from postcard 1.1.3 rather than matching it. The harness preserves everything from this heading to the end of the file when it regenerates the report.
There was a problem hiding this comment.
🟡 Changes recommended
The new compatibility text contains an incorrect statement about the i8 backward-readability boundary and an inaccurate claim that no in-module types use 8-bit fields.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a hand-maintained compatibility note section to COMPATIBILITY.md to capture v0.1.1 API/wire changes that the generated compatibility matrix can’t represent (Go-only API changes and single-row wire divergences).
Changes:
- Introduces a new “Go API and wire changes” section that is preserved across report regeneration.
- Documents v0.1.1 postcard encoding changes (
u8/i8raw-byte encoding; canonical/strict varint decoding) and thegossip.Event.Droppedfield addition. - Lists additional exported API additions introduced in v0.1.1.
File summaries
| File | Description |
|---|---|
| COMPATIBILITY.md | Adds a preserved, hand-written v0.1.1 compatibility narrative covering Go API additions and specific wire-format divergences. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| where Rust gives `fe`. Any cross-language protocol carrying an 8-bit field | ||
| diverged silently. No type in this module has one, which is why nothing caught | ||
| it. Values below 128 encode identically under both rules, so records written | ||
| before this change are still readable. Proven against Rust output by | ||
| `vectors/postcard-8bit`. |
There was a problem hiding this comment.
Half right, and the half that is right is a real error.
The i8 claim is correct: zigzag and two's complement agree only on zero, so int8(1) was 02 and is now 01. Only u8 below 128 is unchanged. Fixed in 454377e — the sentence now states the two cases separately.
The uint8-wire-types claim does not hold for the two examples given. internal/relayproto.Status is not postcard-encoded; messages.go:110 appends it as a raw byte through the package's own framing. The gossipproto kinds you name are in-process event and command enums, not wire types — the types that cross the wire (TopicMessageKind, DeliveryScopeKind) are uint64. That said, the original sentence claimed more than it could support, so it now says what was actually checked: the postcard-encoded types in this module carry their enums as u64.
Adds a hand-written section to COMPATIBILITY.md for what the generated matrix cannot show: the Go API changes, and the wire changes whose evidence is a single row. Covers the raw u8 and i8 encodings, the padded-varint rejection, stated as a divergence from postcard 1.1.3 rather than a match, and gossip.Event.Dropped. The harness on compat-harness preserves everything from this heading to end of file when it regenerates the report.