You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: fix wrong samples, stale versions and broken links - #5136
Small corrections found by a docs audit, each checked against the current SDK source (4.8.5). Every changed code sample was extracted and type-checked with strict tsc against @trigger.dev/sdk 4.8.5; for most of them the previous version fails to compile.
Code samples that didn't compile:
defineConfig samples on manual setup, how it works and the Node versions snippet were missing maxDuration, which is required (the CLI throws without it).
auth.createPublicToken took scopes as an array; it's a permissions object.
The Realtime React sample read run.completedAt; the field is isCompleted.
Batch samples on the triggering page redeclared batch (a temporal dead zone error) and read batchHandle.id instead of batchId.
Child task samples interpolated the whole payload object and returned an undefined bar.
schedules.update was shown with deduplicationKey, which update doesn't accept.
The global tasks.onComplete hook destructured output; the field is result.
Deprecated or stale:
onStart → onStartAttempt, top-level instrumentations → telemetry.instrumentations, runtime: "bun" → "bun-1.4", and bun-1.4 added to the init runtime list.
enabledInDev on manual setup now matches what trigger.dev init writes.
Payload limit on the triggering page now says 3MB, matching the limits page and the server default.
Realtime connection limits updated to the current pricing page (Hobby 150, Pro 1,000+, bundles per 1,000).
Node 20 (end of life) → Node 24 in GitHub Actions examples; pinned CLI versions → 4.8.5; OpenTelemetry versions in the v4 migration table → the SDK's current pins.
Prisma 7 is no longer described as beta; AI SDK 7 is no longer described as canary.
Past dates in delay examples, typos, an en-dash list that rendered as paragraphs, and links that pointed at a missing anchor or went through redirects.
Fix code samples that don't compile against the current SDK (missing
maxDuration in configs, public token scopes as an array, completedAt on
the Realtime run, redeclared batch handles, undefined payload fields,
deduplicationKey on schedules.update, output on onComplete), move
deprecated options to their replacements, correct the payload and
Realtime connection limits, bump Node 20 and old CLI pins, drop Prisma
7 beta wording, and fix typos and links.
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
No actionable comments were generated in the recent review.
Walkthrough
The documentation updates compatibility references, supported runtimes, deployment examples, configuration settings, task and triggering examples, API details, Realtime limits, and navigation links. They also correct wording and formatting in several guides.
Merge Risk: Low · up to c565d
This PR corrects documentation and has no runtime impact. A few minor example and consistency issues remain open: a CI example that installs the moving @latest CLI, two samples that may not compile as shown, an alternative syntax that triggers the child tasks twice, and a conflicting output-size limit. Fix or accept these before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "docs: fix wrong samples, stale versions and broken links" follows the conventional docs prefix and matches the changeset. The PR corrects code samples, updates stale versions (Node 20 to 24…
Description check
The description follows the repository template in substance. It has a Summary section that explains the purpose (a docs audit checked against SDK 4.8.5) and lists the specific code-sample, deprecatio…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "docs: fix wrong samples, stale versions and broken links" follows the conventional docs prefix and matches the changeset. The PR corrects code samples, updates stale versions (Node 20 to 24, CLI 4.7.x to 4.8.5, Realtime limits, OpenTelemetry pins), and fixes broken or redirecting links across the docs/ MDX files. It is specific and accurate, and a teammate scanning history would understand the primary change.
Full details: Description check
Explanation
The description follows the repository template in substance. It has a Summary section that explains the purpose (a docs audit checked against SDK 4.8.5) and lists the specific code-sample, deprecation, and stale-version fixes. It reports a testing result (strict tsc type-checking of changed samples and mintlify broken-links). The template's checklist, Changelog, and Screenshots headings are absent. The Closes #<issue> line and the checklist items are not filled in, and the Testing section is written as a summary rather than the template's steps. These gaps are non-critical for a docs-only change, so the description is mostly complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9fbf22cf-8faf-43ac-b5a7-d0b6875743ba
Commits
Reviewing files that changed from the base of the PR and between c1d149b and c565d9e.
Files selected for processing: 3
docs/config/extensions/prismaExtension.mdx
docs/manual-setup.mdx
docs/migrating-from-v3.mdx
Files skipped from review as they are similar to previous changes: 1
docs/config/extensions/prismaExtension.mdx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Source excerpt: You MUST import from `@trigger.dev/sdk` (NEVER `@trigger.dev/sdk/v3`) Source excerpt: You MUST NEVER use `client.defineJob` Source excerpt: YOU MUST `export` every task, including subtasks Source excerpt: Key points: Each ta...
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (3)
Minor · Import task in each batch example. · triggering.mdx:248
docs/triggering.mdx:248 Minor · Functional Correctness · Quick win
Import task in each batch example.
Each example calls task(...) but imports only batch. Copying any example fails to compile before it can retrieve the batch. Add task to each SDK import.
As per coding guidelines, “Code examples should be complete and runnable where possible.”
Also applies to: 265-265, 284-284
Source: Coding guidelines
Minor · Show the alternative without triggering the tasks again. · triggering.mdx:645
docs/triggering.mdx:645 Minor · Functional Correctness · Quick win
Show the alternative without triggering the tasks again.
The first call already triggers both children. The destructuring example makes a second call, so copying the sample triggers four runs instead of two. Destructure the first result, or show the alternative in a separate example.
Minor · Make the task-level onComplete example compile. · overview.mdx:417-423
docs/tasks/overview.mdx:417-423 Minor · Functional Correctness · Quick win
Make the task-level onComplete example compile.
The task-level onComplete example is not valid TypeScript. The callback destructures output, which the hook parameters do not provide, and it uses result without binding it. The braces also do not balance. The example omits the task import and the required run function. Bind result from the hook parameters and give the task a complete definition.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: b9a7fca6-d0bf-4778-875a-2ab562717182
Commits
Reviewing files that changed from the base of the PR and between 9c2ae20 and c1d149b.
Files selected for processing: 18
docs/ai-chat/reference.mdx
docs/cli-init-commands.mdx
docs/config/extensions/prismaExtension.mdx
docs/deployment/preview-branches.mdx
docs/github-actions.mdx
docs/how-it-works.mdx
docs/limits.mdx
docs/management/overview.mdx
docs/manual-setup.mdx
docs/migrating-from-v3.mdx
docs/runs.mdx
docs/snippets/node-versions.mdx
docs/tasks/overview.mdx
docs/tasks/scheduled.mdx
docs/tasks/schemaTask.mdx
docs/triggering.mdx
docs/upgrading-packages.mdx
docs/video-walkthrough.mdx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Source excerpt: You MUST import from `@trigger.dev/sdk` (NEVER `@trigger.dev/sdk/v3`) Source excerpt: You MUST NEVER use `client.defineJob` Source excerpt: YOU MUST `export` every task, including subtasks Source excerpt: Key points: Each ta...
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-10-27T17:56:45.137Z
Learning: Applies to ** : Source excerpt:
# How to write Trigger.dev tasks
## Correct Schedules task (cron) implementations
### Attach an Imperative schedule
#### Attach schedules with the SDK like this
```ts
const createdSchedule = await schedules.create({
//The id of the scheduled task you want to attach to.
task: firstScheduledTask.id,
//The schedule in cron format.
cron: "0 0 * * *",
//this is required, it prevents you from creating duplicate schedules. It will update the schedule if it already exists.
deduplicationKey: "my-deduplication-key",
});
```
Applied to files:
docs/tasks/scheduled.mdx
LanguageTool
docs/ai-chat/reference.mdx
[grammar] ~12-~12: Use a hyphen to join words.
Context: ... peer. v6 is what we develop against day to day; v5 and v7 work too. Your installed ...
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Supported by static analysis
Script executed:
sed -n '320,345p' docs/config/extensions/prismaExtension.mdx
rg -n 'trigger.dev@' docs --glob '*.mdx'| head -50
rg -n -i 'mismatch|version pinning|pin' docs/github-actions.mdx docs/upgrading-packages.mdx docs/cli-deploy-commands.mdx | head -30
Repository: triggerdotdev/trigger.dev
Length of output: 6845
Pin the deploy CLI to the project's SDK version in this CI example.
@latest installs whatever CLI version is newest at run time. When the project's @trigger.dev/sdk lags behind, the deploy step fails. The GitHub Actions guide documents this failure in its CLI version pinning section. Use the CLI version that matches the project's SDK, as the upgrade guide does.
The reason will be displayed to describe this comment to others. Learn more.
Leaving this as @latest: every other CI deploy example in the docs (GitHub Actions, preview branches) uses @latest, and the GitHub Actions page's pinning section covers matching the SDK version. Changing it here alone would make this one example inconsistent.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Reconcile the task output limits.
This section states a 100MB limit, but the linked Limits page states 10MB. Readers cannot determine which output size is supported. Check the enforced limit and make both pages consistent. (raw.githubusercontent.com)
The reason will be displayed to describe this comment to others. Learn more.
The 100MB line predates this PR and the enforced output limit isn't in the code I checked, so I've raised it with the team instead of guessing which page is right. Leaving it out of this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Small corrections found by a docs audit, each checked against the current SDK source (4.8.5). Every changed code sample was extracted and type-checked with strict
tscagainst@trigger.dev/sdk4.8.5; for most of them the previous version fails to compile.Code samples that didn't compile:
defineConfigsamples on manual setup, how it works and the Node versions snippet were missingmaxDuration, which is required (the CLI throws without it).auth.createPublicTokentookscopesas an array; it's a permissions object.run.completedAt; the field isisCompleted.batch(a temporal dead zone error) and readbatchHandle.idinstead ofbatchId.bar.schedules.updatewas shown withdeduplicationKey, which update doesn't accept.tasks.onCompletehook destructuredoutput; the field isresult.Deprecated or stale:
onStart→onStartAttempt, top-levelinstrumentations→telemetry.instrumentations,runtime: "bun"→"bun-1.4", andbun-1.4added to the init runtime list.enabledInDevon manual setup now matches whattrigger.dev initwrites.delayexamples, typos, an en-dash list that rendered as paragraphs, and links that pointed at a missing anchor or went through redirects.mintlify broken-linksreports no broken links.