Skip to content

test(canopen): witness reset heartbeat chain completion - #484

Merged
dborgards merged 1 commit into
mainfrom
fix/canopen-reset-confirm-clock-362
Oct 27, 2026
Merged

dborgards merged 1 commit into
mainfrom
fix/canopen-reset-confirm-clock-362

Conversation

@dborgards

Copy link
Copy Markdown
Owner

What does this change?

The CANopen application-reset heartbeat regression used two 100 ms sleeps and host-time RawCan confirmation deadlines while its producer used a manual clock. Use a separate VirtualClock confirmation actor and positively witness that the due producer tick creates a new heartbeat-chain task which remains pending behind the held boot-up echo. After releasing all three expected echoes, await that exact task and verify the actor's chain identity remains unchanged.

All boot-up/state/tick ordering, exact frame-count and payload assertions remain. Confirmation and producer budgets are unchanged. No production code or public API changes.

Refs #362. The remaining SDO block-server timing fixtures still need their batch-completion audit.

Type of change

  • docs / test / refactor / chore / ci — no release

Validation

The focused regression passes. Three real source mutations were runtime-red and restored: restore host-time RawCan binding, bypass heartbeat chaining, and omit the producer's reset-cycle restart. Runner: /private/tmp/cankit-362-reset-confirm-mutations.py.

Full local gates: 3043 net10 tests with coverage, net48 compilation, CI build, formatting, nine verified packages, 50 engineering tests and traceability. Cobertura parsed all 444 classes/nested types; production diff is empty, with no changed executable missing/partial entries.

Checklist

@cursor

cursor Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only change to CANopen communication profile regression; no production or public API modifications.

Overview
Strengthens the application-reset heartbeat producer regression by driving the node through VirtualClock and ClockedCanBusService (dedicated confirmation actor) instead of ManualTimeSource plus a plain bus service, so producer timers and transmit confirmations stay on the same virtual timeline.

The test drops 100 ms Task.Delay sleeps and instead snapshots HeartbeatSendChain, waits for the armed timer, advances the clock asynchronously, and asserts a new pending chain task exists but has not completed while the boot-up echo is still held. After the three deferred echoes, it awaits that exact task and checks the chain reference is unchanged so no extra heartbeat was queued. Wire-order and frame-count expectations are unchanged.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T05:53:05.899723Z 329247f PR opened
ℹ️ 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 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dborgards
dborgards merged commit 5ae2079 into main Oct 27, 2026
14 checks passed
@dborgards
dborgards deleted the fix/canopen-reset-confirm-clock-362 branch October 27, 2026 06:22
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.

1 participant