René's URL Explorer Experiment


Title: Bug: eventFilterMatches returns false for nested $exists: false when the parent key is missing or null · Issue #5017 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: Bug: eventFilterMatches returns false for nested $exists: false when the parent key is missing or null · Issue #5017 · triggerdotdev/trigger.dev

X Title: Bug: eventFilterMatches returns false for nested $exists: false when the parent key is missing or null · Issue #5017 · triggerdotdev/trigger.dev

Description: Summary eventFilterMatches returns false for a nested $exists: false filter when the parent key is missing or null in the payload. The function returns false for any non-empty filter as soon as it meets an undefined/null payload, before ...

Open Graph Description: Summary eventFilterMatches returns false for a nested $exists: false filter when the parent key is missing or null in the payload. The function returns false for any non-empty filter as soon as it ...

X Description: Summary eventFilterMatches returns false for a nested $exists: false filter when the parent key is missing or null in the payload. The function returns false for any non-empty filter as soon as it ...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/5017

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: eventFilterMatches returns false for nested $exists: false when the parent key is missing or null","articleBody":"## Summary\n`eventFilterMatches` returns `false` for a nested `$exists: false` filter when the parent key is missing or `null` in the payload. The function returns `false` for any non-empty filter as soon as it meets an `undefined`/`null` payload, before it evaluates `$exists`. This is user-facing through `retry.fetch`'s `bodyFilter`, which calls `eventFilterMatches` on the response body.\n\n## Reproduction\n1. Setup: `packages/core` on `main`.\n2. Command: `npx tsx repro.ts` from `packages/core` with:\n```ts\nimport { eventFilterMatches } from \"./src/eventFilterMatches.js\";\nconst f = { user: { email: [{ $exists: false }] } };\nconsole.log(eventFilterMatches({}, f));             // false\nconsole.log(eventFilterMatches({ user: null }, f)); // false\nconsole.log(eventFilterMatches({ user: {} }, f));   // true\nconsole.log(eventFilterMatches({}, { email: [{ $exists: false }] })); // true\n```\n3. Trigger: a nested filter whose leaf is `$exists: false`, used with a payload where an ancestor key is absent or `null`.\n\n## Actual behavior\n```\n{} {\"user\":{\"email\":[{\"$exists\":false}]}} => false\n{\"user\":null} {\"user\":{\"email\":[{\"$exists\":false}]}} => false\n{\"user\":{}} {\"user\":{\"email\":[{\"$exists\":false}]}} => true\n{} {\"email\":[{\"$exists\":false}]} => true\n```\n\n## Expected behavior\nAll four should return `true`. If `user` is missing, then `user.email` doesn't exist either, which is exactly what `$exists: false` asserts. Top-level `$exists: false` already behaves that way (case 4, and the existing test \"should return true when payload does NOT have a key that $exists = false\"). Nesting the same condition one level deeper shouldn't flip the result.\n\n## Environment\n- Version/commit: `main` @ 93465d8549a735074d1ce7696bae3faebe577e8d\n- OS: Ubuntu (Linux), Node v24.21.0\n- Relevant configuration: none; pure function. Reachable from `retry.fetch(url, { retry: { byStatus: { \"...\": { strategy: \"backoff\", bodyFilter } } } })`\n\n## Evidence\n- Early return for `undefined`/`null` payload with a non-empty filter: https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/eventFilterMatches.ts#L7-L14\n- Recursion into nested object filters: https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/eventFilterMatches.ts#L61-L71\n- `retry.fetch` `bodyFilter` path: https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/trigger-sdk/src/v3/retry.ts#L449-L460\n- `bodyFilter: EventFilter` in the fetch retry schema: https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/v3/schemas/fetch.ts#L17 and https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/v3/schemas/fetch.ts#L39\n- Existing tests cover only top-level `$exists`: https://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/test/eventFilterMatches.test.ts#L193-L208\n\n## Additional context\n**Confirmed:** the four results above, from running the source on `main`.\n\n**Inference:** for `retry.fetch`, a `bodyFilter` such as `{ error: { retryAfter: [{ $exists: false }] } }` won't match a body that has no `error` object at all. That strategy is then skipped. I haven't exercised this through `retry.fetch` end to end.\n\n**Possible fix:** when the payload is `undefined`/`null`, evaluate the filter against an empty object (or recurse with `{}`) instead of returning `false`, so that `$exists: false` and `$isNull`-style leaves still get evaluated.\n\nFound with an [anti-slop](https://github.com/dmmulroy/anti-slop) oxlint scan (`no-runtime-typeof`), then checked by hand.\n","author":{"url":"https://github.com/apps/devin-ai-integration","@type":"Person","name":"devin-ai-integration"},"datePublished":"2026-10-11T19:15:47Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/5017"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2e2045fb-5685-adf7-4988-2547e9e03215
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA5F2:3F7AD1:6A6164:98DB3B:6AFAD858
html-safe-nonce5948cf10351f112258449ca04a5de811a632573f864ad756f09d87798aad9bd0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUYyOjNGN0FEMTo2QTYxNjQ6OThEQjNCOjZBRkFEODU4IiwidmlzaXRvcl9pZCI6Ijg3MzYzMTMzODg1NDk0NjIxMDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0465e09ed9124e9aed7d025f856748d177b28c25a94e48fa7ce73e975163162b
hovercard-subject-tagissue:5804294461
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/5017/issue_layout
twitter:imagehttps://opengraph.githubassets.com/78293f60f710b3ddcc7f408ba03f8003b769f030cb6c942911a5c5028d0c3049/triggerdotdev/trigger.dev/issues/5017
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/78293f60f710b3ddcc7f408ba03f8003b769f030cb6c942911a5c5028d0c3049/triggerdotdev/trigger.dev/issues/5017
og:image:altSummary eventFilterMatches returns false for a nested $exists: false filter when the parent key is missing or null in the payload. The function returns false for any non-empty filter as soon as it ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedevin-ai-integration[bot]
hostnamegithub.com
expected-hostnamegithub.com
None02f4c00e74911c7cd779fc232c3130cee49eb39fd0ed4bfe3eea3b82c7c18084
turbo-cache-controlno-preview
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release33c41e9d150e44415272934d676dc63c57d89c3b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/5017#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F5017
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F5017
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/5017
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/5017
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/5017
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests65 (65)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
https://github.com/triggerdotdev/trigger.dev
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5017
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5017
Bug: eventFilterMatches returns false for nested $exists: false when the parent key is missing or nullhttps://github.com/triggerdotdev/trigger.dev/issues/5017#top
https://github.com/apps/devin-ai-integration
devin-ai-integrationhttps://github.com/apps/devin-ai-integration
on Oct 11, 2026https://github.com/triggerdotdev/trigger.dev/issues/5017#issue-5804294461
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/core/src/eventFilterMatches.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/eventFilterMatches.ts#L7-L14
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/core/src/eventFilterMatches.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/eventFilterMatches.ts#L61-L71
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/trigger-sdk/src/v3/retry.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/trigger-sdk/src/v3/retry.ts#L449-L460
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/core/src/v3/schemas/fetch.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/v3/schemas/fetch.ts#L17
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/core/src/v3/schemas/fetch.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/src/v3/schemas/fetch.ts#L39
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
trigger.dev/packages/core/test/eventFilterMatches.test.tshttps://github.com/triggerdotdev/trigger.dev/blob/93465d8549a735074d1ce7696bae3faebe577e8d/packages/core/test/eventFilterMatches.test.ts#L193-L208
93465d8https://github.com/triggerdotdev/trigger.dev/commit/93465d8549a735074d1ce7696bae3faebe577e8d
anti-slophttps://github.com/dmmulroy/anti-slop
https://github.com/princejain756
princejain756https://github.com/princejain756
on Oct 21, 2026https://github.com/triggerdotdev/trigger.dev/issues/5017#issuecomment-6309701201
9f8cc32https://github.com/triggerdotdev/trigger.dev/commit/9f8cc32b327d16a840327e53c607d0dbf92f6294
princejain756/trigger.dev@eb69f51https://github.com/princejain756/trigger.dev/commit/eb69f51
cocvn157https://github.com/cocvn157
on Nov 5, 2026https://github.com/triggerdotdev/trigger.dev/issues/5017#event-35204495605
fix(core): evaluate nested event filters when parent payload is missi…https://github.com/cocvn157/trigger.dev/commit/875992bf03813fe9a5d9aee9b2326dda69312623
875992bhttps://github.com/cocvn157/trigger.dev/commit/875992bf03813fe9a5d9aee9b2326dda69312623
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5017
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/5017
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.