Skip to content

feat(server): lazy idempotency backend factory (JS #2136 parity) #927

@bokelley

Description

@bokelley

Gap

JS SDK adcp-client#2136 added createLazyBackend() for deferred (async-resolved) idempotency backend construction — for adopters whose Redis/Pg client resolves asynchronously from app infra.

Python idempotency exposes only MemoryBackend and PgBackend (src/adcp/server/idempotency/__init__.py); the "lazy" matches in backends.py refer to lazy expiry, not deferred construction. No factory wrapper exists.

Scope

Add a lazy backend wrapper around IdempotencyBackend with async first-use resolution and opt-in clear_all, mirroring JS createLazyBackend.

Notes

  • Reference: adcontextprotocol/adcp-client#2136.
  • Narrow use case (async-resolved Pg/Redis pool); lowest priority of the parity gaps.
  • Single-agent triage verification.
  • Filed no-triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-triagedenhancementNew feature or requestno-triageSkip the Claude triage bot — human or designated agent will handle this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions