Implemented the generic in-flight request deduplication primitive - #486
Merged
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.
Description
Implements a generic in-flight request deduplication primitive for the GuildPass SDK. This allows concurrent callers requesting the same logical operation to share one underlying asynchronous execution, reducing duplicate network requests and ensuring consistent timing behavior.
Semver impact: minor
Linked Issue
Closes #454
Type of Change
Changes Made
Public API Changes
Test Evidence
Build Evidence
Checklist
pnpm typecheckpassespnpm lintpassespnpm test:runpasses — all tests greenpnpm buildsucceeds —dist/generated cleanlydocs/updated if public API changedexamples/updated if new usage patterns were addedAdditional Notes
The implementation is completely independent of HTTP transport, cache, or endpoint implementations as required. It provides a generic concurrency primitive that can be used throughout the SDK for deduplicating any async operation based on a string key. The module includes configurable capacity limits and optional short-lived result retention, both clearly separated from the core in-flight deduplication semantics.