Location
src/relay.rs — relay::Error (4 variants: Closed, NotConnected, Timeout, PayloadTooLarge); src/error.rs — the crate-level Error enum and its kind() method; src/adapt.rs — the two call sites that do .kind().unwrap_or(crate::relay::Error::Closed).
Problem
The crate maintains two separate error enums: the small relay::Error (the RELAY-sentinel-shaped one, 4 variants) and a richer crate-level Error with additional LIN-specific variants including InvalidFrame. Error::kind() maps most of the crate-level variants back onto a relay::Error sentinel, but InvalidFrame isn't mapped to anything — it falls through to None. In the adapter, when a structural conversion failure occurs (a bad frame ID or wrong protocol produces an InvalidFrame), the code does .kind().unwrap_or(crate::relay::Error::Closed), so that None gets converted to Closed. A caller then sees an error that looks like "the bus is closed" for what was actually a bad-ID or malformed-input failure — a misleading sentinel, since Closed specifically implies a closed bus/subscription, not a structural validation failure.
Suggested fix
Map structural failures to a distinct relay::Error condition (an invalid-frame-shaped sentinel) rather than falling back to Closed, so callers doing sentinel-based error handling get an accurate signal instead of a misleading "bus closed" result.
Filed from the 2026-07-29 ecosystem audit register; independently re-verified against current HEAD before filing.
Location
src/relay.rs—relay::Error(4 variants: Closed, NotConnected, Timeout, PayloadTooLarge);src/error.rs— the crate-levelErrorenum and itskind()method;src/adapt.rs— the two call sites that do.kind().unwrap_or(crate::relay::Error::Closed).Problem
The crate maintains two separate error enums: the small
relay::Error(the RELAY-sentinel-shaped one, 4 variants) and a richer crate-levelErrorwith additional LIN-specific variants includingInvalidFrame.Error::kind()maps most of the crate-level variants back onto arelay::Errorsentinel, butInvalidFrameisn't mapped to anything — it falls through toNone. In the adapter, when a structural conversion failure occurs (a bad frame ID or wrong protocol produces anInvalidFrame), the code does.kind().unwrap_or(crate::relay::Error::Closed), so thatNonegets converted toClosed. A caller then sees an error that looks like "the bus is closed" for what was actually a bad-ID or malformed-input failure — a misleading sentinel, sinceClosedspecifically implies a closed bus/subscription, not a structural validation failure.Suggested fix
Map structural failures to a distinct
relay::Errorcondition (an invalid-frame-shaped sentinel) rather than falling back toClosed, so callers doing sentinel-based error handling get an accurate signal instead of a misleading "bus closed" result.Filed from the 2026-07-29 ecosystem audit register; independently re-verified against current HEAD before filing.