Repository navigation
feat(canopen): add read-only peer safety inspection - #458
Conversation
PR SummaryMedium Risk Overview The feature sits on optional SRS (EN/DE), CANopen README, public API approvals, and broad deterministic tests document and lock the behavior. Reviewed by Cursor Bugbot for commit 05f6241. 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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 89d82a1. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |

What does this change?
Tools can now acquire a peer's safety communication configuration without supplying an expected DCF.
ReadPeerSafetyConfigurationAsyncreturns an immutablePeerSafetySnapshotwith raw values/provenance, peer identity entries, acquisition identity/time, interpreted SRDOs and per-entry findings. The device's 13FEh flag, independently recomputed signature comparison and optional expected-configuration comparison are separate outcomes.The optional
ICanOpenSafetyInspectionand extension preserve existingICanOpenSafetyimplementations. The operation reserves this client's peer-SDO channel, snapshots its bound description/expectation and performs gated uploads only. The peer count cannot expand the acquisition beyond the bound file/64 SRDOs; advertised mapping slots remain bounded and pass the existing gate. No download, NMT, store/commit, SRDO or GFC command is sent. Normal SDO cancellation aborts remain possible.Every acquired entry is read again. Different live/explicit SRVT-rule evidence reports
ChangeObserved; identical answers still leave atomic consistencyUnconfirmed. Missing/malformed required evidence prevents eligibility. File/default fallback stays distinguishable and never becomes live checksum evidence. Existing CRC serialization, expected-value generation, mapped-object validation and CiA 319 SRVT handling are reused. Deleted records' stale checksums are not verified. The known interoperability questions in #289 remain visible; these diagnostics are not safety approval.IsCompleteconcerns the required SRDO image/rechecks; optional identity/GFC unavailability remains visible in entry findings. ExpectedMatchrequires a complete acquisition without observed changes; a known difference can still reportMismatchin a partial image. Each acquisition gets a new identity, and replacing monitor input requires a new evaluation period. Continuous monitoring remains separate in #401.Closes #403. Refs #401 and #289.
Type of change
feat— new behaviour (minor release)fix/perf— bug or performance fix (patch release)docs/test/refactor/chore/ci— no releaseChecklist
-p:CI=true, test (net10.0),dotnet format --verify-no-changes, and pack +eng/verify-packages.pyall pass locallyValidation
Matchon partial/changing images, and false communication errors for unused records with COB-IDs 0.Final CI and reviews
Final head:
05f6241a. Linux, macOS and Windows pass net10.0 using the suite count above; Windows also passes 2958 net48 tests. Format, CodeQL, documentation, configuration/requirements checks and the package/SBOM gate all pass.Both code reviews completed on this head without unresolved findings. The deleted-record and CodeQL Where findings were fixed, answered in their original threads and confirmed resolved by the reviewing bots; CodeQL alert 749 is fixed. No review threads remain open. Existing norm/interoperability questions in #289 remain outside this PR.