Skip to content

test(uds): the cancelled-after-its-window test runs on the virtual clock - #334

Merged
dborgards merged 1 commit into
mainfrom
fix/312-uds-suppressed-window
Oct 20, 2026
Merged

dborgards merged 1 commit into
mainfrom
fix/312-uds-suppressed-window

Conversation

@dborgards

Copy link
Copy Markdown
Owner

What does this change?

Closes #312. UdsExpiredDeadlineTests.R_A_Suppressed_Send_Cancelled_After_Its_Provisional_Window_Still_Opens_One measured the gap between the cancellation and the next send on the wall clock, with a 5 ms margin, and came up 7 µs short of it on a loaded runner. It now runs on the virtual clock like its siblings O and Q (#171): the stub, the client's deadlines and the stamps share the actor's clock, a send is stamped later than its window's end and never earlier, so the lower bound on the gap is the client's property and needs no margin. The claim the test makes is unchanged: the window is noted again from the cancellation, so the next send waits P2 from it.

No source change.

Type of change

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

Checklist

🤖 Generated with Claude Code

The wall-clock version measured the host together with the client and
came up 7 µs short of its 5 ms margin on a loaded runner (#312). On the
clock, as its siblings O and Q since #171, a send is stamped later than
its window's end and never earlier, so the gap from the cancellation to
the next send is the client's and the bound needs no margin. With the
window not noted again from the cancellation the test fails.

Closes #312

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test-only timing refactor; no production UDS or channel code touched.

Overview
Closes #312 — refactors R_A_Suppressed_Send_Cancelled_After_Its_Provisional_Window_Still_Opens_One to use the same virtual clock setup as tests O and Q (#171), instead of wall-clock Stopwatch and Task.Delay.

The stub and UDS client share a ProtocolActor; cancellation time advances via clock.AdvanceAsync, and the follow-up TesterPresent is stepped with RunAsync. Gap checks use the actor’s time source and assert ≥ full P2 (Budget) with no 5 ms slack, because host scheduling no longer pollutes the measurement. The behavioral claim is unchanged: after cancel, the client still notes a window from cancellation, so the next send waits P2.

Test-only — no library changes.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T13:30:57.975632Z 1ae2c12 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 20, 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 b72b71d into main Oct 20, 2026
13 checks passed
@dborgards
dborgards deleted the fix/312-uds-suppressed-window branch October 20, 2026 13:43
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.

test(uds): investigate suppressed-send window gap below 75 ms

1 participant