Skip to content

test(canopen): settle safety boot through actor and SDO signals - #469

Merged
dborgards merged 2 commits into
mainfrom
fix/safety-boot-clock-362
Oct 26, 2026
Merged

dborgards merged 2 commits into
mainfrom
fix/safety-boot-clock-362

Conversation

@dborgards

Copy link
Copy Markdown
Owner

What does this change?

Refs #362. FlyingMasterRig's fixed 40 ms settling pause allowed protocol time to advance before a real peer actor or the safety-verification worker had processed its next SDO step. Safety boot peers now share the manual clock and join the actor/driver handoff rounds. An actor-only internal snapshot tracks queued verification work and active transfer identities, so a transfer registered after a drain gets another peer round. Deliberately held SDO channels have scoped exemptions; lack of SDO progress has a watchdog without consuming protocol time.

Three positive-ordering regression tests cover a blocked peer actor, a queued verification continuation, and a transfer started after draining. Five source mutations fail at runtime and were restored: removing peer participation, skipping continuation waiting, ignoring deliberate channel holds, suppressing pending-peer snapshots, and ignoring transfer-identity changes. #362 stays open for the remaining timing windows recorded in its comments.

Type of change

  • feat — new behaviour (minor release)
  • fix / perf — bug or performance fix (patch release)
  • docs / test / refactor / chore / ci — no release
  • Breaking change

Checklist

Validation: 3,035 net10 tests; net48 compilation; nine verified packages; 50 engineering tests; requirements traceability. The final Cobertura report was inspected across every class, including nested types: all nine changed executable entries are covered, with no missing lines or partial branches.

@cursor

cursor Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are limited to test harnesses and an internal test-only API; production boot behavior is unchanged aside from the new snapshot helper.

Overview
Replaces the flying-master test rig’s fixed 40 ms QuiesceAsync pause with a loop that settles the master, clock-shared peer nodes, and driver handoffs until boot verification work is idle and SDO transfer identities are stable. Peers are opened via OpenPeerNode with per-peer actor witnesses; settling watches SDO frame progress, optional verification continuations, and scoped exemptions when tests deliberately hold peer SDO channels.

Adds an internal actor-only seam CaptureBootVerificationWorkForTests() on CanOpenNode so tests can see pending safety-verification peers vs active SDO clients. Three new safety-boot ordering tests cover blocked peer actors, gated verification continuations, and SDO started after a drain; existing tests switch slaves to rig peers and SettleUntilAsync / SafetyBootGate gain SDO-entry signaling and progress timeouts.

Reviewed by Cursor Bugbot for commit 1d68b89. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T20:26:40.165092Z 1d68b89 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Owner Author

@codex review

Please review current head 1d68b89; the existing completed review still refers to 70a2423. The follow-up selects round callbacks explicitly for CodeQL 755. All local gates were repeated successfully.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 1d68b8976c

ℹ️ 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".

@dborgards
dborgards merged commit b867318 into main Oct 26, 2026
16 checks passed
@dborgards
dborgards deleted the fix/safety-boot-clock-362 branch October 26, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants