Repository navigation
Add bus-fault reporting envelopes to cannet.v1 (ADR 0060 phase 3) - #545
Merged
Merged
Conversation
This was referenced Oct 6, 2026
This was referenced Oct 6, 2026
This was referenced Oct 8, 2026
thebhef
marked this pull request as ready for review
October 14, 2026 21:09
Owner
Author
thebhef
changed the base branch from
task163-fault-model-adr
to
graphite-base/545
October 14, 2026 23:53
ADR 0060 names five wire additions to carry a bus fault as an episode the sidecar reports, not a stream of error-frame rows. This phase adds them to cannet.proto as additive cannet.v1 changes (ADR 0059), picking up tags 14-16 on Envelope.body and new fields on two existing messages: - BusErrorEpisode (tag 14): one episode per interface, with ErrorKindCounts (ack/bit/form/stuff/crc/other/unknown), tx/rx split, TEC/REC and an open flag, per rule 1. - TxRefusals (tag 15): a refused-transmit summary with a TxRefusalReason enum and a flush count/time, per rules 4 and 7. - FramesDropped (tag 16): the data-lane eviction report, per rule 3. - InterfaceState.as_of_ns (tag 6): the heartbeat timestamp, per rule 5. - ConfigureBus.error_row_cap (tag 5, optional uint32): the per-interface error-row cap, per rule 2. Landed on ConfigureBus rather than Subscribe because ConfigureBus is already the client->server message carrying per-interface session configuration (speed, FD) that a client resends on change, for both virtual-bus and physical interfaces; Subscribe carries nothing but an interface id. `buf breaking` against v0.10.0 passes clean. The python gencode is regenerated via scripts/regen-proto-gencode.sh, with one round-trip test per new message added to libs/cannet-python-wire in its existing style. cannet-wire gets matching Rust round-trip tests plus a crate-doc update listing the new variants. cannet-client's and cannet-server's exhaustive matches over Envelope::Body needed a new arm each to stay exhaustive: the BLF-replay and virtual-bus servers (cannet-server) fold the three new server-only-direction variants into their existing "flows the other way" ignore group, and cannet-client's receive loop gets a dedicated log-only arm (decoding them into per-interface state is a later phase). The two existing ConfigureBus construction sites in cannet-client pass error_row_cap: None (no behaviour change; nothing sets a cap yet). No behaviour change beyond compiling against the new types. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
thebhef
force-pushed
the
task163-proto
branch
from
October 14, 2026 23:58
2f46ec6 to
cdadaba
Compare
This was referenced Oct 15, 2026
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.
ADR 0060 names five wire additions to carry a bus fault as an episode
the sidecar reports, not a stream of error-frame rows. This phase adds
them to cannet.proto as additive cannet.v1 changes (ADR 0059), picking
up tags 14-16 on Envelope.body and new fields on two existing messages:
ErrorKindCounts (ack/bit/form/stuff/crc/other/unknown), tx/rx split,
TEC/REC and an open flag, per rule 1.
TxRefusalReason enum and a flush count/time, per rules 4 and 7.
error-row cap, per rule 2. Landed on ConfigureBus rather than
Subscribe because ConfigureBus is already the client->server message
carrying per-interface session configuration (speed, FD) that a
client resends on change, for both virtual-bus and physical
interfaces; Subscribe carries nothing but an interface id.
buf breakingagainst v0.10.0 passes clean. The python gencode isregenerated via scripts/regen-proto-gencode.sh, with one round-trip
test per new message added to libs/cannet-python-wire in its existing
style. cannet-wire gets matching Rust round-trip tests plus a crate-doc
update listing the new variants.
cannet-client's and cannet-server's exhaustive matches over
Envelope::Body needed a new arm each to stay exhaustive: the BLF-replay
and virtual-bus servers (cannet-server) fold the three new
server-only-direction variants into their existing "flows the other
way" ignore group, and cannet-client's receive loop gets a dedicated
log-only arm (decoding them into per-interface state is a later
phase). The two existing ConfigureBus construction sites in
cannet-client pass error_row_cap: None (no behaviour change; nothing
sets a cap yet).
No behaviour change beyond compiling against the new types.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com