René's URL Explorer Experiment


Title: fix(trigger): let workers see that Trigger.dev is available by waleedlatif1 · Pull Request #6869 · simstudioai/sim · GitHub

Open Graph Title: fix(trigger): let workers see that Trigger.dev is available by waleedlatif1 · Pull Request #6869 · simstudioai/sim

X Title: fix(trigger): let workers see that Trigger.dev is available by waleedlatif1 · Pull Request #6869 · simstudioai/sim

Description: Problem isTriggerAvailable() is Boolean(env.TRIGGER_SECRET_KEY) && isTriggerDevEnabled, and isTriggerDevEnabled reads TRIGGER_DEV_ENABLED. That variable is set on the app container but not in the Trigger.dev environment, so the check is false inside every task run — and work a task dispatches silently takes the in-process fallback instead of the queue it was written for. Runtime TRIGGER_DEV_ENABLED isTriggerAvailable() App container TRUE true — dispatches to the queue Trigger.dev worker absent false — dispatchInProcess Document processing is where this surfaced. A connector sync chunks and embeds its own documents at IN_PROCESS_DISPATCH_CONCURRENCY = 5 instead of handing them to knowledge-process-document, so that task's queue concurrency limit, machine, retry policy and duration budget all sit unused, and a sync with thousands of documents runs until it hits its own max duration. Evidence, three independent ways: A connector sync ran the full hour and hit MAX_DURATION_EXCEEDED. Its trace contains "Document dispatch failed" — a string that appears in exactly one place in the codebase, the dispatchInProcess catch block. knowledge-process-document has zero runs for that knowledge base over two days, despite thousands of documents being processed. The flag is read in 17 files, so the same silent downgrade applies to any dispatching path reachable from a task run, table backfills and imports among them. Change Assert the flag for workers via the syncEnvVars extension that already runs there for DB_APP_NAME. Putting it in trigger.config.ts keeps it version-controlled and reviewable rather than being dashboard state that can drift out of agreement with the app again. This is fail-safe. The availability check still requires TRIGGER_SECRET_KEY, which only the Trigger.dev runtime provides. Anywhere dispatching is not actually possible, the flag stays ineffective and behaviour is unchanged — the change cannot enable dispatch in an environment that cannot dispatch. Dispatch failure is also made recoverable. Only a total failure raised before, so a single failed batch left its documents at pending with nothing recording why — invisible until the stuck-document sweep happened to reach them, and never if they aged out of its 7-day window first. Those are now processed in-process instead: it costs the caller the time it hoped to hand to the queue, but the work is not dropped. That path was unreachable from a worker until this change made dispatching happen there, which is why it belongs with it. Risk and how to verify This changes where document processing executes for every connector sync, so it is worth watching rather than assuming: Expected after deploy: knowledge-process-document runs appear for connector-synced knowledge bases, where there are currently none; connector sync runs get much shorter. If dispatching turns out not to work from a worker, the flag stays false and nothing changes — or, if it half-works, the guard above processes the remainder in-process rather than dropping it. Worth confirming on staging first, since it also affects the table paths that gate on the same flag. Also here A comment trim, carried in a second commit rather than its own PR. Both this change's TSDoc and the quota classification's from #6868 explained the incident that motivated the code rather than the code itself — narrative that stops being true as the system moves and misleads instead. Each is cut back to the reason a reader needs; no behaviour change. Verification 632 embedding and knowledge tests pass; 29/29 audits; type-check clean

Open Graph Description: Problem isTriggerAvailable() is Boolean(env.TRIGGER_SECRET_KEY) && isTriggerDevEnabled, and isTriggerDevEnabled reads TRIGGER_DEV_ENABLED. That variable is set on the app container but not ...

X Description: Problem isTriggerAvailable() is Boolean(env.TRIGGER_SECRET_KEY) && isTriggerDevEnabled, and isTriggerDevEnabled reads TRIGGER_DEV_ENABLED. That variable is set on the app container ...

Opengraph URL: https://github.com/simstudioai/sim/pull/6869

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:ffa060b3-e806-9a66-512c-0b1a948630bd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD3C:2C34A2:50999D:70C6E7:6AFB5E5E
html-safe-nonce46271b2f5d30869e71fab164dd82b8ef94a817b62c724149321fd3c5f63393de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDNDOjJDMzRBMjo1MDk5OUQ6NzBDNkU3OjZBRkI1RTVFIiwidmlzaXRvcl9pZCI6IjY2OTYzNDc4NDczMDM1ODUzNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbd09f8cf236e37044b77ff11a900af43100ebbd98faa382c24301e815dc063e6
hovercard-subject-tagpull_request:4318091602
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/simstudioai/sim/pull/6869/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altProblem isTriggerAvailable() is Boolean(env.TRIGGER_SECRET_KEY) && isTriggerDevEnabled, and isTriggerDevEnabled reads TRIGGER_DEV_ENABLED. That variable is set on the app container but not ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6869/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6869%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%2Fsimstudioai%2Fsim%2Fpull%2F6869%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=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6869/files
Reloadhttps://github.com/simstudioai/sim/pull/6869/files
Reloadhttps://github.com/simstudioai/sim/pull/6869/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/trigger-worker-dispatch-flaghttps://github.com/simstudioai/sim/tree/fix/trigger-worker-dispatch-flag
Conversation 3 https://github.com/simstudioai/sim/pull/6869
Commits 2 https://github.com/simstudioai/sim/pull/6869/commits
Checks 29 https://github.com/simstudioai/sim/pull/6869/checks
Files changed https://github.com/simstudioai/sim/pull/6869/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6869/files
fix(trigger): let workers see that Trigger.dev is available https://github.com/simstudioai/sim/pull/6869/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/6869/files
8b8c9d9 fix(trigger): let workers see that Trigger.dev is available waleedlatif1 Aug 19, 2026 https://github.com/simstudioai/sim/pull/6869/commits/8b8c9d95a0f5a59862bb8b84599e2d1d68b26791
fbc21e6 refactor: tighten the comments on this change and the quota classific… waleedlatif1 Aug 19, 2026 https://github.com/simstudioai/sim/pull/6869/commits/fbc21e6b879027157c6e0c8ce76283f694e0ae03
Clear filters https://github.com/simstudioai/sim/pull/6869/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6869/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6869/files
client.test.ts https://github.com/simstudioai/sim/pull/6869/files#diff-776dd477f81ddfab85944a291f03f7cd5365106f51de7615adc673aac72a589a
client.ts https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
service.ts https://github.com/simstudioai/sim/pull/6869/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
trigger.config.ts https://github.com/simstudioai/sim/pull/6869/files#diff-3e89ed60c3946e67cfc357495159a4bf5e261ea848b2fa28ddb351aa9e7a877c
apps/sim/lib/embeddings/client.test.tshttps://github.com/simstudioai/sim/pull/6869/files#diff-776dd477f81ddfab85944a291f03f7cd5365106f51de7615adc673aac72a589a
View file https://github.com/simstudioai/sim/blob/fbc21e6b879027157c6e0c8ce76283f694e0ae03/apps/sim/lib/embeddings/client.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6869/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6869/files#diff-776dd477f81ddfab85944a291f03f7cd5365106f51de7615adc673aac72a589a
https://github.com/simstudioai/sim/pull/6869/files#diff-776dd477f81ddfab85944a291f03f7cd5365106f51de7615adc673aac72a589a
apps/sim/lib/embeddings/client.tshttps://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
View file https://github.com/simstudioai/sim/blob/fbc21e6b879027157c6e0c8ce76283f694e0ae03/apps/sim/lib/embeddings/client.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6869/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
https://github.com/simstudioai/sim/pull/6869/files#diff-bff32d70819c246fcf759a2ace839aa7e4569d2c62cf0658c5d2613a89d1170c
apps/sim/lib/knowledge/documents/service.tshttps://github.com/simstudioai/sim/pull/6869/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
View file https://github.com/simstudioai/sim/blob/fbc21e6b879027157c6e0c8ce76283f694e0ae03/apps/sim/lib/knowledge/documents/service.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6869/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6869/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
https://github.com/simstudioai/sim/pull/6869/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
https://github.com/simstudioai/sim/pull/6869/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
apps/sim/trigger.config.tshttps://github.com/simstudioai/sim/pull/6869/files#diff-3e89ed60c3946e67cfc357495159a4bf5e261ea848b2fa28ddb351aa9e7a877c
View file https://github.com/simstudioai/sim/blob/fbc21e6b879027157c6e0c8ce76283f694e0ae03/apps/sim/trigger.config.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6869/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6869/files#diff-3e89ed60c3946e67cfc357495159a4bf5e261ea848b2fa28ddb351aa9e7a877c
https://github.com/simstudioai/sim/pull/6869/files#diff-3e89ed60c3946e67cfc357495159a4bf5e261ea848b2fa28ddb351aa9e7a877c
Please reload this pagehttps://github.com/simstudioai/sim/pull/6869/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.