René's URL Explorer Experiment


Title: fix(webapp): strip null bytes from idempotency and debounce keys at trigger by ericallam · Pull Request #4527 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(webapp): strip null bytes from idempotency and debounce keys at trigger by ericallam · Pull Request #4527 · triggerdotdev/trigger.dev

X Title: fix(webapp): strip null bytes from idempotency and debounce keys at trigger by ericallam · Pull Request #4527 · triggerdotdev/trigger.dev

Description: What A trigger request carrying a Unicode NUL (U+0000) in the idempotency key or debounce key reached prisma.taskRun.create() and failed the insert, so the caller got an opaque 500 and the run was never created. These two keys are stored in jsonb columns (idempotencyKeyOptions, debounce), and Postgres rejects a NUL inside a jsonb value with SQLSTATE 22P05 ("unsupported Unicode escape sequence ... cannot be converted to text"). This fix strips the NUL from both keys at the single trigger-input chokepoint (#buildEngineTriggerInput), which every trigger path flows through (single, batch item, mollified, and drainer replay). Stripping matches the existing precedent for run errors and task events. It does not change dedup behaviour: the idempotency dedup identity is the hashed key (a clean 64-char digest), computed independently of the raw key we clean, so dedup keeps working exactly as before. For debounce the key is used directly, so the cleaned key also becomes the grouping key, an acceptable change for input that is already malformed. Why not payload / metadata / tags Those are text columns fed by JSON.stringify, which escapes a NUL to a safe escape sequence, so they do not hit this failure on the normal JSON path. (A raw NUL in a text column throws a different code, 22021, and is not what triggers this issue.) The observed failures are the jsonb 22P05 variant, which is only reachable via the two key fields. Evidence Red then green (containerTest, real Postgres): with the fix reverted, triggering through the real service with a NUL in idempotencyKeyOptions.key / debounce.key fails with the exact 22P05 signature; with the fix, the run is created and the stored key has the NUL removed. Full-stack e2e (isolated stack, real HTTP): POST /api/v1/tasks/:taskId/trigger with a NUL inside idempotencyKeyOptions.key ("acmeinc") and, separately, debounce.key ("grp1"): both returned HTTP 200 with a created run (previously 500) stored idempotencyKeyOptions = { "key": "acmeinc", "scope": "run" } (7 chars, NUL removed) stored debounce.key = "grp1" (4 chars, NUL removed) both runs render in the dashboard Unit tests cover the helper (strip, no-op fast path, object-reference reuse, null/undefined pass-through). Rollout / rollback Server-only webapp change, no flag. Zero behaviour change for clean input; only affects inputs that previously 500'd. Rollback is a straight revert, no data migration. Known limitation A raw NUL in a plain-string idempotency key (not created via idempotencyKeys.create()) lands in a text column and throws 22021 instead. That variant is not addressed here because stripping it would change the dedup identity, so it warrants a separate decision. Not observed in practice. refs TRI-13030

Open Graph Description: What A trigger request carrying a Unicode NUL (U+0000) in the idempotency key or debounce key reached prisma.taskRun.create() and failed the insert, so the caller got an opaque 500 and the run was ...

X Description: What A trigger request carrying a Unicode NUL (U+0000) in the idempotency key or debounce key reached prisma.taskRun.create() and failed the insert, so the caller got an opaque 500 and the run was ...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4527

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7b821d91-0b40-e20f-730a-d5e31277bb3b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE54C:22F43A:1595522:1E6C707:6AFAF731
html-safe-nonce0ba94c987aa3e38b06325dc6121425835be66846594ae4d52d7fb4f6fbe05164
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTRDOjIyRjQzQToxNTk1NTIyOjFFNkM3MDc6NkFGQUY3MzEiLCJ2aXNpdG9yX2lkIjoiNjIyMzYxODQ2NjUyODI5NDcwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8f1ba03171d2814c13e685dbdf35f0844409bb1df5d7f5c24f75c7cac36072c0
hovercard-subject-tagpull_request:4227865702
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4527/files
twitter:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/534?s=400&v=4
og:image:altWhat A trigger request carrying a Unicode NUL (U+0000) in the idempotency key or debounce key reached prisma.taskRun.create() and failed the insert, so the caller got an opaque 500 and the run was ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54f7a6886649661c85eee945cca0773566bfb4065370e0429b7c8f7204184650
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecf8450eb633ec589502c42ff6f4072e40db65da3
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4527%2Ffiles
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%2Fpull%2F4527%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
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 requests67 (67)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
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
ericallamhttps://github.com/ericallam
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
feature/tri-13030-fix-null-byte-in-trigger-input-fails-taskruncreate-with-anhttps://github.com/triggerdotdev/trigger.dev/tree/feature/tri-13030-fix-null-byte-in-trigger-input-fails-taskruncreate-with-an
Conversation 7 https://github.com/triggerdotdev/trigger.dev/pull/4527
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4527/commits
Checks 50 https://github.com/triggerdotdev/trigger.dev/pull/4527/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4527/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
fix(webapp): strip null bytes from idempotency and debounce keys at trigger https://github.com/triggerdotdev/trigger.dev/pull/4527/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4527/files
c352827 fix(webapp): strip null bytes from idempotency and debounce keys at t… ericallam Aug 7, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4527/commits/c35282704af78f8ed09784869ec1c1b122b62e6c
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4527/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
strip-null-bytes-trigger-keys.md https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-c2ec9c96bfe1ab77ca60a9cd71c8f0d4b78df3b941bcffcc3aecf3b9f03acd93
triggerTask.server.nullBytes.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-b9de82d3549f4db663f29096058d9931ec2a2f8f079c4ab558c6acfb5946e04e
triggerTask.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
nullBytes.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-790ca4c782931fb05149504e9381f3adb09d372e82fa844526173e0d13e7a44e
nullBytes.ts https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-bbfd53faadfe117ca790681fe882236b2d5e710a8a7702fe3fdd1ced83d9b0c8
.server-changes/strip-null-bytes-trigger-keys.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-c2ec9c96bfe1ab77ca60a9cd71c8f0d4b78df3b941bcffcc3aecf3b9f03acd93
View file https://github.com/triggerdotdev/trigger.dev/blob/c35282704af78f8ed09784869ec1c1b122b62e6c/.server-changes/strip-null-bytes-trigger-keys.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4527/{{ revealButtonHref }}
apps/webapp/app/runEngine/services/triggerTask.server.nullBytes.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-b9de82d3549f4db663f29096058d9931ec2a2f8f079c4ab558c6acfb5946e04e
View file https://github.com/triggerdotdev/trigger.dev/blob/c35282704af78f8ed09784869ec1c1b122b62e6c/apps/webapp/app/runEngine/services/triggerTask.server.nullBytes.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4527/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
apps/webapp/app/runEngine/services/triggerTask.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
View file https://github.com/triggerdotdev/trigger.dev/blob/c35282704af78f8ed09784869ec1c1b122b62e6c/apps/webapp/app/runEngine/services/triggerTask.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4527/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
https://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-f08505293cc26eea5c049086bcec37952508ae14352daf5687f5a9de3dc90843
apps/webapp/app/utils/nullBytes.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-790ca4c782931fb05149504e9381f3adb09d372e82fa844526173e0d13e7a44e
View file https://github.com/triggerdotdev/trigger.dev/blob/c35282704af78f8ed09784869ec1c1b122b62e6c/apps/webapp/app/utils/nullBytes.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4527/{{ revealButtonHref }}
apps/webapp/app/utils/nullBytes.tshttps://github.com/triggerdotdev/trigger.dev/pull/4527/files#diff-bbfd53faadfe117ca790681fe882236b2d5e710a8a7702fe3fdd1ced83d9b0c8
View file https://github.com/triggerdotdev/trigger.dev/blob/c35282704af78f8ed09784869ec1c1b122b62e6c/apps/webapp/app/utils/nullBytes.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4527/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4527/files
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.