Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(ulid): add NetEvolve.Http.Correlation.Ulid.ByteAether provider for monotonic correlation IDs - #733

#733
Merged
samtrion merged 1 commit into
maindailydevops/http.correlation:mainfrom
feature/730-byteaether-uliddailydevops/http.correlation:feature/730-byteaether-ulidCopy head branch name to clipboard
Jul 29, 2026
Merged

feat(ulid): add NetEvolve.Http.Correlation.Ulid.ByteAether provider for monotonic correlation IDs#733
samtrion merged 1 commit into
maindailydevops/http.correlation:mainfrom
feature/730-byteaether-uliddailydevops/http.correlation:feature/730-byteaether-ulidCopy head branch name to clipboard

Conversation

@samtrion

Copy link
Copy Markdown
Contributor

Adds the NetEvolve.Http.Correlation.Ulid.ByteAether provider, which generates correlation IDs via ByteAether.Ulid to guarantee strictly monotonic ordering for IDs created within the same millisecond — unlike the existing NetEvolve.Http.Correlation.Ulid package, whose IDs are randomly ordered inside a millisecond.

This supersedes #730 by @Seramis, whose commits are preserved here with original authorship. That PR could not be updated: "Allow edits by maintainers" is disabled on the source fork, so the review fixes below could not be pushed to it, and its workflow runs were additionally gated behind manual approval.

Changes

  • New package src/NetEvolve.Http.Correlation.Ulid.ByteAether with an internal UlidCorrelationIdProvider and a WithUlidGenerator() builder extension mirroring the existing ULID package.
  • ByteAether.Ulid 1.4.0 added to central package management.
  • Unit tests covering provider registration, null-argument handling, uniqueness under Parallel.For, and sequential ordering across net8.0/9.0/10.0.
  • Package README plus a new "Using ULID Provider" section in the root README documenting both providers as alternatives.

Review feedback from #730

Three findings from the automated review were adopted:

  • The Basic Setup sample omitted using NetEvolve.Http.Correlation.Ulid.ByteAether;, the namespace declaring WithUlidGenerator(), so it could not compile as shown.
  • The "No Coordination Required" benefit claimed distributed generation "without inter-node coordination or collisions". ByteAether's monotonicity derives from lock-free CAS over per-generator state, which establishes neither a total order across nodes nor collision-freedom. Reworded and scoped to a single process.
  • Ordering assertions used TUnit's generic IsLessThan, which resolves through culture-sensitive string.CompareTo. ULID sortability is defined ordinally, so the test now asserts on string.CompareOrdinal.

Three were declined, with reasoning recorded in the #730 threads: splitting the root README snippet (exclusivity is already stated per import), extending the builder-contract test (would diverge from the identical test in NetEvolve.Http.Correlation.Ulid.Tests.Unit), and adding a clock seam for a same-millisecond monotonicity test (widens production API to assert a guarantee owned by the dependency).

Verification

  • dotnet build: 0 errors, 0 warnings.
  • 15/15 unit tests pass on net8.0, net9.0, and net10.0.

Notes

…scope monotonicity claim

The Basic Setup snippet resolved WithUlidGenerator() without importing the
namespace that declares it, so it could not compile as shown.

ByteAether's monotonic guarantee is per-generator via lock-free CAS on local
state, so it neither establishes a total order across nodes nor eliminates
ULID collision probability. Reword the benefit accordingly.

Assert ULID ordering with string.CompareOrdinal, since lexicographic
sortability is defined ordinally and TUnit's generic IsLessThan routes to
culture-sensitive string.CompareTo.
@samtrion
samtrion requested a review from a team as a code owner July 29, 2026 22:18
@samtrion
samtrion requested review from Hnogared and removed request for a team July 29, 2026 22:18
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • state:ready for merge

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0206f66c-affd-465f-a072-af7889d0accf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@samtrion
samtrion merged commit 320fa58 into main Jul 29, 2026
9 checks passed
@samtrion
samtrion deleted the feature/730-byteaether-ulid branch July 29, 2026 22:19
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.63%. Comparing base (82a7a52) to head (afcfcd0).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #733   +/-   ##
=======================================
  Coverage   97.63%   97.63%           
=======================================
  Files          18       18           
  Lines         169      169           
  Branches       22       22           
=======================================
  Hits          165      165           
  Misses          2        2           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 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.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.