Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add randomized tie-break for equal priority in OperationQueue#420

Merged
ChrisPulman merged 3 commits intomainfrom
Feature83
Nov 17, 2025
Merged

Add randomized tie-break for equal priority in OperationQueue#420
ChrisPulman merged 3 commits intomainfrom
Feature83

Conversation

@ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

feature

What is the current behavior?

#83

What is the new behavior?

Introduces an option to randomize execution order among operations with equal priority across different keys in OperationQueue. Adds a new constructor parameter to enable this behavior and a deterministic seed for testing. Updates KeyedOperation comparison logic and adds a corresponding unit test.

What might this PR break?

None, additional feature added, tests all pass.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

closes #83

Introduces an option to randomize execution order among operations with equal priority across different keys in OperationQueue. Adds a new constructor parameter to enable this behavior and a deterministic seed for testing. Updates KeyedOperation comparison logic and adds a corresponding unit test.
Introduces a verified API approval file for .NET 4.7 and updates the .NET 8.0 approval to include a new OperationQueue constructor with randomization and seed parameters.
@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.68%. Comparing base (5b12c50) to head (600cb0e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Punchclock/OperationQueue.cs 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #420      +/-   ##
==========================================
+ Coverage   74.16%   74.68%   +0.52%     
==========================================
  Files           6        6              
  Lines         298      316      +18     
  Branches       52       58       +6     
==========================================
+ Hits          221      236      +15     
- Misses         62       63       +1     
- Partials       15       17       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisPulman ChrisPulman merged commit faaf27a into main Nov 17, 2025
6 checks passed
@ChrisPulman ChrisPulman deleted the Feature83 branch November 17, 2025 01:02
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: extend the OperationQueue by adding support for randomness

2 participants