Skip to content

fix(core): check idempotency key catalog in isIdempotencyKey - #5138

Closed
theeaashish wants to merge 1 commit into
triggerdotdev:mainfrom
theeaashish:fix/idempotency-key-64-char
Closed

theeaashish wants to merge 1 commit into
triggerdotdev:mainfrom
theeaashish:fix/idempotency-key-64-char

Conversation

@theeaashish

Copy link
Copy Markdown

Closes #5130

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

  • Added unit tests in packages/core/src/v3/idempotencyKeys.test.ts verifying that a raw 64-character string is hashed with the parent run ID (run-scoped) rather than treated as an already-hashed global key, while keys created via idempotencyKeys.create() preserve their global or run scope.
  • Ran pnpm --filter @trigger.dev/core exec vitest run src/v3/idempotencyKeys.test.ts (all 21 tests passing) along with format, lint, and knip.

Changelog

Updated isIdempotencyKey() in @trigger.dev/core to verify getIdempotencyKeyOptions(value) !== undefined instead of relying solely on value.length === 64, preventing raw 64-character strings from bypassing parent-run scoping in makeIdempotencyKey().


Screenshots

N/A (core SDK logic and unit tests only).

💯

@changeset-bot

changeset-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8d2d43a

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

@github-actions

Copy link
Copy Markdown
Contributor

Hi @theeaashish, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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.

bug: a raw 64-character idempotencyKey skips run scope

1 participant