Repository navigation
fix(canopen): hold the peer SDO channel across a foreign PDO snapshot - #298
Conversation
ObserveForeignPdoAsync read a peer's COB-IDs and mapping with one public upload each, so another caller to the same peer could take the channel between two of them; the displaced upload was refused as in flight, the observer took that for "live record unavailable", and the observation combined a live COB-ID with the file's mapping. #295. The observer now takes the peer's SDO channel without waiting and holds it for the whole snapshot, as the SRDO observer does since #291: a caller arriving meanwhile is refused as in flight, a safety transaction waits, and a channel busy at the start makes the whole snapshot the file's. The live reads go through the LiveUpload delegate; the match and decode helpers are static over it. Test: A_call_cutting_in_mid_snapshot_is_refused_and_the_snapshot_stays_live (a public upload started in the AfterPdoMatchForTests seam), red on 2d5ba02 with the mapping taken from the file. README, ICanOpenNode and FR-CO-030 say so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PR SummaryMedium Risk Overview
FR-CO-030, Reviewed by Cursor Bugbot for commit 157e7ad. 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?
Closes #295.
ObserveForeignPdoAsyncread a peer's COB-IDs and mapping with one public upload each, so a caller to the same peer could take the SDO channel between two of them; the displaced upload was refused as in flight, which the observer took for "live record unavailable", and the observation combined a live COB-ID with the file's mapping. The observer now takes the peer's SDO channel without waiting and holds it for the whole snapshot, the rule #291 gave the SRDO observer: a caller arriving meanwhile is refused as in flight, a safety transaction waits, and a channel busy at the start makes the whole snapshot the file's.Test:
CanOpenForeignPdoObserveTests.A_call_cutting_in_mid_snapshot_is_refused_and_the_snapshot_stays_live— a public upload started in theAfterPdoMatchForTestsseam, between the COB-ID match and the mapping read. Red on2d5ba02(the mapping came from the file), green after the change. The pinned fallbackAn_SDO_already_in_flight_falls_back_to_the_file_instead_of_throwingstill holds. README (§SDO client, §Observing a peer PDO), theICanOpenNoderemarks and FR-CO-030 say so.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
dotnet build CanKit.Pro.sln -c Releasesucceeds (-p:CI=true, 0 warnings)dotnet test CanKit.Pro.sln -c Releasepasses (net10.0: 1884 tests;dotnet format --verify-no-changesclean; pack +verify-packages.py9 packages ok; requirements traceability 0 new untraced)ObserveForeignPdoAsyncremarks updated)🤖 Generated with Claude Code