Skip to content

Serialize template subtask creation - #1388

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3973-cursor-automated-triage-response-3854
Draft

Serialize template subtask creation#1388
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/out-3973-cursor-automated-triage-response-3854

Conversation

@cursor

@cursor cursor Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Reduce subtask template creation batch size from 5 to 1 so a single request does not fan out DB work beyond the production Prisma pool limit reported by Sentry (connection_limit=2).
  • Add a focused Jest regression test that verifies template subtask batching stays serial.

Testing Criteria

  • yarn test src/constants/tasks.test.ts passes and confirms max concurrent handlers is 1.
  • yarn lint:check passes.
  • yarn tsc was run but fails on pre-existing missing SVG module imports in src/icons/index.ts, unrelated to this change.

Notes

  • Root-cause hypothesis: OUT-3964 increased subtask template fan-out to 5, but production Prisma pool limit in the Sentry issue title is 2. Each subtask creation performs multiple DB writes, so applying templates with several subtemplates can queue long enough to hit Prisma's 10s pool timeout.

Impact & Surface Area of Change

  • Affects internal and public task creation only when applying a template that has subtask templates.
  • Expected behavior change is lower DB pressure and slower but safer subtask-template application for large templates.
Open in Web View Automation 

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 11, 2026

Copy link
Copy Markdown

OUT-3973

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Jul 11, 2026 7:43pm

Request Review

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.

1 participant