Skip to content

test(j1939): clock retry confirmation during echo grace - #482

Merged
dborgards merged 1 commit into
mainfrom
fix/j1939-claim-echo-clock-362
Oct 27, 2026
Merged

dborgards merged 1 commit into
mainfrom
fix/j1939-claim-echo-clock-362

Conversation

@dborgards

Copy link
Copy Markdown
Owner

What does this change?

The J1939 claim-retry regression froze protocol time while its deferred RawCan echo still had a host-time confirmation deadline. Use a separate VirtualClock confirmation actor and start the retry halfway through the predecessor's grace, so grace expiry occurs while the retry genuinely still has half of its one-second confirmation budget remaining. Positive timer witnesses prove both phases. All original late-echo, claim-state and address assertions remain; no timeout budget, production behavior or public API changes.

Refs #362. Remaining CANopen DeferredEcho/reset/SDO fixtures still need the final timing audit.

Type of change

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

Validation

Two real source mutations were runtime-red and restored: the old host-time service binding removes the confirmation timer witness; removing HasLiveClaimEcho grace rearming makes the late echo consume the retry marker and violates the original successful-claim path. Runner: /private/tmp/cankit-362-claim-confirm-mutations.py.

Local gates: 3043 net10 tests with coverage, net48 compilation, CI build, formatting, nine verified packages, 50 engineering tests, traceability. Cobertura parsed all 444 classes/nested types; the 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 timing harness change with no production or public API modifications.

Overview
Test-only update to A_Retry_During_Claim_Echo_Grace_Is_Not_Stolen_By_The_Late_Echo so claim-retry timing is driven by the virtual clock end-to-end.

The fixture now uses ClockedCanBusService with a separate confirmation actor instead of plain CanBusService, so deferred Raw CAN echo confirmation deadlines advance with protocol time rather than freezing on host time. The scenario starts the address retry halfway through the failed claim’s echo grace, then steps the clock in phases with explicit WaitUntilTimerArmedAsync checks on both the node actor and the confirmation actor (1 s confirmation budget vs remaining grace).

Production behavior and assertions (late echo handling, claimed state, address 0x11) are unchanged; the diff tightens how the regression is simulated and witnessed under #362.

Reviewed by Cursor Bugbot for commit 6c22c36. 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:08:52.968200Z 6c22c36 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 77d376d into main Oct 27, 2026
14 checks passed
@dborgards
dborgards deleted the fix/j1939-claim-echo-clock-362 branch October 27, 2026 05:21
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