Skip to content

docs: fix wrong samples, stale versions and broken links - #5136

Closed
jackbridger wants to merge 2 commits into
mainfrom
docs/fix-small-errors
Closed

jackbridger wants to merge 2 commits into
mainfrom
docs/fix-small-errors

Conversation

@jackbridger

Copy link
Copy Markdown
Collaborator

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 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.

mintlify broken-links reports no broken links.

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.
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c565d9e

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 Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 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.
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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

Recent review details

Context from checks skipped due to timeout: 2

  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (javascript-typescript)
Additional context used

Code guidelines: 3

docs/AGENTS.md — auto-discovered
.claude/rules/docs-writing.md — auto-discovered
.cursor/rules/writing-tasks.mdc — auto-discovered
Path-based instructions: 3

Applicability reference: AGENTS.md: # AGENTS.md Docs live in `docs/` as a Mintlify site (MDX format).

CodeRabbit inference engine (docs/AGENTS.md)

Files:

  • docs/manual-setup.mdx
  • docs/migrating-from-v3.mdx
Source excerpt: Use Mintlify MDX format.

CodeRabbit inference engine (.claude/rules/docs-writing.md)

Files:

  • docs/manual-setup.mdx
  • docs/migrating-from-v3.mdx
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...

CodeRabbit inference engine (.cursor/rules/writing-tasks.mdc)

Files:

  • docs/manual-setup.mdx
  • docs/migrating-from-v3.mdx

devin-ai-integration[bot]

This comment was marked as resolved.

@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: 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.

Suggested fix

-export const taskWithOnComplete = task({
-  id: "task-with-on-complete",
-  onComplete: async ({ payload, output, ctx }) => {
-  if (result.ok) {
-    console.log("Run succeeded", result.data);
-  } else {
-    console.log("Run failed", result.error);
-  }
-});
+import { task } from "@trigger.dev/sdk";
+
+export const taskWithOnComplete = task({
+  id: "task-with-on-complete",
+  run: async (payload: { message: string }) => {
+    return { message: payload.message };
+  },
+  onComplete: async ({ payload, result, ctx }) => {
+    if (result.ok) {
+      console.log("Run succeeded", result.data);
+    } else {
+      console.log("Run failed", result.error);
+    }
+  },
+});
Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

Review details

Context from checks skipped due to timeout: 1

  • GitHub Check: Analyze (javascript-typescript)
Additional context used

Code guidelines: 3

docs/AGENTS.md — auto-discovered
.claude/rules/docs-writing.md — auto-discovered
.cursor/rules/writing-tasks.mdc — auto-discovered
Path-based instructions: 3

Applicability reference: AGENTS.md: # AGENTS.md Docs live in `docs/` as a Mintlify site (MDX format).

CodeRabbit inference engine (docs/AGENTS.md)

Files:

  • 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
Source excerpt: Use Mintlify MDX format.

CodeRabbit inference engine (.claude/rules/docs-writing.md)

Files:

  • 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
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...

CodeRabbit inference engine (.cursor/rules/writing-tasks.mdc)

Files:

  • 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
Learnings: 1

Learning: 2026-10-27T17:56:45.137Z

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 ...

(QB_NEW_EN_HYPHEN)

run: npx prisma@6.19.0 generate
- name: Deploy Trigger.dev
run: npx trigger.dev@4.1.1 deploy --env prod
run: npx trigger.dev@latest deploy --env prod

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.

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.

Suggested fix

--- "a/docs/config/extensions/prismaExtension.mdx"
+++ "b/docs/config/extensions/prismaExtension.mdx"
@@ -331,7 +331,7 @@
   - name: Generate Prisma client
     run: npx prisma@6.19.0 generate
   - name: Deploy Trigger.dev
-    run: npx trigger.dev@latest deploy --env prod
+    run: npx trigger.dev@4.8.5 deploy --env prod
     env:
       TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
 ```
Committable suggestion

IMPORTANT
Review the replacement and indentation, then test before committing.

Suggested change
run: npx trigger.dev@latest deploy --env prod
run: npx trigger.dev@4.8.5 deploy --env prod

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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.

🤖 Addressed by Claude Code

Comment thread docs/manual-setup.mdx Resolved
Comment thread docs/migrating-from-v3.mdx Resolved
Comment thread docs/triggering.mdx
@@ -1286,7 +1287,7 @@ if (run.payloadPresignedUrl) {
corresponding `outputPresignedUrl`. Task outputs are limited to 100MB.

@coderabbitai coderabbitai Bot Nov 17, 2026 •

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.

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)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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.

🤖 Addressed by Claude Code

@jackbridger
jackbridger deleted the docs/fix-small-errors branch November 17, 2026 13:03
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