Skip to content

fix(webapp): dedupe bulk replay triggers#4098

Closed
carderne wants to merge 2 commits into
mainfrom
feature/tri-10467-bulk-replay-duplicates-runs-unsound-cursor-pagination-in
Closed

fix(webapp): dedupe bulk replay triggers#4098
carderne wants to merge 2 commits into
mainfrom
feature/tri-10467-bulk-replay-duplicates-runs-unsound-cursor-pagination-in

Conversation

@carderne

@carderne carderne commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Use {bulkActionId}:{existingTaskRunId} as idempotency key to prevent duplicate bulk replays.

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ac46b3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dec5e452-c49b-45ef-89c9-2aeef9a8aba1

📥 Commits

Reviewing files that changed from the base of the PR and between 3167cdc and ac46b3f.

📒 Files selected for processing (1)
  • .server-changes/bulk-replay-idempotency.md
✅ Files skipped from review due to trivial changes (1)
  • .server-changes/bulk-replay-idempotency.md

Walkthrough

ReplayTaskRunService.call now builds an idempotency key from bulkActionId and the source task run id when bulk replay options are present, otherwise it uses the prior idempotencyKey value. That computed key is forwarded to TriggerTaskService.call. The PR also adds a Vitest test covering the bulk replay key value and a server-changes note describing the bulk replay idempotency behavior.

Changes

Area Change
apps/webapp/app/v3/services/replayTaskRun.server.ts Computes and passes a bulk-scoped idempotency key when bulkActionId is present
apps/webapp/test/replayTaskRunIdempotency.test.ts Adds a unit test for the bulk replay idempotency key
.server-changes/bulk-replay-idempotency.md Adds a fix note for bulk replay idempotency

Sequence Diagram(s)

sequenceDiagram
  participant ReplayTaskRunService
  participant TriggerTaskService
  ReplayTaskRunService->>ReplayTaskRunService: compute idempotencyKey from bulkActionId + existingTaskRun.id or fallback
  ReplayTaskRunService->>TriggerTaskService: call(options.idempotencyKey)
Loading

Related PRs: None identified.

Suggested labels: bug, testing

Suggested reviewers: None identified.

Poem
Bulk replay now keeps its name,
Each source run stays one and same.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is far too minimal and misses the required template sections and issue reference. Add the issue link, checklist, testing steps, changelog entry, and screenshots section, or note that screenshots are not needed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: deduping bulk replay triggers.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/tri-10467-bulk-replay-duplicates-runs-unsound-cursor-pagination-in

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

@carderne
carderne marked this pull request as ready for review July 1, 2026 14:54

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@carderne carderne closed this Jul 1, 2026
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.

1 participant