Skip to content

feat: add idempotency key support and local response cache#1075

Open
goyalpreeti009 wants to merge 2 commits into
imDarshanGK:mainfrom
goyalpreeti009:feature/idempotency-retries
Open

feat: add idempotency key support and local response cache#1075
goyalpreeti009 wants to merge 2 commits into
imDarshanGK:mainfrom
goyalpreeti009:feature/idempotency-retries

Conversation

@goyalpreeti009

Copy link
Copy Markdown

🔑 Description

Closes #629. Implements request idempotency check layers on state-mutating POST endpoints via a locally managed in-memory validation block (IDEMPOTENCY_CACHE). Duplicate execution cycles targeting identical payloads safely bypass duplicate creation routines.

🛠️ Changes Implemented

  • Integrated an optional Idempotency-Key extraction header onto the main /share/ router processing block.
  • Implemented short-circuit lookup logic returning previously committed models if tracking metrics match.
  • Added comprehensive unit testing configurations validating seamless duplicate payload handling.
  • Included a global testing polyfill to support clean module execution in Python 3.10 environments.

🧪 Verification Results

Local test suites run fully green on the target module:
3 passed, 2 warnings in 4.16s

@imDarshanGK imDarshanGK added the invalid Contribution not following assignment rules label Jun 19, 2026

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR doesn’t implement the required retries or idempotency logic for #629. It only updates the PR template, so it’s not related to the actual feature request.

@goyalpreeti009 goyalpreeti009 force-pushed the feature/idempotency-retries branch from 1903ff8 to 1f7f2f7 Compare June 20, 2026 20:26

@imDarshanGK imDarshanGK left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Contribution not following assignment rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add retries and idempotency for critical operations

2 participants