Skip to content

chore(api): remove unused in-memory recipe idempotency store - #94

Draft
tomdmeredith wants to merge 1 commit into
mainfrom
cursor/remove-in-memory-idempotency-ecd7
Draft

tomdmeredith wants to merge 1 commit into
mainfrom
cursor/remove-in-memory-idempotency-ecd7

Conversation

@tomdmeredith

Copy link
Copy Markdown
Collaborator

Summary

Propose-only cleanup for the 2026-10-02 nightly audit (in-memory-idempotency). Do not merge. Do not deploy.

Live recipe and capability execute already claim idempotency keys through DurableIdempotencyStore. This removes the unused in-memory store from the recipe safety gate.

  • Delete IdempotencyRecord and IdempotencyStore from packages/api/services/recipe_safety.py.
  • RecipeSafetyGate no longer accepts an in-memory store, and check_pre_execution / finalize_execution no longer consult one.
  • get_safety_gate() still builds RecipeSafetyGate() with no in-memory store.
  • Drop tests that only covered the in-memory store. Keep firewall, nesting, and fan-out coverage.
  • Leave packages/api/services/durable_idempotency.py and the durable claim/store wiring in recipes_v2.py and capability_execute.py unchanged.

Proof

  • rg '\bIdempotencyStore\b' matches only the historical note in durable_idempotency.py. Recipe execute still claims and stores keys with DurableIdempotencyStore in recipes_v2.py.
  • pytest tests/test_recipe_safety.py tests/test_recipes_v2.py tests/test_durable_idempotency.py — 134 passed.

Out of scope

Open drafts #91, #90, and #89. OperationType / financial counters, conversation_in_scope, canonicalizers, and Awal scripts are untouched. No secrets edited.

Open in Web Open in Cursor 

Live recipe and capability execute already claim keys through
DurableIdempotencyStore. Drop the unused in-memory store, the safety
gate branch that consulted it, and the tests that only covered it.

Co-authored-by: tomdmeredith <tomdmeredith@users.noreply.github.com>
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
rhumb Ready Ready Preview Oct 2, 2026 11:35am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — ffca2e87 Deployed Oct 2, 2026 by vercel[bot]
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