[codex] Scope JetStream dedupe by subject - #22
Draft
SadPossum wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Nats-Msg-Idas a fixed 64-character SHA-256 digest of the normalized subject plus canonical outbox GUIDRoot cause and impact
The adapter previously used the GUID alone as
Nats-Msg-Id. JetStream de-duplication is stream-wide, so two different subjects sharing an EventId collided even when they represented different public events. This change is transport-internal: it adds no public API or persistence schema.Module outbox tables are unchanged and remain keyed by GUID alone. Producers must still generate globally collision-resistant integration-event IDs because same-ID rows cannot coexist inside one module outbox even when their subjects differ.
During rollout, an outbox row first published with the old GUID-only key and then retried with the new subject-scoped key can be stored once under each key. Drain the publishing backlog before upgrade when that overlap is unacceptable; consumer inbox idempotency remains required.
Validation
dotnet restore Gma.Framework.slnxdotnet build Gma.Framework.slnx --no-restore -m:1 -nr:false: 0 warnings, 0 errors./eng/test-fast.ps1 -NoBuild: 1,125 passed./eng/test-docker.ps1 -NoBuild: 3 passed, including the real NATS duplicate-window proofdotnet format styleanddotnet format analyzersverificationgit diff --checkFormatting baseline note
A solution-wide whitespace
dotnet format --verify-no-changesis not a valid green signal in this Linux checkout: the repository.gitattributesnormalizes tracked C# files to LF while.editorconfigrequires CRLF, producingENDOFLINEdiagnostics across untouched baseline files. Changed-file style and analyzer verification passed, and the zero-warning build enforces the configured code-style analyzers.