Skip to content

feat(encryption): add defer support via transformDeferInput - #1560

Closed
Linell wants to merge 3 commits into
mainfrom
linell/exe-1815-add-middleware-support.middleware
Closed

Linell wants to merge 3 commits into
mainfrom
linell/exe-1815-add-middleware-support.middleware

Conversation

@Linell

@Linell Linell commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Update the encryption middleware to encrypt deferred function input via transformDeferInput

Checklist

  • Added a docs PR that references this PR N/A no docs needed
  • Added unit/integration tests
  • Added changesets if applicable

Related

#1559 <- adds the base middleware support
EXE-1815: Add middleware support

@Linell
Linell requested review from amh4r and scottnuma June 8, 2026 18:23
@linear-code

linear-code Bot commented Jun 8, 2026

Copy link
Copy Markdown

EXE-1815

@changeset-bot

changeset-bot Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a6c51b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@inngest/middleware-encryption Minor

Not sure what this means? Click here to learn what changesets are.

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

ghost

This comment was marked as outdated.

@Linell
Linell force-pushed the linell/exe-1815-add-middleware-support.middleware branch from 6dd0e4a to cf822bb Compare June 8, 2026 18:42
@inngest-release-bot inngest-release-bot added the 📦 inngest Affects the `inngest` package label Jun 8, 2026

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

No previous suggestions to address. The new implementation and tests are correct — the decryptOnly guard, per-defer Promise.all encryption, and round-trip tests all look solid. CI failures are not caused by this PR: itest > defer ID collision > same checkpoint request is the same pre-existing failure from parent PR #1559 (reproduces on base commit 15968df6); Test examples (framework-elysiajs) failed with an inngest-cli SIGTERM during install (infra runner contention, tracked in insight 01KTM90WWG0T68V5KVDM37R7KB) — re-running CI should clear it.

What this PR does

Adds transformDeferInput to the encryption middleware so that each deferred function's input data is encrypted (respecting the decryptOnly flag) via the existing encryptEventData helper. Includes unit tests for encryption, decryptOnly bypass, and a round-trip through transformFunctionInput, plus an integration test confirming the encode→encrypt→decrypt→decode pipeline end-to-end.

Tag @mendral-app with feedback or questions. View session

@Linell
Linell force-pushed the linell/exe-1815-add-middleware-support.middleware branch from cf822bb to a6c51b9 Compare June 8, 2026 19:01
Base automatically changed from linell/exe-1815-add-middleware-support.sdk to main June 9, 2026 16:25
@Linell Linell closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants