Skip to content

fix(cli,core,webapp): flag legacy Node deployments for runtime updates - #4865

Merged
carderne merged 2 commits into
mainfrom
fix/node-runtime-update-detection
Sep 1, 2026
Merged

fix(cli,core,webapp): flag legacy Node deployments for runtime updates#4865
carderne merged 2 commits into
mainfrom
fix/node-runtime-update-detection

Conversation

@carderne

@carderne carderne commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Include legacy Node.js deployments in runtime update reports when their stored runtime name or version is missing. This keeps the dashboard and projects list --needs-update consistent with how those deployments are displayed.

Root cause

The runtime display treated a missing runtime name as Node.js, while update detection required both a Node runtime name and a parseable version. A shared classifier now treats missing legacy Node.js metadata as requiring an update, while explicit non-Node runtimes and supported Node.js majors remain excluded.

The organization settings indicator uses the same rules. Verified with the runtime classification unit tests and typechecks for core, CLI, and webapp.

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 77d1cb0

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

@carderne
carderne marked this pull request as ready for review September 1, 2026 14:06
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The change adds needsNodeRuntimeUpdate to classify Node runtime versions and legacy runtime metadata. Project settings and CLI project listing now use this helper for update detection. The organization runtime query expands its deployment filter to include matching runtime versions, missing versions, and legacy node-21 configurations. Tests cover Node 21, Node 22, missing metadata, unknown versions, and Bun.

Merge Risk: 🟡 Moderate · up to 77d1c

The PR expands legacy Node.js update reporting, but malformed recorded versions can still make the organization indicator disagree with the settings page and CLI. This bounded reporting inconsistency should be fixed or explicitly accepted before merge; no security or deployed-runtime risk is indicated.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the change, root cause, and testing, but it omits the required issue reference, checklist, changelog, and screenshots sections from the repository template. Add the required template sections. Include a valid Closes # reference, complete the checklist, document the testing steps, add a short changelog entry, and state whether screenshots are applicable.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: flagging legacy Node deployments for runtime updates across the CLI, core, and webapp.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/node-runtime-update-detection

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

❤️ Share

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

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

Devin Review

@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@77d1cb0

trigger.dev

npm i https://pkg.pr.new/trigger.dev@77d1cb0

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@77d1cb0

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@77d1cb0

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@77d1cb0

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@77d1cb0

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@77d1cb0

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@77d1cb0

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@77d1cb0

commit: 77d1cb0

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

🧹 Nitpick comments (1)
packages/core/src/v3/schemas/api.ts (1)

82-98: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add required crumb markers to the changed behavioral blocks.

  • packages/core/src/v3/schemas/api.ts#L82-L98: add a // @Crumbs marker or `#region `@crumbs block for the classifier changes.
  • packages/core/src/v3/schemas/api-type.test.ts#L25-L39: add a crumb marker for the new classifier test block.
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx#L57-L57: add a crumb marker for the updated project classification branch.
  • packages/cli-v3/src/commands/projects/list.ts#L73-L77: add a crumb marker for the updated CLI filter.
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts#L111-L124: add a crumb marker for the database filter change.

As per coding guidelines, “Add crumbs as you write code — not just when debugging.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 2fb6b962-c8d7-4c6b-ae1e-3c91899832f6

📥 Commits

Reviewing files that changed from the base of the PR and between 8142a11 and 77d1cb0.

📒 Files selected for processing (5)
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api-type.test.ts
  • packages/core/src/v3/schemas/api.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (48)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - npm)
  • GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: fk-cascade-guard / fk-cascade-guard
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Build and publish previews
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (14)
Never use `request.signal` to detect client disconnects. Use `getRequestAbortSignal()` from `app/services/httpAsyncStorage.server.ts`, which is wired to Express response close events.

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

Files:

  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
We use vitest exclusively. **Never mock anything** - use testcontainers instead.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.

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

Files:

  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
**Import subpaths only** (never root).

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • packages/core/src/v3/schemas/api.ts
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
Add crumbs as you write code — not just when debugging. Mark lines with

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
Use zod for validation in packages/core and apps/webapp

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

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
CLI command definitions should be located in `src/commands/`

📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)

Files:

  • packages/cli-v3/src/commands/projects/list.ts
Never import the root package (`@trigger.dev/core`). Always use subpath imports such as `@trigger.dev/core/v3`, `@trigger.dev/core/v3/utils`, `@trigger.dev/core/logger`, or `@trigger.dev/core/schemas`

📄 CodeRabbit inference engine (packages/core/CLAUDE.md)

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • packages/core/src/v3/schemas/api.ts
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env`

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

Files:

  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
Use vitest for all tests in the Trigger.dev repository

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

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
Use function declarations instead of default exports

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

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
Use types over interfaces for TypeScript

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

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.projects/route.tsx
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

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

Files:

  • packages/core/src/v3/schemas/api-type.test.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • packages/cli-v3/src/commands/projects/list.ts
  • packages/core/src/v3/schemas/api.ts

Comment thread apps/webapp/app/services/projectRuntimeUpdates.server.ts
Comment thread packages/core/src/v3/schemas/api.ts
@carderne
carderne enabled auto-merge (squash) September 1, 2026 14:19
@carderne
carderne disabled auto-merge September 1, 2026 15:20
@carderne
carderne merged commit fe94700 into main Sep 1, 2026
70 checks passed
@carderne
carderne deleted the fix/node-runtime-update-detection branch September 1, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants