René's URL Explorer Experiment


Title: fix(webapp): keep paused environments paused when concurrency limits are pushed by claude[bot] · Pull Request #4625 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(webapp): keep paused environments paused when concurrency limits are pushed by claude[bot] · Pull Request #4625 · triggerdotdev/trigger.dev

X Title: fix(webapp): keep paused environments paused when concurrency limits are pushed by claude[bot] · Pull Request #4625 · triggerdotdev/trigger.dev

Description: Requested by Matt Aitken · Slack thread Before: you pause an environment, then a deploy lands (or a background worker is created, or an admin changes the concurrency/burst-factor). The environment starts picking up runs again even though the dashboard still shows it as paused. After: a paused environment stays paused until it is resumed, no matter what else pushes its concurrency limit. Pausing an environment sets paused in the database and writes a 0 env concurrency limit into the run queue — the 0 is the only thing that actually stops dequeueing. Any caller that pushed the limit without an explicit value (finalizeDeployment, createBackgroundWorker, the two admin environment routes) rewrote the real limit and silently un-paused the environment. ✅ Checklist I have followed every step in the contributing guide The PR title follows the convention. I ran and tested the code works Testing apps/webapp/test/pauseEnvironment.server.test.ts gains two containerTest cases that wire a real RunEngine (real Redis) in place of the stubbed app singleton and assert the actual run-queue env limit: pause a PRODUCTION env → limit is 0 → run the real FinalizeDeploymentService → limit is still 0, plus a control on a running env in the same test proving that deploy path really does push the limit (so the 0 can't just mean "nothing happened"). pause → resume → the real limit is restored, so the clamp can't regress resuming. Both cases fail on main (expected 17 to be +0 and expected +0 to be 17) and pass with this change. pnpm run typecheck --filter webapp is clean. Changelog Fix paused environments starting to run work again after a deploy. How The clamp lives in the shared updateEnvConcurrencyLimits helper in apps/webapp/app/v3/runQueue.server.ts, so every present and future caller is covered: when no explicit limit is passed and the environment is paused, 0 is written instead of the stored maximum. An explicitly-passed limit still wins, which is what pausing itself relies on. The resume path now passes the post-update environment state (its in-memory copy was read before the un-pause and would otherwise be clamped back to 0), and the helper no longer mutates the caller's environment object — that aliasing made a pause followed by a resume on the same object write 0 twice. The existing !paused guards in allocateConcurrency and the queue-level guard in createBackgroundWorker are left in place as defence in depth, and queue-level TaskQueue.paused behaviour is untouched.

Open Graph Description: Requested by Matt Aitken · Slack thread Before: you pause an environment, then a deploy lands (or a background worker is created, or an admin changes the concurrency/burst-factor). The environment ...

X Description: Requested by Matt Aitken · Slack thread Before: you pause an environment, then a deploy lands (or a background worker is created, or an admin changes the concurrency/burst-factor). The environment ...

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

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:27c71e70-ed4f-c250-cc4b-aac15f55c37d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAB6A:3F87F:183FFB3:2218376:6AFAFE47
html-safe-nonce412011dbe7e533516d39599c4b871ae24039b0828b5bb02de83a80fd8b9fc4a0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjZBOjNGODdGOjE4M0ZGQjM6MjIxODM3Njo2QUZBRkU0NyIsInZpc2l0b3JfaWQiOiI1NDQ0OTI3NzkxODE4Mjc2NDIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacfc7169f75b91ae6cc424cf7ca77da2b4634fd66c27f146bbf730bb55a50b1a0b
hovercard-subject-tagpull_request:4282495674
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/4625/files
twitter:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
og:image:altRequested by Matt Aitken · Slack thread Before: you pause an environment, then a deploy lands (or a background worker is created, or an admin changes the concurrency/burst-factor). The environment ...
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
release3a69df62e401f1cbe8bd1ad791845bb4fc5b1c1d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4625%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%2F4625%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/4625/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4625/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4625/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
matt-aitkenhttps://github.com/matt-aitken
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
fix/paused-env-concurrency-limit-clamphttps://github.com/triggerdotdev/trigger.dev/tree/fix/paused-env-concurrency-limit-clamp
Conversation 2 https://github.com/triggerdotdev/trigger.dev/pull/4625
Commits 2 https://github.com/triggerdotdev/trigger.dev/pull/4625/commits
Checks 44 https://github.com/triggerdotdev/trigger.dev/pull/4625/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4625/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4625/files
fix(webapp): keep paused environments paused when concurrency limits are pushed https://github.com/triggerdotdev/trigger.dev/pull/4625/files#top
Show all changes 2 commits https://github.com/triggerdotdev/trigger.dev/pull/4625/files
ee3c358 fix(webapp): keep paused environments paused when concurrency limits … claude Aug 14, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4625/commits/ee3c3584ec2367a27997299f2d098e80bbc02a51
65b2152 fix(webapp): resolve the pause state from the DB when pushing env con… claude Aug 14, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4625/commits/65b215208eac0b8acd8fa160a845a836a1ebc0a1
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4625/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4625/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4625/files
paused-environment-stays-paused-after-deploy.md https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-090b82fe84b37940f67b596f42cd3af9fe3e967a2d00f8bf5707063e158deaca
runQueue.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-d721a0bc1e66697f26e0fd668fb3b4487d0b8082b8359a3e293dcc690748047d
allocateConcurrency.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-db4dcb5fe72c20c3fc230ac431f168247a66ff7c0f7ebf2ac7bc776d53864466
createBackgroundWorker.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-4f6cfdca149e5081bfdd486395d42c6d7e2a1d40a2bdf3e1c2e690d5c03b7efa
finalizeDeployment.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-ace71e0a7908dd86dcc9acf6b20eaed4703f0ba7601f466acf712cb4a3cb60fb
pauseEnvironment.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-1eaaeb9734d86b13f01167678afcefe9b99055840a3f4740f6b8ea28d17e2761
envConcurrencyLimitPause.server.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-0b5b15fdd0dc4b5b9eeb50bbca34457a93c3af341cf37b8eae18ddba07bb44cc
.server-changes/paused-environment-stays-paused-after-deploy.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-090b82fe84b37940f67b596f42cd3af9fe3e967a2d00f8bf5707063e158deaca
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/.server-changes/paused-environment-stays-paused-after-deploy.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
apps/webapp/app/v3/runQueue.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-d721a0bc1e66697f26e0fd668fb3b4487d0b8082b8359a3e293dcc690748047d
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/app/v3/runQueue.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-d721a0bc1e66697f26e0fd668fb3b4487d0b8082b8359a3e293dcc690748047d
apps/webapp/app/v3/services/allocateConcurrency.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-db4dcb5fe72c20c3fc230ac431f168247a66ff7c0f7ebf2ac7bc776d53864466
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/app/v3/services/allocateConcurrency.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-db4dcb5fe72c20c3fc230ac431f168247a66ff7c0f7ebf2ac7bc776d53864466
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-db4dcb5fe72c20c3fc230ac431f168247a66ff7c0f7ebf2ac7bc776d53864466
apps/webapp/app/v3/services/createBackgroundWorker.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-4f6cfdca149e5081bfdd486395d42c6d7e2a1d40a2bdf3e1c2e690d5c03b7efa
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/app/v3/services/createBackgroundWorker.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-4f6cfdca149e5081bfdd486395d42c6d7e2a1d40a2bdf3e1c2e690d5c03b7efa
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-4f6cfdca149e5081bfdd486395d42c6d7e2a1d40a2bdf3e1c2e690d5c03b7efa
apps/webapp/app/v3/services/finalizeDeployment.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-ace71e0a7908dd86dcc9acf6b20eaed4703f0ba7601f466acf712cb4a3cb60fb
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/app/v3/services/finalizeDeployment.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-ace71e0a7908dd86dcc9acf6b20eaed4703f0ba7601f466acf712cb4a3cb60fb
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-ace71e0a7908dd86dcc9acf6b20eaed4703f0ba7601f466acf712cb4a3cb60fb
apps/webapp/app/v3/services/pauseEnvironment.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-1eaaeb9734d86b13f01167678afcefe9b99055840a3f4740f6b8ea28d17e2761
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/app/v3/services/pauseEnvironment.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-1eaaeb9734d86b13f01167678afcefe9b99055840a3f4740f6b8ea28d17e2761
https://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-1eaaeb9734d86b13f01167678afcefe9b99055840a3f4740f6b8ea28d17e2761
apps/webapp/test/envConcurrencyLimitPause.server.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4625/files#diff-0b5b15fdd0dc4b5b9eeb50bbca34457a93c3af341cf37b8eae18ddba07bb44cc
View file https://github.com/triggerdotdev/trigger.dev/blob/65b215208eac0b8acd8fa160a845a836a1ebc0a1/apps/webapp/test/envConcurrencyLimitPause.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4625/{{ revealButtonHref }}
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.