Skip to content

docs(wait): separate compute billing from concurrency release - #4405

Merged
matt-aitken merged 1 commit into
mainfrom
docs/wait-concurrency-vs-compute
Jul 28, 2026
Merged

docs(wait): separate compute billing from concurrency release#4405
matt-aitken merged 1 commit into
mainfrom
docs/wait-concurrency-vs-compute

Conversation

@matt-aitken

Copy link
Copy Markdown
Member

The wait docs describe the 5 second compute-billing threshold as if it were also the suspension threshold. It isn't, and the gap is confusing when you're sizing a poll interval:

  • Compute stops being charged for any wait longer than 5 seconds.
  • Concurrency is only released once the machine has been snapshotted and shut down. For wait.for and wait.until that happens 60 seconds into the wait — a shorter wait stays EXECUTING and holds its concurrency slot for the whole wait, even though the compute is free.

So await wait.for({ seconds: 30 }) in a polling loop never releases its slot, which looks like a bug if the docs told you waits over 5 seconds checkpoint.

Changes

docs/snippets/paused-execution-free.mdx — rendered on /wait, /wait-for and /wait-until. Drops "we checkpoint and" from the billing sentence so it's purely about compute, then adds one paragraph for the concurrency half.

docs/queue-concurrency.mdx — the "Waits and concurrency" section states flatly that waiting runs don't consume slots. Adds a short subsection for the time-based exception.

docs/how-to-reduce-your-spend.mdx — "Waits longer than 5 seconds automatically checkpoint your task, meaning you don't pay for compute" → the compute claim only. Code comments follow, plus a pointer that waiting doesn't always free concurrency.

docs/how-it-works.mdx — the Checkpoint-Resume walkthrough used wait.for({ seconds: 30 }) as the example of a wait that suspends. Bumped to 5 minutes and noted the sub-60s exception.

No behaviour change — docs only.

The wait pages described the 5 second compute-billing threshold as if it were
also the suspension threshold. It isn't: `wait.for` and `wait.until` only
checkpoint 60 seconds into the wait, so a shorter wait stays EXECUTING and
holds its concurrency slot for the whole wait even though the compute is free.

Splits the two facts in the shared wait snippet and corrects the same
conflation on the concurrency, spend and how-it-works pages.
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0afc17e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Updated documentation to define checkpoint behavior for waits under 60 seconds, change a checkpoint-resume example to a five-minute wait, clarify compute charging for waits longer than five seconds, and explain when concurrency slots are released during wait.for() and wait.until().

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it omits required template parts like Closes #issue, checklist items, testing, changelog, and screenshots. Add the missing template sections: Closes #issue, checklist entries, testing steps, a Changelog section, and Screenshots if applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main documentation change about compute billing versus concurrency release.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/wait-concurrency-vs-compute

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f206d4b3-f285-4024-8af0-d03e09d639cc

📥 Commits

Reviewing files that changed from the base of the PR and between 44eca4d and 0afc17e.

📒 Files selected for processing (4)
  • docs/how-it-works.mdx
  • docs/how-to-reduce-your-spend.mdx
  • docs/queue-concurrency.mdx
  • docs/snippets/paused-execution-free.mdx
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: check-vouch
  • GitHub Check: check-broken-links
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/CLAUDE.md)

docs/**/*.mdx: MDX documentation pages must include frontmatter with title (required), description (required), and sidebarTitle (optional) in YAML format
Use Mintlify components for structured content: , , , , , , /, /
Always import from @trigger.dev/sdk in code examples (never from @trigger.dev/sdk/v3)
Code examples must be complete and runnable where possible
Use language tags in code fences: typescript, bash, json

Documentation in docs/ uses MDX conventions defined by the documentation guidance.

Files:

  • docs/snippets/paused-execution-free.mdx
  • docs/queue-concurrency.mdx
  • docs/how-it-works.mdx
  • docs/how-to-reduce-your-spend.mdx
🧠 Learnings (2)
📚 Learning: 2026-03-10T12:44:14.176Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3200
File: docs/config/config-file.mdx:353-368
Timestamp: 2026-03-10T12:44:14.176Z
Learning: In the trigger.dev repo, docs PRs are often companions to implementation PRs. When reviewing docs PRs (MDX files under docs/), check the PR description for any companion/related PR references and verify that the documented features exist in those companion PRs before flagging missing implementations. This ensures docs stay in sync with code changes across related PRs.

Applied to files:

  • docs/snippets/paused-execution-free.mdx
  • docs/queue-concurrency.mdx
  • docs/how-it-works.mdx
  • docs/how-to-reduce-your-spend.mdx
📚 Learning: 2026-04-30T20:30:29.458Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3226
File: docs/ai-chat/quick-start.mdx:13-13
Timestamp: 2026-04-30T20:30:29.458Z
Learning: In this repo’s documentation MDX files (`docs/**/*.mdx`), use `ts` and `tsx` (not `typescript`) as the code-fence language tags for TypeScript/TSX snippets. Do not flag `ts`/`tsx` code-fence language tags as incorrect in any docs MDX file, since this is the site-wide Mintlify-compatible convention.

Applied to files:

  • docs/snippets/paused-execution-free.mdx
  • docs/queue-concurrency.mdx
  • docs/how-it-works.mdx
  • docs/how-to-reduce-your-spend.mdx
🔇 Additional comments (4)
docs/how-it-works.mdx (1)

151-151: LGTM!

Also applies to: 181-183

docs/how-to-reduce-your-spend.mdx (1)

173-174: LGTM!

Also applies to: 176-191

docs/queue-concurrency.mdx (1)

202-205: LGTM!

docs/snippets/paused-execution-free.mdx (1)

4-6: LGTM!

Comment thread docs/how-to-reduce-your-spend.mdx
@matt-aitken
matt-aitken merged commit 205bdc3 into main Jul 28, 2026
25 checks passed
@matt-aitken
matt-aitken deleted the docs/wait-concurrency-vs-compute branch July 28, 2026 14:20
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.

2 participants