Skip to content

chore: adopt TypeScript 7.0 beta (tsgo) for typecheck#3431

Draft
ericallam wants to merge 1 commit intomainfrom
devin/1776941095-ts7-beta
Draft

chore: adopt TypeScript 7.0 beta (tsgo) for typecheck#3431
ericallam wants to merge 1 commit intomainfrom
devin/1776941095-ts7-beta

Conversation

@ericallam
Copy link
Copy Markdown
Member

@ericallam ericallam commented Apr 23, 2026

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

Ran the full workspace typecheck with the native-preview compiler on every app and package:

pnpm run typecheck --force
# Tasks:    45 successful, 45 total
# Cached:    0 cached, 45 total
# Time:     4m35.832s   (cold — no Turbo cache for typecheck tasks)
pnpm run typecheck          # re-run, cache fully warm
# Tasks:    45 successful, 45 total
# Cached:   45 cached, 45 total
# Time:     1.268s >>> FULL TURBO

This also builds every package whose typecheck depends on emitted outputs (core, sdk, cli-v3, database, clickhouse, run-engine, schedule-engine, replication, compute, redis-worker, react-hooks, rsc, build, schema-to-json, python), all with tsc 5.5.4 — so both pipelines are exercised.


Benchmarks: tsgo 7.0 beta vs tsc 5.5.4

Measured on the development VM (AMD x86_64, 2 physical cores, 8 GB RAM, Linux 6.x, Node.js 20.20.0). Numbers are bash time wall clock, over the same source tree, with node_modules already installed, upstream package build outputs already produced and cached in Turbo (so the typecheck task is the only thing being re-run). The tsc column was produced by sed-swapping tsgotsc in every typecheck script, running the same commands, then reverting — no config differences.

Full monorepo (45 workspaces via Turbo)

Scenario tsgo (TS 7.0 beta) tsc 5.5.4 Speed-up
Coldpnpm run typecheck --force (typecheck cache cleared, ^build outputs cached) 4 m 35.8 s (user 8 m 01 s) 7 m 46.8 s (user 14 m 08 s) ~1.7×
Warmpnpm run typecheck (full Turbo cache hit, no compiler runs) 1.3 s 1.3 s

Single workspace — apps/webapp (pure compiler, no Turbo)

Runs <compiler> --noEmit directly from apps/webapp/, filesystem cache pre-warmed.

Run tsgo tsc 5.5.4 Notes
Run 1 43.9 s (user 69.2 s) 111.4 s (user 150.7 s) tsc needs NODE_OPTIONS=--max-old-space-size=6144; at the default 2 GB heap it aborts with v8 OrderedHashTable/Mark-Compact allocation failure after ~52 s.
Run 2 46.2 s (user 73.9 s) 103.2 s (user 138.8 s)
Avg 45.0 s 107.3 s ~2.4× speed-up; no OOM

Takeaways

  • Cold cache is meaningfully faster: ~3 min saved on the full repo, ~1 min saved on just the webapp. That's the cost your editor / lint-on-save / CI cold boot all see.
  • Warm cache is unchanged: once Turbo has cached a typecheck task, both compilers are equivalent (because neither runs). This PR does not speed up the >>> FULL TURBO green path.
  • Memory footprint is dramatically smaller: the native Go binary doesn't inherit V8's 2 GB heap cap. tsc --noEmit on apps/webapp OOMs at the default Node heap size; tsgo finishes well below 1 GB RSS.
  • Parallelism is CPU-limited on this VM: tsgo's user-CPU / wall-clock ratio is ~1.6× (close to 2 cores saturated). On dev machines with more cores the speedup should widen closer to the ~10× the TS 7 launch post measured.
  • Diagnostic output is equivalent: every error tsc surfaced in the benchmark runs (TS2550, TS2578, TS2339, TS18048, etc.) was also surfaced by tsgo. No silent false negatives were observed.

Reproducing

# tsgo (current state of this branch)
pnpm run typecheck --force          # cold
pnpm run typecheck                  # warm

# tsc 5.5.4 (sed-swap, then revert)
find apps internal-packages packages -name package.json -not -path "*/node_modules/*" -print0 \
  | xargs -0 grep -l '"tsgo' \
  | while read f; do cp "$f" "$f.bak"; sed -i 's/tsgo/tsc/g' "$f"; done

NODE_OPTIONS="--max-old-space-size=6144" pnpm run typecheck --force   # cold
NODE_OPTIONS="--max-old-space-size=6144" pnpm run typecheck           # warm

find apps internal-packages packages -name '*.bak' -not -path "*/node_modules/*" \
  | while read f; do mv "$f" "${f%.bak}"; done

Changelog

Adopts the newly-announced TypeScript 7.0 beta (the Go-native tsgo compiler) for type-checking across the monorepo. The TypeScript 5.5.4 tsc is retained for emit (package builds), so published artifacts are byte-for-byte identical to main.

Approach

  • Add @typescript/native-preview@7.0.0-dev.20260421.2 to the root devDependencies. This pulls in the tsgo binary and the platform-specific native packages (@typescript/native-preview-linux-x64, etc.).
  • Add it (and the @typescript/native-preview-* platform packages) to pnpm-workspace.yaml's minimumReleaseAgeExclude so pnpm doesn't block the nightly beta on the 3-day release-age rule.
  • Replace tsc with tsgo only in typecheck scripts across 30 package.json files (43 occurrences). build and dev scripts that actually emit (apps/supervisor, internal-packages/{database,compute,clickhouse,replication,run-engine,schedule-engine}) continue to use tsc to avoid any runtime surprises from the beta emitter.
  • Keep "typescript": "5.5.4" as a pnpm override so every programmatic TS consumer (typescript-eslint, vite, remix, tshy, ts-proto, etc.) continues to run against a known-stable compiler.

Config changes required by TS 7.0 (= TS 6.0 semantics)

TS 6.0 removed several long-deprecated tsconfig options. The following edits make existing configs forward-compatible while staying valid for tsc 5.5.4:

  • apps/webapp/tsconfig.json: dropped baseUrl (removed in TS 6.0; paths alone is sufficient).
  • .configs/tsconfig.base.json: dropped downlevelIteration (removed in TS 6.0; modern targets don't need it).
  • moduleResolution: "node" / "Node""bundler" in the five packages that still used the legacy value: internal-packages/{tsql,zod-worker,testcontainers,emails}. Those packages are typecheck-only (--noEmit), so bundler is the least-invasive choice; I bumped module to ESNext in zod-worker/testcontainers to satisfy the bundler-resolution constraint.
  • internal-packages/database still emits with tsc, so tsconfig.json keeps moduleResolution: "node" for the build. Typecheck goes through a new tsconfig.typecheck.json that extends it and sets moduleResolution: "bundler" / module: "ESNext".
  • internal-packages/otlp-importer/tsconfig.json: added "types": ["node"]. tsgo doesn't auto-include @types/node as eagerly as tsc when lib already pulls in DOM.

Dependency bump

  • @types/node: 20.14.1420.19.39 (direct dep and pnpm override, plus packages/python). TS 7's lib.d.ts tightens Uint8Array<TArrayBuffer extends ArrayBufferLike>, so the older types drove ~30 genuine Buffer vs Uint8Array mismatches in otlp-importer generated code and webapp routes. The bump reconciles them.

Source-level fixes flushed out by the stricter checker

All minimal, bug-for-bug equivalent:

  • apps/webapp/app/routes/otel.v1.{logs,metrics,traces}.ts: new Response(buf) with a protobuf Uint8Array now needs an explicit as BodyInit cast (DOM's BodyInit union vs. node's generic Uint8Array).
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts: cast new TextDecoderStream() through ReadableWritablePair<string, Uint8Array> for the same reason.
  • apps/webapp/test/setup-test-env.ts: removed a dangling import "@testing-library/jest-dom/extend-expect" — the package isn't in the dep tree and this file isn't wired into the vitest setup, so the import was dead.
  • internal-packages/clickhouse/src/client/client.ts: typed row.json<Record<number, unknown>>() so subsequent index access type-checks (previously inferred unknown).
  • packages/cli-v3/src/apiClient.ts: pre-existing bug — onConnectionError was reading error.status, but the eventsource@3 ErrorEvent field is error.code. User-visible in the trigger.dev deploy error message for SSE connection failures.

What this does not do

  • Does not switch build/dev emission to tsgo. tsgo still has rough edges around --watch and some emit options, and switching would change shipped artifacts. This PR is pure typechecker swap.
  • Does not change the pinned typescript version (5.5.4). tsgo implements TS 6.0 semantics today; the JS tsc stays put until TS 6.x / 7.x ships stable.
  • Does not upgrade @types/node past the 20.x line (pinned because the runtime is Node 20.20.0).

Screenshots

n/a — dev tooling only.

Link to Devin session: https://app.devin.ai/sessions/89038603ea414395a95cc8681a9d0a5a
Requested by: @ericallam

Co-Authored-By: Eric Allam <eallam@icloud.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

⚠️ No Changeset found

Latest commit: d69e546

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
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Walkthrough

This pull request performs a monorepo-wide migration from the TypeScript compiler (tsc) to tsgo for typechecking. The typecheck npm scripts across 30+ packages are updated to invoke tsgo --noEmit instead of tsc --noEmit. TypeScript configuration files are adjusted to remove downlevelIteration and baseUrl settings and update module resolution strategies from "node" to "bundler" in several packages. Three OTLP route handlers and one Redis realtime stream utility are modified with explicit BodyInit type casts. Root dependencies are updated to bump @types/node from 20.14.14 to 20.19.39 and add @typescript/native-preview as a dev dependency at version 7.0.0-dev.20260421.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adopting TypeScript 7.0 beta (tsgo) for typecheck scripts across the monorepo.
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.
Description check ✅ Passed Pull request provides comprehensive description with all required checklist items completed, detailed testing results, changelog, and benchmark data.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1776941095-ts7-beta

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 and usage tips.

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 55-56: Run pnpm install to regenerate pnpm-lock.yaml so the new
package `@typescript/native-preview`@7.0.0-dev.20260421.2 and its
platform-specific optional dependencies are recorded; after installing, verify
the lockfile contains entries for "@typescript/native-preview" and its platform
variants (tsgo binary/platform packages), then commit the updated
pnpm-lock.yaml.

In `@packages/rsc/package.json`:
- Line 35: This PR modified public packages but lacks changesets: add a
changeset entry for each touched public package "@trigger.dev/rsc",
"@trigger.dev/react-hooks", and "@trigger.dev/trigger-sdk" (commit d69e5464) by
running "pnpm run changeset:add" (or manually create .changeset/*.md files) and
specify the package name and bump type, or if these are intentional
tooling-only, add a short changeset explaining the change is release-neutral and
why; ensure the new entries are committed so the releases tooling recognizes the
updates rather than only having the existing `@trigger.dev/core` changeset.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b1f81889-02d8-4680-8812-b70747ab4bcd

📥 Commits

Reviewing files that changed from the base of the PR and between 8eb596f and d69e546.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (47)
  • .configs/tsconfig.base.json
  • apps/coordinator/package.json
  • apps/docker-provider/package.json
  • apps/kubernetes-provider/package.json
  • apps/supervisor/package.json
  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • apps/webapp/package.json
  • apps/webapp/test/setup-test-env.ts
  • apps/webapp/tsconfig.json
  • internal-packages/cache/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/clickhouse/src/client/client.ts
  • internal-packages/compute/package.json
  • internal-packages/database/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/emails/package.json
  • internal-packages/emails/tsconfig.json
  • internal-packages/llm-model-catalog/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/otlp-importer/tsconfig.json
  • internal-packages/redis/package.json
  • internal-packages/replication/package.json
  • internal-packages/run-engine/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/testcontainers/package.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/tracing/package.json
  • internal-packages/tsql/package.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/zod-worker/package.json
  • internal-packages/zod-worker/tsconfig.json
  • package.json
  • packages/build/package.json
  • packages/cli-v3/package.json
  • packages/cli-v3/src/apiClient.ts
  • packages/core/package.json
  • packages/python/package.json
  • packages/react-hooks/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • packages/schema-to-json/package.json
  • packages/trigger-sdk/package.json
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (3)
  • .configs/tsconfig.base.json
  • apps/webapp/test/setup-test-env.ts
  • apps/webapp/tsconfig.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/tsconfig.json

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use strict mode in TypeScript configuration

Files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • internal-packages/zod-worker/tsconfig.json
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/llm-model-catalog/package.json
  • apps/kubernetes-provider/package.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/zod-worker/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • apps/coordinator/package.json
  • apps/webapp/app/routes/otel.v1.logs.ts
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • packages/python/package.json
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/docker-provider/package.json
  • apps/supervisor/package.json
  • package.json
  • internal-packages/zod-worker/tsconfig.json
  • pnpm-workspace.yaml
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • internal-packages/sdk-compat-tests/package.json
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use zod for validation in packages/core and apps/webapp

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Add crumbs as you write code using // @Crumbs comments or `// `#region` `@crumbs blocks. These are temporary debug instrumentation and must be stripped using agentcrumbs strip before merge.

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
**/*.ts{,x}

📄 CodeRabbit inference engine (CLAUDE.md)

Always import from @trigger.dev/sdk when writing Trigger.dev tasks. Never use @trigger.dev/sdk/v3 or deprecated client.defineJob.

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

apps/webapp/**/*.{ts,tsx}: Access environment variables through the env export of env.server.ts instead of directly accessing process.env
Use subpath exports from @trigger.dev/core package instead of importing from the root @trigger.dev/core path

Use named constants for sentinel/placeholder values (e.g. const UNSET_VALUE = '__unset__') instead of raw string literals scattered across comparisons

Files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
apps/webapp/**/*.server.ts

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

apps/webapp/**/*.server.ts: Never use request.signal for detecting client disconnects. Use getRequestAbortSignal() from app/services/httpAsyncStorage.server.ts instead, which is wired directly to Express res.on('close') and fires reliably
Access environment variables via env export from app/env.server.ts. Never use process.env directly
Always use findFirst instead of findUnique in Prisma queries. findUnique has an implicit DataLoader that batches concurrent calls and has active bugs even in Prisma 6.x (uppercase UUIDs returning null, composite key SQL correctness issues, 5-10x worse performance). findFirst is never batched and avoids this entire class of issues

Files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
🧠 Learnings (59)
📓 Common learnings
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 2710
File: packages/schema-to-json/package.json:0-0
Timestamp: 2025-11-26T14:40:07.146Z
Learning: Node.js 24+ has native TypeScript support and can execute .ts files directly without tsx or ts-node for scripts that use only erasable TypeScript syntax (type annotations, interfaces, etc.). The trigger.dev repository uses Node.js 24.11.1+ and scripts like updateVersion.ts can be run with `node` instead of `tsx`.
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code
Learnt from: isshaddad
Repo: triggerdotdev/trigger.dev PR: 3262
File: docs/guides/frameworks/nango.mdx:71-71
Timestamp: 2026-03-25T00:18:26.339Z
Learning: Applies to docs/guides/frameworks/**/*.mdx : The trigger.dev docs repo uses `ts` (not `typescript`) as the code-fence language tag for TypeScript snippets. This is the consistent convention across all framework guides (nextjs, sequin, prisma, remix, drizzle, etc.).
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/redis-worker/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:43.173Z
Learning: Applies to packages/redis-worker/**/*@(job|queue|worker|background).{ts,tsx} : Use trigger.dev/redis-worker for all new background job implementations, replacing graphile-worker and zodworker
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to {packages/core,apps/webapp}/**/*.{ts,tsx} : Use zod for validation in packages/core and apps/webapp
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : Use Prisma for database interactions in internal-packages/database with PostgreSQL
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/build/**/* : Build system in `src/build/` should use configuration from `trigger.config.ts` in user projects to determine bundling, build extensions, and output structure

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • packages/python/package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/tsconfig.json : Use strict mode in TypeScript configuration

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/zod-worker/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • internal-packages/zod-worker/tsconfig.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to trigger.config.ts : Configure build options including `external` packages, `jsx` settings, `conditions`, and `extensions` in the `build` option

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • packages/python/package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/compute/package.json
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/build/**/* : Bundle worker code using the build system in `src/build/` based on configuration from `trigger.config.ts`

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/zod-worker/package.json
  • internal-packages/replication/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/schedule-engine/package.json
  • packages/python/package.json
  • package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
📚 Learning: 2026-03-22T19:26:49.299Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: internal-packages/emails/emails/alert-error-group.tsx:58-58
Timestamp: 2026-03-22T19:26:49.299Z
Learning: In the triggerdotdev/trigger.dev codebase, email template files under `internal-packages/emails/emails/` must use `export default function Email(...)` (default export) because the React Email previewer requires a default export to discover and render templates. Do not flag default exports in these files as violations of the "use named exports" coding guideline.

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/emails/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to {packages/core,apps/webapp}/**/*.{ts,tsx} : Use zod for validation in packages/core and apps/webapp

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/zod-worker/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • internal-packages/emails/package.json
  • packages/build/package.json
  • internal-packages/otlp-importer/tsconfig.json
  • apps/supervisor/package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
  • apps/webapp/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use function declarations instead of default exports

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • internal-packages/zod-worker/tsconfig.json
📚 Learning: 2026-04-15T15:39:31.575Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/webapp.mdc:0-0
Timestamp: 2026-04-15T15:39:31.575Z
Learning: Applies to apps/webapp/**/*.{ts,tsx} : Use subpath exports from `trigger.dev/core` package instead of importing from the root `trigger.dev/core` path

Applied to files:

  • internal-packages/emails/tsconfig.json
  • internal-packages/tracing/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/redis/package.json
  • internal-packages/zod-worker/tsconfig.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Use `pnpm run typecheck` to verify changes in apps and internal packages (`apps/*`, `internal-packages/*`). Never use `build` for these — building proves almost nothing about correctness.

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • apps/kubernetes-provider/package.json
  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/zod-worker/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • apps/coordinator/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • packages/python/package.json
  • apps/docker-provider/package.json
  • apps/supervisor/package.json
  • package.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2025-11-26T14:40:07.146Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 2710
File: packages/schema-to-json/package.json:0-0
Timestamp: 2025-11-26T14:40:07.146Z
Learning: Node.js 24+ has native TypeScript support and can execute .ts files directly without tsx or ts-node for scripts that use only erasable TypeScript syntax (type annotations, interfaces, etc.). The trigger.dev repository uses Node.js 24.11.1+ and scripts like updateVersion.ts can be run with `node` instead of `tsx`.

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • apps/kubernetes-provider/package.json
  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/zod-worker/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • apps/coordinator/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/testcontainers/tsconfig.json
  • internal-packages/otlp-importer/tsconfig.json
  • packages/python/package.json
  • apps/docker-provider/package.json
  • apps/supervisor/package.json
  • package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2026-04-16T14:19:16.330Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/webapp/CLAUDE.md:0-0
Timestamp: 2026-04-16T14:19:16.330Z
Learning: Never run `pnpm run build --filter webapp` to verify changes. Use typecheck from the repo root instead (`pnpm run typecheck --filter webapp`). Building proves almost nothing about correctness; only run typecheck after major changes (new files, significant refactors, schema changes)

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • apps/coordinator/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • packages/python/package.json
  • apps/docker-provider/package.json
  • apps/supervisor/package.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2026-01-15T10:48:02.687Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T10:48:02.687Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Use vitest for running unit tests

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • internal-packages/tsql/package.json
  • packages/redis-worker/package.json
  • internal-packages/run-engine/package.json
  • packages/trigger-sdk/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/testcontainers/tsconfig.json
  • apps/supervisor/package.json
  • package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Use vitest for all tests in the Trigger.dev repository

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • internal-packages/tsql/tsconfig.json
  • internal-packages/cache/package.json
  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • internal-packages/tsql/package.json
  • packages/redis-worker/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • internal-packages/testcontainers/tsconfig.json
  • apps/supervisor/package.json
  • package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • apps/webapp/package.json
📚 Learning: 2025-11-27T16:26:44.496Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/executing-commands.mdc:0-0
Timestamp: 2025-11-27T16:26:44.496Z
Learning: For running tests, navigate into the package directory and run `pnpm run test --run` to enable single-file test execution (e.g., `pnpm run test ./src/engine/tests/ttl.test.ts --run`)

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/schedule-engine/package.json
  • packages/python/package.json
  • apps/supervisor/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Applies to **/*.test.{ts,tsx} : Use vitest exclusively for testing. Never mock anything — use testcontainers instead.

Applied to files:

  • internal-packages/llm-model-catalog/package.json
  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • internal-packages/testcontainers/tsconfig.json
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/deploy/buildImage.ts : Build Docker images using `src/deploy/buildImage.ts` for local Docker/Depot or remote builds

Applied to files:

  • apps/kubernetes-provider/package.json
  • apps/coordinator/package.json
  • apps/docker-provider/package.json
📚 Learning: 2026-03-02T12:43:43.173Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/redis-worker/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:43.173Z
Learning: Applies to packages/redis-worker/**/redis-worker/**/*.{test,spec}.{ts,tsx} : Use testcontainers for Redis in test files for redis-worker

Applied to files:

  • internal-packages/testcontainers/package.json
  • packages/redis-worker/package.json
  • internal-packages/redis/package.json
  • internal-packages/testcontainers/tsconfig.json
  • package.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: When modifying any public package (`packages/*` or `integrations/*`), add a changeset using `pnpm run changeset:add`.

Applied to files:

  • internal-packages/testcontainers/package.json
  • internal-packages/cache/package.json
  • internal-packages/zod-worker/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/tsql/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/tracing/package.json
  • internal-packages/emails/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • apps/coordinator/package.json
  • packages/core/package.json
  • internal-packages/redis/package.json
  • internal-packages/schedule-engine/package.json
  • package.json
  • pnpm-workspace.yaml
  • internal-packages/sdk-compat-tests/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2026-03-02T12:43:25.254Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: internal-packages/run-engine/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:25.254Z
Learning: Applies to internal-packages/run-engine/src/engine/tests/**/*.test.ts : Implement tests for RunEngine in `src/engine/tests/` using testcontainers for Redis and PostgreSQL containerization

Applied to files:

  • internal-packages/testcontainers/package.json
  • internal-packages/run-engine/package.json
  • internal-packages/redis/package.json
  • internal-packages/testcontainers/tsconfig.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Applies to **/*.test.{ts,tsx} : For Redis/PostgreSQL tests in vitest, use testcontainers helpers: `redisTest`, `postgresTest`, or `containerTest` imported from `internal/testcontainers`.

Applied to files:

  • internal-packages/testcontainers/package.json
  • internal-packages/testcontainers/tsconfig.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Use `pnpm run build` to verify changes in public packages (`packages/*`). Build proves correctness for these published packages.

Applied to files:

  • internal-packages/cache/package.json
  • internal-packages/replication/package.json
  • packages/rsc/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • packages/core/package.json
  • packages/schema-to-json/package.json
  • internal-packages/schedule-engine/package.json
  • packages/python/package.json
  • package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/dev.ts : Implement `dev.ts` command in `src/commands/` for local development mode

Applied to files:

  • packages/cli-v3/package.json
  • internal-packages/replication/package.json
  • internal-packages/otlp-importer/package.json
  • internal-packages/database/package.json
  • packages/redis-worker/package.json
  • packages/rsc/package.json
  • internal-packages/emails/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/run-engine/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • packages/python/package.json
  • apps/docker-provider/package.json
  • internal-packages/compute/package.json
  • packages/react-hooks/package.json
  • apps/webapp/package.json
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/deploy.ts : Implement `deploy.ts` command in `src/commands/` for production deployment

Applied to files:

  • packages/cli-v3/package.json
  • packages/cli-v3/src/apiClient.ts
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Applies to **/*.ts{,x} : Always import from `trigger.dev/sdk` when writing Trigger.dev tasks. Never use `trigger.dev/sdk/v3` or deprecated `client.defineJob`.

Applied to files:

  • packages/cli-v3/package.json
  • internal-packages/tracing/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/redis/package.json
  • internal-packages/zod-worker/tsconfig.json
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2026-03-02T12:43:34.140Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/cli-v3/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:34.140Z
Learning: Applies to packages/cli-v3/src/commands/promote.ts : Implement `promote.ts` command in `src/commands/` for deployment promotion

Applied to files:

  • packages/cli-v3/package.json
  • packages/cli-v3/src/apiClient.ts
📚 Learning: 2026-03-02T12:43:48.124Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/trigger-sdk/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:48.124Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx,js,jsx} : Always import from `trigger.dev/sdk`. Never use `trigger.dev/sdk/v3` (deprecated path alias)

Applied to files:

  • packages/cli-v3/package.json
  • packages/trigger-sdk/package.json
  • pnpm-workspace.yaml
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to **/*.{ts,tsx} : Use types over interfaces for TypeScript

Applied to files:

  • packages/cli-v3/package.json
  • internal-packages/database/tsconfig.typecheck.json
  • internal-packages/otlp-importer/tsconfig.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to internal-packages/database/**/*.{ts,tsx} : Use Prisma for database interactions in internal-packages/database with PostgreSQL

Applied to files:

  • internal-packages/zod-worker/package.json
  • internal-packages/database/package.json
  • internal-packages/database/tsconfig.typecheck.json
📚 Learning: 2026-03-02T12:43:17.177Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: internal-packages/database/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:17.177Z
Learning: Applies to internal-packages/database/**/{app,src,webapp}/**/*.{ts,tsx,js,jsx} : Use `$replica` from `~/db.server` for read-heavy queries in the webapp instead of the primary database connection

Applied to files:

  • internal-packages/replication/package.json
  • internal-packages/database/tsconfig.typecheck.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schemaTask()` from `trigger.dev/sdk` with a Zod schema for payload validation

Applied to files:

  • internal-packages/tsql/package.json
  • internal-packages/tracing/package.json
  • internal-packages/clickhouse/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/redis/package.json
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2026-03-02T12:43:17.177Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: internal-packages/database/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:17.177Z
Learning: Edit Prisma schema at `prisma/schema.prisma` and generate migrations using `pnpm run db:migrate:dev:create --name "descriptive_name"` from the `internal-packages/database` directory

Applied to files:

  • internal-packages/database/package.json
📚 Learning: 2026-01-15T10:48:02.687Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T10:48:02.687Z
Learning: Applies to **/*.{js,ts,jsx,tsx,json,md,yaml,yml} : Format code using Prettier before committing

Applied to files:

  • internal-packages/database/package.json
📚 Learning: 2026-03-02T12:43:43.173Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/redis-worker/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:43.173Z
Learning: Applies to packages/redis-worker/**/*@(job|queue|worker|background).{ts,tsx} : Use trigger.dev/redis-worker for all new background job implementations, replacing graphile-worker and zodworker

Applied to files:

  • packages/redis-worker/package.json
  • internal-packages/redis/package.json
📚 Learning: 2026-03-02T12:43:43.173Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/redis-worker/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:43.173Z
Learning: Applies to packages/redis-worker/**/redis-worker/src/queue.ts : Job queue abstraction should be Redis-backed in src/queue.ts

Applied to files:

  • packages/redis-worker/package.json
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-03-02T12:43:43.173Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/redis-worker/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:43.173Z
Learning: Applies to packages/redis-worker/**/redis-worker/src/worker.ts : Worker loop and job processing should implement concurrency control in src/worker.ts

Applied to files:

  • packages/redis-worker/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Export every task, including subtasks

Applied to files:

  • packages/rsc/package.json
  • packages/build/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/otlp-importer/tsconfig.json
  • packages/python/package.json
  • packages/react-hooks/package.json
📚 Learning: 2026-03-02T12:43:25.254Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: internal-packages/run-engine/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:25.254Z
Learning: Applies to internal-packages/run-engine/src/engine/systems/**/*.ts : Integrate OpenTelemetry tracer and meter instrumentation in RunEngine systems for observability

Applied to files:

  • internal-packages/tracing/package.json
  • internal-packages/run-engine/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `task()` from `trigger.dev/sdk` for basic task definitions with `id` and `run` properties

Applied to files:

  • internal-packages/tracing/package.json
  • internal-packages/clickhouse/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/redis/package.json
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2026-03-25T00:18:26.339Z
Learnt from: isshaddad
Repo: triggerdotdev/trigger.dev PR: 3262
File: docs/guides/frameworks/nango.mdx:71-71
Timestamp: 2026-03-25T00:18:26.339Z
Learning: Applies to docs/guides/frameworks/**/*.mdx : The trigger.dev docs repo uses `ts` (not `typescript`) as the code-fence language tag for TypeScript snippets. This is the consistent convention across all framework guides (nextjs, sequin, prisma, remix, drizzle, etc.).

Applied to files:

  • internal-packages/tracing/package.json
  • internal-packages/redis/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Import from `trigger.dev/sdk` (NEVER from `trigger.dev/sdk/v3`)

Applied to files:

  • internal-packages/tracing/package.json
  • packages/trigger-sdk/package.json
  • internal-packages/redis/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to trigger.config.ts : Configure the Trigger.dev project using `defineConfig()` with properties like `project`, `dirs`, `retries`, `runtime`, and `build`

Applied to files:

  • internal-packages/tracing/package.json
  • internal-packages/clickhouse/package.json
  • internal-packages/redis/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: The SDK at packages/trigger-sdk is an isomorphic TypeScript SDK

Applied to files:

  • packages/trigger-sdk/package.json
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2025-11-27T16:26:37.432Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-27T16:26:37.432Z
Learning: Applies to packages/trigger-sdk/**/*.{ts,tsx} : In the Trigger.dev SDK (packages/trigger-sdk), prefer isomorphic code like fetch and ReadableStream instead of Node.js-specific code

Applied to files:

  • packages/trigger-sdk/package.json
  • package.json
  • pnpm-workspace.yaml
  • internal-packages/sdk-compat-tests/package.json
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).

Applied to files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.

Applied to files:

  • apps/webapp/app/routes/otel.v1.logs.ts
  • apps/webapp/app/routes/otel.v1.traces.ts
  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
  • packages/cli-v3/src/apiClient.ts
  • apps/webapp/app/routes/otel.v1.metrics.ts
  • internal-packages/clickhouse/src/client/client.ts
📚 Learning: 2025-11-27T16:26:44.496Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/executing-commands.mdc:0-0
Timestamp: 2025-11-27T16:26:44.496Z
Learning: Execute most monorepo commands using `pnpm run` from the root directory, with `--filter` flag for specific packages (e.g., `pnpm run dev --filter webapp`)

Applied to files:

  • packages/core/package.json
  • packages/schema-to-json/package.json
📚 Learning: 2026-03-25T15:29:25.889Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2026-03-25T15:29:25.889Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `schedules.task()` for scheduled (cron) tasks with either declarative cron patterns or imperative schedule creation

Applied to files:

  • internal-packages/schedule-engine/package.json
📚 Learning: 2026-01-15T10:48:02.687Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-15T10:48:02.687Z
Learning: Use pnpm as the package manager (version 10.23.0 or later) and Node.js 20.20.0

Applied to files:

  • packages/python/package.json
  • package.json
📚 Learning: 2026-03-27T22:45:00.623Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3114
File: apps/supervisor/src/index.ts:252-281
Timestamp: 2026-03-27T22:45:00.623Z
Learning: In `apps/supervisor/src/index.ts`, compute supervisors (COMPUTE_GATEWAY_URL set) and K8s/Docker supervisors are always separate deployments. A compute supervisor will never receive K8s/Docker checkpoint messages, so there is no routing mismatch between the compute restore path and the legacy `checkpointClient.restoreRun()` path. Do not flag this as an architectural concern.

Applied to files:

  • apps/supervisor/package.json
📚 Learning: 2026-03-02T12:42:47.652Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: apps/supervisor/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:42:47.652Z
Learning: Applies to apps/supervisor/src/env.ts : Environment configuration should be defined in `src/env.ts`

Applied to files:

  • apps/supervisor/package.json
📚 Learning: 2026-03-21T21:23:35.117Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/runs/v3/ai/extractAISummarySpanData.ts:149-150
Timestamp: 2026-03-21T21:23:35.117Z
Learning: In `apps/webapp/app/components/runs/v3/ai/extractAISummarySpanData.ts` (and related AI span extraction files in `apps/webapp/app/components/runs/v3/ai/`), manual JSON.parse with typeof guards and type assertions is intentional. These functions are on the hot path for span rendering, so Zod validation is deliberately avoided for performance reasons. Do not suggest replacing manual JSON parsing with Zod schemas in these files.

Applied to files:

  • internal-packages/zod-worker/tsconfig.json
📚 Learning: 2026-04-15T15:39:06.868Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-15T15:39:06.868Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Add crumbs as you write code using `// crumbs` comments or `// `#region` crumbs` blocks. These are temporary debug instrumentation and must be stripped using `agentcrumbs strip` before merge.

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2026-04-16T13:24:09.546Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3399
File: apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts:26-42
Timestamp: 2026-04-16T13:24:09.546Z
Learning: In `apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts`, `RedisRealtimeStreams` is only ever instantiated once as a process-wide singleton via `singleton("realtimeStreams", initializeRedisRealtimeStreams)` in `apps/webapp/app/services/realtime/v1StreamsGlobal.server.ts` (line 30). Therefore, the instance-level `_sharedRedis` field and `sharedRedis` getter are effectively process-scoped. Do not flag them as a per-request connection leak. The v2 streaming path uses a completely separate class (`S2RealtimeStreams`).

Applied to files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-04-16T14:21:11.115Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3368
File: apps/webapp/app/services/taskIdentifierCache.server.ts:33-39
Timestamp: 2026-04-16T14:21:11.115Z
Learning: In `apps/webapp/app/services/taskIdentifierCache.server.ts`, the `decode()` function intentionally uses a plain `JSON.parse` cast instead of Zod validation. The Redis cache is exclusively written by the internal `populateTaskIdentifierCache` function via the symmetric `encode()` helper — there is no external input path. Any shape mismatch would be a serialization bug to surface explicitly, not untrusted data to filter out. Do not suggest adding Zod validation to the `decode()` function or the `getTaskIdentifiersFromCache` return path in future reviews.

Applied to files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-04-16T14:07:46.808Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3399
File: apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts:282-291
Timestamp: 2026-04-16T14:07:46.808Z
Learning: In `apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts` (`streamResponse`), the pattern `signal.addEventListener("abort", cleanup, { once: true })` does NOT need an explicit `removeEventListener` call in the non-abort cleanup paths (inactivity, cancel). The `AbortController` is per-request, scoped to `httpAsyncStorage` (created in `apps/webapp/server.ts` per-request middleware), so it gets GC'd when the request ends — taking the listener and closure with it. The `isCleanedUp` guard prevents double-execution, and `redis.disconnect()` is called before the request ends. Do not flag this as a listener/closure leak.

Applied to files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-04-20T15:06:11.054Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3417
File: apps/webapp/app/routes/realtime.v1.streams.$runId.$target.$streamId.append.ts:16-26
Timestamp: 2026-04-20T15:06:11.054Z
Learning: In `apps/webapp/app/routes/realtime.v1.streams.$runId.$target.$streamId.append.ts` and `apps/webapp/app/routes/realtime.v1.sessions.$session.$io.append.ts`, the `MAX_APPEND_BODY_BYTES` cap of 512 KiB (1024 * 512) is intentional even though `appendPart` wraps the body in JSON (which could expand quote-heavy payloads beyond S2's 1 MiB per-record limit). The maintainer considers worst-case quote-heavy payloads pathological and not realistic. If S2 rejections occur in practice, an encoded-size guard will be added inside `appendPart` rather than lowering the raw body cap on every caller. Do not flag this as an issue in future reviews.

Applied to files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-03-26T09:02:07.973Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 3274
File: apps/webapp/app/services/runsReplicationService.server.ts:922-924
Timestamp: 2026-03-26T09:02:07.973Z
Learning: When parsing Trigger.dev task run annotations in server-side services, keep `TaskRun.annotations` strictly conforming to the `RunAnnotations` schema from `trigger.dev/core/v3`. If the code already uses `RunAnnotations.safeParse` (e.g., in a `#parseAnnotations` helper), treat that as intentional/necessary for atomic, schema-accurate annotation handling. Do not recommend relaxing the annotation payload schema or using a permissive “passthrough” parse path, since the annotations are expected to be written atomically in one operation and should not contain partial/legacy payloads that would require a looser parser.

Applied to files:

  • apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts
📚 Learning: 2026-01-08T15:57:09.323Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/otel-metrics.mdc:0-0
Timestamp: 2026-01-08T15:57:09.323Z
Learning: Applies to **/*.ts : When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Applied to files:

  • apps/webapp/app/routes/otel.v1.metrics.ts

Comment thread package.json
Comment on lines +55 to +56
"@types/node": "20.19.39",
"@typescript/native-preview": "7.0.0-dev.20260421.2",
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Description: Verify registry metadata for the pinned compiler packages and confirm pnpm-lock.yaml contains them.
# Expected:
# - `@typescript/native-preview` metadata includes a tsgo bin and platform optional dependencies.
# - `@types/node`@20.19.39 exists.
# - pnpm-lock.yaml includes `@typescript/native-preview` and platform package entries.

npm view `@typescript/native-preview`@7.0.0-dev.20260421.2 bin optionalDependencies --json
npm view `@types/node`@20.19.39 version --json

lockfile="$(fd -H '^pnpm-lock\.yaml$' | head -n 1)"
test -n "$lockfile"

rg -n '@typescript/native-preview|@typescript/native-preview-|@types/node' "$lockfile"

Repository: triggerdotdev/trigger.dev

Length of output: 787


Regenerate pnpm-lock.yaml to include @typescript/native-preview and its platform packages.

The @typescript/native-preview@7.0.0-dev.20260421.2 package is properly configured in the registry with the tsgo binary and all platform-specific optional dependencies. However, pnpm-lock.yaml does not include entries for this package or its platform variants. Run pnpm install to update the lockfile.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 55 - 56, Run pnpm install to regenerate
pnpm-lock.yaml so the new package
`@typescript/native-preview`@7.0.0-dev.20260421.2 and its platform-specific
optional dependencies are recorded; after installing, verify the lockfile
contains entries for "@typescript/native-preview" and its platform variants
(tsgo binary/platform packages), then commit the updated pnpm-lock.yaml.

Comment thread packages/rsc/package.json
"build": "tshy && pnpm run update-version",
"dev": "tshy --watch",
"typecheck": "tsc --noEmit",
"typecheck": "tsgo --noEmit",
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Description: Check whether this PR includes a changeset mentioning the touched public packages.
# Expected: at least one .changeset markdown file references `@trigger.dev/rsc`, `@trigger.dev/core`, or `@trigger.dev/sdk`,
# unless maintainers intentionally approve no changeset for this tooling-only change.

changeset_files="$(fd -H -e md | rg '(^|/)\.changeset/' || true)"

if [ -z "$changeset_files" ]; then
  echo "No .changeset markdown files found."
  exit 1
fi

printf '%s\n' "$changeset_files" | xargs rg -n '@trigger\.dev/(rsc|core|sdk)'

Repository: triggerdotdev/trigger.dev

Length of output: 133


🏁 Script executed:

#!/bin/bash
# Search all changeset files (including non-markdown) for any mention of `@trigger.dev/rsc`
fd -H '\.changeset' -type f | xargs cat 2>/dev/null | grep -i 'rsc\|@trigger\.dev/rsc' || echo "No changeset entries found for `@trigger.dev/rsc`"

Repository: triggerdotdev/trigger.dev

Length of output: 304


🏁 Script executed:

#!/bin/bash
# List all changeset markdown files to see what's covered
fd -H '\.changeset' -name '*.md' -type f

Repository: triggerdotdev/trigger.dev

Length of output: 299


🏁 Script executed:

#!/bin/bash
# Check the git diff for packages/rsc/package.json to see what changed
git diff HEAD -- packages/rsc/package.json || echo "Unable to show diff"

Repository: triggerdotdev/trigger.dev

Length of output: 51


🏁 Script executed:

#!/bin/bash
# List all changeset markdown files
find .changeset -name '*.md' 2>/dev/null | sort

Repository: triggerdotdev/trigger.dev

Length of output: 125


🏁 Script executed:

#!/bin/bash
# Show changeset directory contents
ls -la .changeset/ 2>/dev/null | head -20

Repository: triggerdotdev/trigger.dev

Length of output: 379


🏁 Script executed:

#!/bin/bash
# Try to get the diff for packages/rsc/package.json using git show or status
git status packages/rsc/package.json 2>/dev/null || echo "File status check failed"
git log --oneline -n 5 -- packages/rsc/package.json 2>/dev/null || echo "Git log check failed"

Repository: triggerdotdev/trigger.dev

Length of output: 197


🏁 Script executed:

#!/bin/bash
# Let's check the actual content of packages/rsc/package.json around line 35
cat -n packages/rsc/package.json | sed -n '30,40p'

Repository: triggerdotdev/trigger.dev

Length of output: 494


🏁 Script executed:

#!/bin/bash
# Check if packages/rsc/package.json was recently modified
git log --all --oneline -- packages/rsc/package.json | head -10

Repository: triggerdotdev/trigger.dev

Length of output: 482


🏁 Script executed:

#!/bin/bash
# See what the truncate-error-stacks.md changeset actually covers
cat .changeset/truncate-error-stacks.md

Repository: triggerdotdev/trigger.dev

Length of output: 394


🏁 Script executed:

#!/bin/bash
# Check which packages have the same typecheck script change
grep -r '"typecheck": "tsgo --noEmit"' packages/*/package.json 2>/dev/null | cut -d: -f1

Repository: triggerdotdev/trigger.dev

Length of output: 162


🏁 Script executed:

#!/bin/bash
# Check what other packages were modified in the same commit
git show --name-only d69e5464 | grep -E 'packages/.*/package\.json'

Repository: triggerdotdev/trigger.dev

Length of output: 1843


🏁 Script executed:

#!/bin/bash
# Verify if packages/rsc is actually in the PR/commit being reviewed
git diff HEAD~1 HEAD -- packages/rsc/package.json 2>/dev/null | head -20 || echo "No recent diff found"

Repository: triggerdotdev/trigger.dev

Length of output: 51


🏁 Script executed:

#!/bin/bash
# Check the changeset config to see if there are any special skip rules
cat .changeset/config.json 2>/dev/null

Repository: triggerdotdev/trigger.dev

Length of output: 655


🏁 Script executed:

#!/bin/bash
# Let's see what the previous typecheck command was in these files (if git history shows)
git show d69e5464~1:packages/rsc/package.json 2>/dev/null | sed -n '30,40p'

Repository: triggerdotdev/trigger.dev

Length of output: 51


🏁 Script executed:

#!/bin/bash
# Let's check what packages have "ignore" status in changelog to understand the release structure
# Also, verify what changed between commits by looking at the actual file diffs
git show d69e5464 -- packages/rsc/package.json packages/react-hooks/package.json packages/trigger-sdk/package.json 2>/dev/null | head -40

Repository: triggerdotdev/trigger.dev

Length of output: 1143


🏁 Script executed:

#!/bin/bash
# Check if there are any other changesets we may have missed
find .changeset -type f -name '*.md' ! -name 'README.md' -exec sh -c 'echo "=== $1 ===" && cat "$1"' _ {} \;

Repository: triggerdotdev/trigger.dev

Length of output: 438


Add changesets for modified public packages.

This PR modified three public packages (@trigger.dev/rsc, @trigger.dev/react-hooks, @trigger.dev/trigger-sdk) in commit d69e546 (TypeScript 7.0 beta adoption). Only @trigger.dev/core has a changeset entry (for an unrelated error stack truncation fix). Per project policy, add changesets for the three touched packages using pnpm run changeset:add, or document why this tooling-only change is intentionally release-neutral.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rsc/package.json` at line 35, This PR modified public packages but
lacks changesets: add a changeset entry for each touched public package
"@trigger.dev/rsc", "@trigger.dev/react-hooks", and "@trigger.dev/trigger-sdk"
(commit d69e5464) by running "pnpm run changeset:add" (or manually create
.changeset/*.md files) and specify the package name and bump type, or if these
are intentional tooling-only, add a short changeset explaining the change is
release-neutral and why; ensure the new entries are committed so the releases
tooling recognizes the updates rather than only having the existing
`@trigger.dev/core` changeset.

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Runtime test — TS 7 source changes

Tested the hello-world reference task end-to-end via the webapp Test UI against a local dev build of this branch with trigger dev connected. One flow covers all four webapp/cli source changes in this PR.

  • A.1 — passed — Test form submit redirected to /runs/run_cmobjiq5b00017oqhkp6s3mjv?span=c0f96e98be04469c
  • A.2 — passed — Run reached Completed (CLI: Success (10s); UI status Completed, duration 12.9s)
  • A.3 — passed — Trace timeline rendered full span tree (exercises as BodyInit casts in otel.v1.{logs,metrics,traces}.ts): hello-world root, Attempt 1, onStart(), onStartAttempt(), run(), 7 inline logger.* events, nested my trace spans, wait.for(5s), waitUntil
  • A.4 — passed — Log events streamed inline with correct levels/colours, no stream error (exercises TextDecoderStream as unknown as ReadableWritablePair<...> in redisRealtimeStreams.server.ts)
  • A.5 — passed — Runs list rendered the completed run with correct metadata (exercises row.json<Record<number, unknown>>() in internal-packages/clickhouse)
  • B — passed — Clicking onStart() populated the span detail pane with Started / Finished / Message — proves OTLP protobuf round-trip didn't truncate attributes
  • F — untestedcli-v3 error.code SSE handler is only reachable from trigger deploy against a remote image-build SSE; one-line property rename, typecheck + cli-v3 unit shards green in CI

No errors in webapp or CLI stdout during the test window (grepped error/fail/500/EBADF/UnhandledPromiseRejection).

Evidence (open)

Test page (before submit) / Trace timeline (after completion):

Test page Trace timeline

Span drill-down / Runs list:

Span detail Runs list

No screen recording — record_annotate isn't in this session's toolset, so screenshots above stand in for state transitions.

Devin session: https://app.devin.ai/sessions/89038603ea414395a95cc8681a9d0a5a

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