Skip to content

fix(core): evaluate nested event filters when parent payload is missing or null - #5099

Closed
cocvn157 wants to merge 1 commit into
triggerdotdev:mainfrom
cocvn157:fix/issue-5017-nested-exists-false-event-filter
Closed

cocvn157 wants to merge 1 commit into
triggerdotdev:mainfrom
cocvn157:fix/issue-5017-nested-exists-false-event-filter

Conversation

@cocvn157

@cocvn157 cocvn157 commented Nov 5, 2026

Copy link
Copy Markdown

Closes #5017
Fixes #5017

? 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 a unit test in packages/core/test/eventFilterMatches.test.ts verifying that eventFilterMatches returns true for { user: { email: [{ $exists: false }] } } when the payload is {}, { user: null }, or { user: {} }, and returns false when { user: { email: "a@b.com" } }.
  • Ran all 35 unit tests in packages/core/test/eventFilterMatches.test.ts ? all 35 pass.

Changelog

Normalized undefined and null payloads to {} in eventFilterMatches instead of returning false early on non-empty filters, allowing nested $exists: false leaf filters to evaluate consistently when an ancestor key is missing or null.


Screenshots

N/A (pure function in @trigger.dev/core)

??

@changeset-bot

changeset-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 875992b

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

This PR includes changesets to release 31 packages
Name Type
@trigger.dev/core Patch
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/linear Patch
@trigger.dev/python Patch
@trigger.dev/redis-worker Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/slack Patch
@trigger.dev/sdk Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/metrics-pipeline Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@internal/tracing Patch
@internal/webhook-engine Patch
@internal/webhook-sources Patch
@internal/dashboard-agent Patch
@internal/cache Patch
@trigger.dev/convex Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/billing Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch

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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Hi @cocvn157, 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 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 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: eventFilterMatches returns false for nested $exists: false when the parent key is missing or null

1 participant