docs: document error kinds, typed-error rules, and the decode-tolerance policy - #1850
Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit intoAug 30, 2026
Conversation
…ce policy STYLE.md's error handling section documents the message-formatting conventions but predates two rounds of change in the machinery itself, and it says nothing about the decode-tolerance convention that recent merges made the most exercised rule in ironrdp-pdu. Add three subsections, plus two mirroring bullets in AGENTS.md's Key Style Conventions. Choosing an error kind: the structured DecodeErrorKind/EncodeErrorKind variants carry byte offsets and are constructed through the *_err! macros with in: src; Other is the deliberate offset-less kind for non-stream failures. Error types: typed errors rather than anyhow in library crates, and no proc-macro error derives in core-tier crates, hand-rolling Display and Error per ironrdp-error's own Location-capturing Source pattern. Decoding unknown values: peer advertisements decode with from_bits_retain; negotiation outputs the receiver must implement stay strict; structural discriminants stay strict per the specifications' own drop-the-connection language. Connector-layer error types are deliberately out of scope while the sequence-contract stack reshapes them, and testing guidance is untouched pending the test-centralization series.
Greg Lamberson (glamberson)
deployed
to
llm-providers
August 30, 2026 14:42 — with
GitHub Actions
Active
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Aug 30, 2026
Marc-André Moreau (mamoreau-devolutions)
merged commit Aug 30, 2026
c69a9c6
into
Devolutions:master
43 checks passed
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.
STYLE.md's error handling section documents the message-formatting conventions but predates two rounds of change in the machinery itself, and it says nothing about the decode-tolerance convention that this month's merges made the most exercised rule in ironrdp-pdu. This adds three subsections, plus two mirroring bullets in AGENTS.md's Key Style Conventions.
Choosing an error kind: the structured DecodeErrorKind/EncodeErrorKind variants carry byte offsets and are constructed through the *_err! macros with in: src; Other is the deliberate offset-less kind for non-stream failures (constructors, conversions, state validation).
Error types: typed errors rather than anyhow in library crates, and no proc-macro error derives in core-tier crates, hand-rolling Display and Error per ironrdp-error's own Location-capturing Source pattern.
Decoding unknown values: the taxonomy the recent interop line converged on. Peer advertisements decode with from_bits_retain (unknown bits kept, never fatal, byte-identical re-encode); negotiation outputs the receiver must implement stay strict; structural discriminants stay strict per the specifications' own drop-the-connection language. Precedent: #1144 established retain crate-wide, #1489, #1458, #1536, #1541, #1837, and #1843 through #1847 applied the taxonomy field by field, and #1845 documents the strict half in-code at the server-selected encryption method.
Deliberately out of scope: connector-layer error types, which #1751 and the sequence-contract stack are actively reshaping; nothing here describes them. Testing guidance is also untouched; that conversation belongs with the in-flight test-centralization series.
cargo xtask check fmt/lints/tests/typos/locksall pass (docs-only change).