Repository navigation
fix(canopen): preserve SRDO errors while EMCY is disabled - #461
Conversation
PR SummaryLow Risk Overview
README documents the shared RPDO/SRDO behavior. Tests add unit coverage on the consumer host stub and a wire-level theory for both PDO and SRDO paths. Reviewed by Cursor Bugbot for commit 4204086. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What does this change?
Addresses the disabled-EMCY asymmetry in #434. When 1014h disables the EMCY producer during a run of short SRDO pairs, the consumer now leaves that error available to report on the next short pair after enabling, matching the existing documented RPDO rule. An already reported run stays latched across off/on toggles, and only a complete pair or reconfiguration ends it.
The engine reads the host's actor-owned producer state before consuming its one-report flag. No public API changes. The 1003h error-history item in #434 remains open: it is separately documented as unsupported and is not introduced by this correction.
Type of change
feat— new behaviour (minor release)fix/perf— bug or performance fix (patch release)docs/test/refactor/chore/ci— no release!in the title, plus aBREAKING CHANGE:footer explaining the migration)Checklist
-p:CI=true, test (net10.0),dotnet format --verify-no-changes, and pack +eng/verify-packages.pyall pass locallyValidation includes net48 compilation, engineering checks and requirements traceability. Controlled-clock tests cover disabled/unreported runs, enabling, repeated toggles, valid-pair recovery and a subsequent error. A wire-level RPDO/SRDO theory uses application EMCYs as ordering witnesses to assert the exact error/reset sequence without negative sleeps. Removing the engine gate and forcing the node's host state enabled each produced a failing assertion; sources were restored before the passing suite. Coverage is inspected across all Cobertura type entries for the changed executable lines, including partial branches.