Skip to content

Add idempotency core request lifecycle API with pluggable store#35

Merged
diasbruno merged 34 commits into
developmentfrom
copilot/implement-idempotency-key
May 23, 2026
Merged

Add idempotency core request lifecycle API with pluggable store#35
diasbruno merged 34 commits into
developmentfrom
copilot/implement-idempotency-key

Conversation

Copilot AI commented May 20, 2026

Copy link
Copy Markdown
Contributor
  • Review new @copilot comment and identify affected symbols/usages
  • Run baseline tests in current environment
  • Remove unneeded idempotency generic from core package API
  • Run targeted idempotency tests
  • Run final validation and reply to the PR comment

Comment thread idempotency/routing.lisp Outdated
Comment thread idempotency/routing.lisp Outdated
@diasbruno diasbruno force-pushed the copilot/implement-idempotency-key branch from 65ee48a to 6b1a664 Compare May 20, 2026 23:32
@diasbruno

Copy link
Copy Markdown
Member

@copilot This code is not good. We need to provide clean interface for the user as in the rate-limit feature.

The idempotency feature must not depend on the request or any feature of wst, only the routing and middleware must know about request and response objects.

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@copilot This code is not good. We need to provide clean interface for the user as in the rate-limit feature.

The idempotency feature must not depend on the request or any feature of wst, onl...

Addressed in defaf3a with follow-ups through 1447b2e: idempotency now exposes a pure core interface (io.github.cl-sdk.wst.idempotency:idempotency) that is independent of request/response and wst routing objects, while the request/response handling remains only in idempotency/routing.lisp.

Copilot AI changed the title Add idempotency-key middleware with pluggable store, replay semantics, and routing integration Add idempotency core lifecycle API with pluggable store and routing middleware integration May 21, 2026
@diasbruno

Copy link
Copy Markdown
Member

@copilot remove the routing and anything related to middleware. Let's first work on the core of the idempotency.

Copilot AI requested a review from diasbruno May 23, 2026 02:20
Comment thread idempotency/package.lisp
Copilot AI requested a review from diasbruno May 23, 2026 12:23
Comment thread idempotency/memory-store.lisp
Copilot AI requested a review from diasbruno May 23, 2026 12:28
Comment thread idempotency/memory-store.lisp Outdated
(:documentation "Hash-table-backed in-memory idempotency engine.
Not thread-safe."))

(defun make-memory-idempotency-engine (&key

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot we don't need this function because all of the defaults are already present on the base class and the default table is in subclass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in d1868e5: removed make-memory-idempotency-engine and switched usage to direct (make-instance 'io.github.cl-sdk.wst.idempotency.memory-store:memory-idempotency-engine ...) since defaults are already provided by the classes.

Copilot AI requested a review from diasbruno May 23, 2026 12:41
Comment thread idempotency/package.lisp Outdated
io.github.cl-sdk.wst.idempotency.store:delete-entry for storage behavior.
For a complete engine implementation, specialize all three methods."))

(defgeneric idempotency-engine-store (engine)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot we don't need this generic anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated in 59bfceb: removed the idempotency-engine-store generic and stopped exporting it from idempotency/package.lisp.

Copilot AI requested a review from diasbruno May 23, 2026 12:46
@diasbruno diasbruno merged commit 9254b4d into development May 23, 2026
1 check passed
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.

2 participants