Skip to content

Fix FD-462: Add action-level idempotency key and conflict policy to pipeline actions#30

Draft
poolside-bot wants to merge 1 commit intomainfrom
fix/fd_462_ac5249e0
Draft

Fix FD-462: Add action-level idempotency key and conflict policy to pipeline actions#30
poolside-bot wants to merge 1 commit intomainfrom
fix/fd_462_ac5249e0

Conversation

@poolside-bot
Copy link
Copy Markdown
Contributor

Summary

Automated fix for FD-462: Add action-level idempotency key and conflict policy to pipeline actions

Linear Issues

Changes Made

  • bridge_sdk/models.py: Added idempotency_key (Optional[str]) and conflict_policy (Optional[Literal]) fields to WebhookPipelineAction with CEL validation
  • tests/test_pipeline.py: Added 7 new tests for idempotency key and conflict policy validation, serialization, and edge cases; fixed existing assertion for new nullable fields
  • examples/webhook_example.py: Added github-pr-sync webhook example demonstrating idempotent action with terminate_existing conflict policy

…Action

Add two new optional fields to WebhookPipelineAction:
- idempotency_key: CEL expression producing a deterministic key for
  action-level deduplication. Available variables: headers, body, body_json.
- conflict_policy: Controls behavior when a workflow with the same
  idempotency key is already running (terminate_existing, use_existing, fail).

The idempotency_key CEL expression is validated at model construction time
alongside the existing on/transform validators.

Also adds comprehensive tests for the new fields and an example demonstrating
idempotent webhook actions (github-pr-sync with terminate_existing policy).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants