docs: audit delay and sleep sites before further conversions - #155
Conversation
Count and classify Task.Delay, Thread.Sleep, and whole-test timeouts under TestCases. No test is converted. Closes #114 Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The failure is a category-2 UDS sleep racing P2. This branch does not change that test. Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
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: d9fb37cc7f
ℹ️ 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".
The ISO-TP handoff sleep waits on CanBusService's send lock, and the nine NMT-Start sleeps wait on the actor mailbox. Neither is an ITimeSource conversion. Closes #114 Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3a8e6e022
ℹ️ 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".
CANopen session, wire, and pump sleeps are not an ITimeSource conversion. UDS lock, queue, and pump sleeps are not the client time seam. A green site does not need a failing load run first. Closes #114 Co-authored-by: Dietmar Borgards <dborgards@users.noreply.github.com>
What does this change?
Counts and classifies every
Task.Delay/Thread.Sleepundertests/CanKit.Pro.Tests/TestCases, plus theWithTimeoutbudgets a sleep grep misses, so the next virtual-clock conversion has a list instead of discovering the next flake by turning CI red. No test is converted and no tolerance is widened.Closes #114.
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 Releasesucceedsdotnet test CanKit.Pro.sln -c ReleasepassesFR-RAW-031,ADR-7), if anyCI on
d9fb37cis green (ubuntu, windows, macOS). The previous commit of this branch failedmacos-latestonce onUdsClientTests.A_Pending_Answer_Consumed_As_Another_Requests_Stray_Still_Extends_Its_Window(P2 timeout after 600 ms for service0x11, run 36102259889). Ubuntu and Windows passed that run. The test is already in the category-2 table; its handler sleeps 400 ms inside a 600 ms P2. It is not fixed here.This branch adds
docs/reviews/2026-09-25-delay-sleep-audit.mdonly. Reviews are excluded from the MkDocs site.On
c359bf0there are 195 real delay/sleep call sites (201 grep hits, 6 of them comments; the issue's 117 is the older grep). 115 sites in 99 tests assume work finished inside a window (category 2). One sleep is itself a whole-test budget, and one non-sleep budget is still tight:StartPeriodicSend_SingleFrame_FiresAtConfiguredPeriodcollects 22 samples at 120 ms inside 10.56 s (~1.4× if each period stretches to 3×).J1939TpChannelstill builds its own actor with no clock;CanOpenNodenow takes anITimeSourcebut still builds the actor. Suggested first conversions are the J1939 backoff sleeps that already have a virtual-clock sibling, then that periodic budget. Bracket from both sides, and do not advance a clock until the timer is armed.