Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds idempotency key support to OpenWorkflow run creation so repeated requests with the same key return the existing canonical run (per namespace + workflow), with coverage across both SQLite and PostgreSQL backends.
Changes:
- Pass
idempotencyKeyfromOpenWorkflow.runWorkflow()/workflow.run()into backend run creation. - Implement idempotent run creation in SQLite (transaction + lookup) and Postgres (advisory-lock + lookup) backends.
- Add backend + client test coverage and update docs/changelog/roadmap to document the feature.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/openworkflow/sqlite/backend.ts | Adds idempotent run creation logic for SQLite via transaction + lookup. |
| packages/openworkflow/postgres/backend.ts | Adds idempotent run creation logic for Postgres via advisory lock + lookup. |
| packages/openworkflow/client.ts | Wires idempotencyKey option through to backend. |
| packages/openworkflow/client.test.ts | Adds client-level tests verifying idempotency key persistence and dedupe behavior. |
| packages/openworkflow/backend.testsuite.ts | Adds cross-backend behavioral tests for idempotency semantics and concurrency. |
| packages/openworkflow/README.md | Updates feature list to include idempotency keys. |
| packages/openworkflow/CHANGELOG.md | Notes unreleased idempotency support. |
| packages/docs/docs/workflows.mdx | Documents optional idempotency key usage and semantics. |
| packages/docs/docs/roadmap.mdx | Moves idempotency keys from “Coming Soon” to completed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7eed0c8 to
042ab00
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #121, Closes #136
Summary
This pr implements idempotency so reusing the same
idempotencyKeyreturns the existing run (within 24h)ow.runWorkflow(spec, input, { idempotencyKey })Docs updated with additional info