Skip to content

compat: record the v0.1.1 API and wire changes - #23

Merged
tmc merged 2 commits into
mainfrom
compat-notes
Sep 4, 2026
Merged

tmc merged 2 commits into
mainfrom
compat-notes

Conversation

@tmc

@tmc tmc commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

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.

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.
Copilot AI lite review requested due to automatic review settings September 4, 2026 05:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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/i8 raw-byte encoding; canonical/strict varint decoding) and the gossip.Event.Dropped field 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.

Comment thread COMPATIBILITY.md Outdated
Comment on lines +140 to +144
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`.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tmc tmc changed the title COMPATIBILITY: record the v0.1.1 API and wire changes compat: record the v0.1.1 API and wire changes Sep 4, 2026
@tmc
tmc merged commit c498acc into main Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants