fix(canopen): grow SDO receive buffers geometrically, report a short RPDO once per run - #263
Conversation
…RPDO once per run C11: the classic client and both block paths grew a sizeless or under-declared receive buffer by one segment at a time, copying everything received so far on each segment. A 64 KiB transfer allocated about 307 MB; it now doubles up to the transfer cap. C13: a producer sending a too-short RPDO raised EMCY 8210h for every frame. It is now raised once per run of short frames; a frame that fits, or reconfiguring the RPDO, ends the run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PR SummaryMedium Risk Overview SDO buffers now grow via internal Short RPDOs still skip actuation and may raise EMCY 8210h once per continuous run of too-short frames ( Tests cover geometric growth (unit theory + GC allocation bounds on .NET 5+) and FR-CO-024 EMCY debounce behavior. Reviewed by Cursor Bugbot for commit abd93e0. 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61a5a825f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…e EMCY-off path Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
GC.GetTotalAllocatedBytes does not exist on net48, which broke the Windows leg's build. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What does this change?
Two findings from the deep review (
docs/reviews/2026-09-30-deep-review.md, § 2.8):CanOpenNode.GrowCapacity), clamped toMaxSdoTransferBytes(+7 on the block paths, whose last segment may overshoot by six bytes, CANopen: collected minor findings (boundary OOM, registration leak, RTR DLC, doc drift) #59). Results were already trimmed toOffset, so the slack is never visible.C12 (block-download client timer re-armed per sub-block instead of per segment, versus the wording in
CanOpenNodeOptions) is not touched; it needs a decision on which side is right.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 (with-p:CI=true)dotnet test CanKit.Pro.sln -c Releasepasses (net10.0; net48 only runs in CI)GrowCapacityis internal)Mutation checks: making
GrowCapacityreturnneededfails the three allocation tests and the unit theory; removing the debounce condition, and removing the reset on a fitting frame, each fail the new EMCY test. The reset on RPDO reconfiguration is not covered by a test.🤖 Generated with Claude Code