Skip to content

feat(run-ops): activation — drop cross-DB FKs, provision run-ops DB, enable split#4124

Draft
d-cs wants to merge 4 commits into
runops/pr09-routesfrom
runops/pr10-activation
Draft

feat(run-ops): activation — drop cross-DB FKs, provision run-ops DB, enable split#4124
d-cs wants to merge 4 commits into
runops/pr09-routesfrom
runops/pr10-activation

Conversation

@d-cs

@d-cs d-cs commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

The activation PR for the run-ops database split. This is the behaviour-changing top of the stack: it drops the cross-database Prisma foreign keys, provisions the dedicated run-ops database, and enables the split.

  • Schema (schema.prisma): removes the Prisma relations that span what is now a database boundary — RuntimeEnvironment.batchTaskRuns, TaskRun.tags, TaskRun.alerts, TaskRunTag.runs, TaskRunAttempt.alerts, BatchTaskRun.runtimeEnvironment, BulkActionGroup.items, BulkActionItem.group, and the ProjectAlert.taskRun / taskRunAttempt relations. The underlying scalar id columns are kept; the relationships are resolved through the run store instead of a DB-level FK. ProjectAlert gets a comment explaining why those references are now scalar-only.

  • Migrations: five FK-drop migrations —

    • drop_task_run_to_task_run_tag_join
    • drop_bulk_action_item_group_fk
    • drop_batch_task_run_environment_fk
    • drop_run_ops_control_plane_foreign_keys
    • drop_project_alert_run_subgraph_foreign_keys

    These remove the cross-subgraph foreign key constraints so run-subgraph rows can live on the dedicated run-ops database.

  • Enables the split at runtime.

Tests cover the FK drops (batchTaskRunEnvironmentFkDrop, dropTaskRunToTaskRunTagJoin, PostgresRunStore.controlPlaneAlertFk) and the cascade-cleanup behaviour that the store now owns in place of the dropped DB cascades (runOpsCascadeCleanup).

Why

Part of the run-ops database split. This is PR10 of the series (PR8/9/10) and is the one that actually changes behaviour: it flips the split on. It depends on all prior PRs in the series being merged first — the read presenters (PR8) and the route wiring (PR9) must be in place before the split is enabled, or reads and token resolution across the boundary will break.

Note that the FK-drop migrations run regardless of the runtime split flag: dropping the constraints is a schema fact, and the migrations apply on deploy whether or not the split is switched on at runtime. This is intentional — the constraints cannot hold once run-subgraph rows may live on a separate database.

Tests

pnpm run test --filter @internal/database / --filter webapp for the FK-drop and cascade-cleanup suites. The cascade-cleanup suite verifies the store-side deletes that replace the dropped DB-level cascades.

Notes

Draft, stacked on #4123 (runops/pr09-routes). Review that first; this diff is against it.

Server-change / changeset note to be added at stack-assembly time.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 18c5f478-5e89-4322-8fbd-3e348460b103

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Changes

This PR removes cross-database foreign key constraints between control-plane and run-ops tables to support a database split, replacing Prisma relation fields with scalar-only identifier columns in the schema. New SQL migrations drop the _TaskRunToTaskRunTag join table and foreign keys on BulkActionItem, BatchTaskRun, Waitpoint, TaskRunAttempt, TaskRunTag, and ProjectAlert. Extensive new integration test suites verify post-migration schema state, orphan-tolerant behavior after referenced rows are deleted, cross-database resolver validation, RunOpsCascadeCleanupService cleanup/idempotency/dedup behavior across split databases, and ProjectAlert creation using scalar ids that reference rows existing only in the run-ops database.

Sequence Diagram(s)

Diagrams included above within the hidden review stack for migration flow and cascade cleanup flow.

Related PRs: None identified.

Suggested labels: database, migration, testing

Suggested reviewers: none identified

🐰 hop hop, the tables split apart,
foreign keys fall, a scalar heart,
run-ops and control-plane now dance apart,
tests confirm each cleaned-up cart.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the activation step: dropping cross-DB FKs, provisioning the run-ops DB, and enabling the split.
Description check ✅ Passed The description covers the required core sections and testing context, with only optional template items omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch runops/pr10-activation

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.

@d-cs d-cs self-assigned this Jul 2, 2026

@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 found 3 potential issues.

Open in Devin Review

Comment thread internal-packages/database/prisma/schema.prisma
Comment thread internal-packages/database/prisma/schema.prisma
@d-cs d-cs force-pushed the runops/pr09-routes branch from 4ba9267 to ec1aa6e Compare July 2, 2026 18:03
@d-cs d-cs force-pushed the runops/pr10-activation branch from 76dabfd to dffb0d2 Compare July 2, 2026 18:03
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: af028f7

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

This PR includes no changesets

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

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

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

@coderabbitai coderabbitai Bot 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: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
internal-packages/database/prisma/schema.prisma (1)

1567-1581: 🗄️ Data Integrity & Integration | 🔴 Critical | 🏗️ Heavy lift

TaskRunAttempt/TaskRunTag still declare full relations whose FKs are being dropped.

TaskRunAttempt.backgroundWorker, .backgroundWorkerTask, .runtimeEnvironment (lines 1639-1646) and TaskRunTag.project (line 1573) still use @relation(...), but internal-packages/database/prisma/migrations/20260629120000_drop_run_ops_control_plane_foreign_keys/migration.sql drops exactly TaskRunAttempt_backgroundWorkerId_fkey, TaskRunAttempt_backgroundWorkerTaskId_fkey, TaskRunAttempt_runtimeEnvironmentId_fkey, and TaskRunTag_projectId_fkey. Unlike BatchTaskRun.runtimeEnvironment and ProjectAlert.taskRun(Attempt), these relations weren't converted to scalar-only.

This is the same drift risk as the sibling models that were correctly fixed: Prisma migrate will detect the constraint as "missing" relative to the schema and try to re-add it, and once these run-subgraph rows physically live on the dedicated run-ops DB, any query using include: { backgroundWorker: true }/backgroundWorkerTask/runtimeEnvironment/project will generate a JOIN against a table that doesn't exist on that connection.

🛠️ Proposed fix (mirror the BatchTaskRun/ProjectAlert pattern)
   backgroundWorker   BackgroundWorker `@relation`(fields: [backgroundWorkerId], references: [id], onDelete: Cascade, onUpdate: Cascade)
-  backgroundWorkerId String
+  backgroundWorkerId String
 
-  backgroundWorkerTask   BackgroundWorkerTask `@relation`(fields: [backgroundWorkerTaskId], references: [id], onDelete: Cascade, onUpdate: Cascade)
-  backgroundWorkerTaskId String
+  backgroundWorkerTaskId String
 
-  runtimeEnvironment   RuntimeEnvironment `@relation`(fields: [runtimeEnvironmentId], references: [id], onDelete: Cascade, onUpdate: Cascade)
-  runtimeEnvironmentId String
+  runtimeEnvironmentId String
-  project   Project `@relation`(fields: [projectId], references: [id], onDelete: Cascade, onUpdate: Cascade)
-  projectId String
+  projectId String

(Note: removing the backgroundWorker relation object also requires removing its reverse field on BackgroundWorker, and similarly for backgroundWorkerTask/runtimeEnvironment/project, per Prisma's two-sided relation requirement.)

Also applies to: 1630-1675

🧹 Nitpick comments (3)
internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts (2)

1-134: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Filename doesn't reflect what's under test.

The file is named PostgresRunStore.controlPlaneAlertFk.test.ts, but it never imports or exercises PostgresRunStore; it operates directly on the Prisma clients to test the FK/schema contract for ProjectAlert. Consider a name like projectAlert.controlPlaneAlertFk.test.ts to avoid implying coverage of the PostgresRunStore class itself.


54-79: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

Remove the redundant RunOpsPrismaClient cast. heteroRunOpsPostgresTest already types prisma17 as RunOpsPrismaClient, so the assertion is unnecessary.

apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts (1)

389-460: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated target/sibling seeding across the env and project "both writers" tests.

The seeding blocks for target14/target17/sibling14/sibling17 and their assertions (lines 395-423 and 432-460) are nearly identical, differing only in whether cleanupEnvironment/cleanupProject is invoked. Extracting a shared helper (e.g., seedTargetAndSibling(prisma14, prisma17)) would reduce duplication and keep both tests focused on the cleanup call + assertions.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: feb1701f-837b-46db-897e-3bdc55e7e9e3

📥 Commits

Reviewing files that changed from the base of the PR and between 4ba9267 and 76dabfd.

📒 Files selected for processing (10)
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
  • internal-packages/database/prisma/migrations/20260626130000_drop_task_run_to_task_run_tag_join/migration.sql
  • internal-packages/database/prisma/migrations/20260626140000_drop_bulk_action_item_group_fk/migration.sql
  • internal-packages/database/prisma/migrations/20260626150000_drop_batch_task_run_environment_fk/migration.sql
  • internal-packages/database/prisma/migrations/20260629120000_drop_run_ops_control_plane_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260630120000_drop_project_alert_run_subgraph_foreign_keys/migration.sql
  • internal-packages/database/prisma/schema.prisma
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: internal / 📊 Merge Reports
🧰 Additional context used
📓 Path-based instructions (12)
internal-packages/database/**/prisma/migrations/*/*.sql

📄 CodeRabbit inference engine (internal-packages/database/CLAUDE.md)

internal-packages/database/**/prisma/migrations/*/*.sql: Clean up generated Prisma migrations by removing extraneous lines for junction tables (_BackgroundWorkerToBackgroundWorkerFile, _BackgroundWorkerToTaskQueue, _TaskRunToTaskRunTag, _WaitpointRunConnections, _completedWaitpoints) and indexes (SecretStore_key_idx, various TaskRun indexes) unless explicitly added
When adding indexes to existing tables, use CREATE INDEX CONCURRENTLY IF NOT EXISTS to avoid table locks in production, and place each concurrent index in its own separate migration file
Indexes on newly created tables can use CREATE INDEX without CONCURRENTLY and can be combined in the same migration file as the CREATE TABLE statement
When adding an index on a new column in an existing table, use two separate migrations: first for ALTER TABLE ... ADD COLUMN IF NOT EXISTS ..., then for CREATE INDEX CONCURRENTLY IF NOT EXISTS ... in its own file

Files:

  • internal-packages/database/prisma/migrations/20260626140000_drop_bulk_action_item_group_fk/migration.sql
  • internal-packages/database/prisma/migrations/20260630120000_drop_project_alert_run_subgraph_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260629120000_drop_run_ops_control_plane_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260626130000_drop_task_run_to_task_run_tag_join/migration.sql
  • internal-packages/database/prisma/migrations/20260626150000_drop_batch_task_run_environment_fk/migration.sql
**/*.{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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{ts,tsx,js,jsx}

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

Use function declarations instead of default exports

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{test,spec}.{ts,tsx}

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

Use vitest for all tests in the Trigger.dev repository

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
apps/webapp/**/*.test.{ts,tsx}

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

Do not import env.server.ts directly or indirectly into test files; instead pass environment-dependent values through options/parameters to make code testable

For testable code, never import env.server.ts in test files. Pass configuration as options instead (e.g., realtimeClient.server.ts takes config as constructor arg, realtimeClientGlobal.server.ts creates singleton with env config)

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}: Use pnpm run typecheck for changes in apps (apps/*) and internal packages (internal-packages/*), and never use build to verify those changes.
Use Vitest for tests, and never mock anything; use testcontainers instead.
Prefer static imports over dynamic import(), and only use dynamic imports for unresolved circular dependencies, genuine code-splitting needs, or conditional runtime loading.

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx,mts,cts,mjs,cjs}

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files next to the source files they cover (for example, MyService.ts -> MyService.test.ts).

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs,md,mdx}

📄 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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{ts,tsx,js,jsx}: Write unit tests with Vitest, keep test files beside the files under test, and use descriptive describe and it blocks.
Avoid mocks or stubs in tests; when Redis or Postgres are needed, use the helpers from @internal/testcontainers.

Files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
🧠 Learnings (18)
📚 Learning: 2026-02-03T18:48:31.790Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 2994
File: internal-packages/database/prisma/migrations/20260129162810_add_integration_deployment/migration.sql:14-18
Timestamp: 2026-02-03T18:48:31.790Z
Learning: For Prisma migrations targeting PostgreSQL: - When adding indexes to existing tables, create the index in a separate migration file and include CONCURRENTLY to avoid locking the table. - For indexes on newly created tables (in CREATE TABLE statements), you can create the index in the same migration file without CONCURRENTLY. This reduces rollout complexity for new objects while protecting uptime for existing structures.

Applied to files:

  • internal-packages/database/prisma/migrations/20260626140000_drop_bulk_action_item_group_fk/migration.sql
  • internal-packages/database/prisma/migrations/20260630120000_drop_project_alert_run_subgraph_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260629120000_drop_run_ops_control_plane_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260626130000_drop_task_run_to_task_run_tag_join/migration.sql
  • internal-packages/database/prisma/migrations/20260626150000_drop_batch_task_run_environment_fk/migration.sql
📚 Learning: 2026-03-22T13:49:20.068Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: internal-packages/database/prisma/migrations/20260318114244_add_prompt_friendly_id/migration.sql:5-5
Timestamp: 2026-03-22T13:49:20.068Z
Learning: For Prisma migration SQL files under `internal-packages/database/prisma/migrations/`, it is acceptable to create indexes with `CREATE INDEX` / `CREATE UNIQUE INDEX` (i.e., without `CONCURRENTLY`) when the parent table is introduced in the same PR and has no existing production rows yet. Only require `CREATE INDEX CONCURRENTLY` (or otherwise account for existing production data/locks) when the table already exists in production with data.

Applied to files:

  • internal-packages/database/prisma/migrations/20260626140000_drop_bulk_action_item_group_fk/migration.sql
  • internal-packages/database/prisma/migrations/20260630120000_drop_project_alert_run_subgraph_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260629120000_drop_run_ops_control_plane_foreign_keys/migration.sql
  • internal-packages/database/prisma/migrations/20260626130000_drop_task_run_to_task_run_tag_join/migration.sql
  • internal-packages/database/prisma/migrations/20260626150000_drop_batch_task_run_environment_fk/migration.sql
📚 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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.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/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma error P1001 ("Can't reach database server") in TypeScript, don’t assume a single error shape. Prisma can surface P1001 via two different error classes/fields: `PrismaClientKnownRequestError` exposes it as `err.code === "P1001"` (common during mid-query connection drops), while `PrismaClientInitializationError` exposes it as `err.errorCode === "P1001"` (common on client startup failure). Therefore, predicates should use `err.code === "P1001" || err.errorCode === "P1001"`. Do not flag `err.code === "P1001"` as “unreachable/never matches,” as it is expected in production.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma errors for P1001 ("Can't reach database server"), do not assume it only appears under a single property name. Prisma may surface P1001 via either `PrismaClientKnownRequestError` (`err.code === "P1001"`, e.g., mid-query connection drops) or `PrismaClientInitializationError` (`err.errorCode === "P1001"`, e.g., client startup connection failure). To reliably detect the condition, check `err.code === "P1001" || err.errorCode === "P1001"`, and avoid review rules that would incorrectly flag `err.code === "P1001"` as unreachable/never-matching.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-13T19:53:13.759Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3937
File: packages/trigger-sdk/skills/realtime-and-frontend/SKILL.md:258-260
Timestamp: 2026-06-13T19:53:13.759Z
Learning: When reviewing code that uses `trigger.dev/react-hooks`’s `useRealtimeRun`, preserve the call signature where the first argument is the full realtime handle object (not `handle.id`). This is intentional to maintain type-safety and is consistent with the official docs; do not suggest changing the first argument from the handle object to `handle.id`.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-17T17:13:49.929Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3948
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx:48-62
Timestamp: 2026-06-17T17:13:49.929Z
Learning: In triggerdotdev/trigger.dev, within `dashboardLoader`/`dashboardAction` (or similar context resolver code) whenever you resolve an organization ID from an organization slug for RBAC/enterprise authorization scope, always read from the primary Prisma client (`prisma`), not `$replica`. Using `$replica` can hit replica-lag and cause the RBAC lookup/authorization to run without the correct org scope (bypassing intended role enforcement). Implement the slug→org lookup with `prisma.organization.findFirst(...)` (or equivalent primary-client query) and add an inline comment documenting why the primary client is required (replica lag could lead to unscoped RBAC checks).

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-23T13:04:21.413Z
Learnt from: carderne
Repo: triggerdotdev/trigger.dev PR: 4023
File: apps/webapp/app/services/upsertBranch.server.ts:14-18
Timestamp: 2026-06-23T13:04:21.413Z
Learning: In TypeScript, it’s valid to `import { type X }` and then use `typeof X` in a type-only position, e.g. `type Alias = z.infer<typeof X>`. The `type` modifier suppresses the runtime import, but the type checker still has the full exported type so `z.infer<typeof X>` can resolve correctly. In code reviews, don’t flag this as a TypeScript compile error as long as `typeof X` is used in a type context (e.g., with `z.infer`, `type` aliases, generics), not as a runtime value.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-07T12:25:18.271Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3531
File: apps/webapp/test/sentryTraceContext.server.test.ts:9-47
Timestamp: 2026-05-07T12:25:18.271Z
Learning: In the triggerdotdev/trigger.dev webapp test suite, it is acceptable to leave `createInMemoryTracing()` calls that register a global `NodeTracerProvider` without `afterEach`/`afterAll` teardown. Do not flag this as a test-ordering risk when the code follows the established pattern used across webapp tests (e.g., replication service/benchmark/backfiller tests). This is considered safe because `trace.getActiveSpan()` when called outside a `context.with(...)` block reads `AsyncLocalStorage.getStore()` (undefined when no `run()` scope exists), so it falls back to `ROOT_CONTEXT` with no attached span—regardless of which provider is registered.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-28T20:02:10.647Z
Learnt from: myftija
Repo: triggerdotdev/trigger.dev PR: 3772
File: apps/webapp/test/findOrCreateBackgroundWorker.test.ts:1-1
Timestamp: 2026-05-28T20:02:10.647Z
Learning: In the triggerdotdev/trigger.dev monorepo, for the `apps/webapp` package use the established convention of storing Vitest tests (unit, integration, and e2e) under `apps/webapp/test/` rather than colocating them next to source files. Do not flag files located in `apps/webapp/test/` as violating any rule that says to colocate tests with source.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-12T21:04:05.815Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3542
File: apps/webapp/app/components/sessions/v1/SessionStatus.tsx:1-3
Timestamp: 2026-05-12T21:04:05.815Z
Learning: In this Remix + TypeScript codebase, do not flag a server/client boundary violation when a file imports only types from a module matching `*.server`.

Specifically, it’s safe to import types using `import type { Foo } from "*.server"` or `import { type Foo } from "*.server"` because TypeScript erases type-only imports at compile time and they emit no JavaScript, so they won’t cross the Remix server/client bundle boundary.

Only raise the boundary concern for value imports (e.g., `import { Foo }` without `type`, or `import Foo`), since those produce JavaScript output.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-25T18:21:51.905Z
Learnt from: carderne
Repo: triggerdotdev/trigger.dev PR: 4039
File: apps/webapp/app/routes/invite-revoke.tsx:0-0
Timestamp: 2026-06-25T18:21:51.905Z
Learning: During the Zod v4 migration in the triggerdotdev/trigger.dev webapp, ensure any imports from `conform-to/zod` use the Zod-4 subpath: `conform-to/zod/v4` (e.g., `import { parseWithZod } from "conform-to/zod/v4"`). Do not import from the package root `conform-to/zod`, because it is the Zod 3 implementation and may load Zod-3-only symbols (e.g., `ZodBranded`, `ZodEffects`), which can throw at module load (notably with `zod4.4.3`). This should be enforced across `apps/webapp/**/*` where helpers like `parseWithZod` and `conformZodMessage` are used.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-05-18T14:40:02.173Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:02.173Z
Learning: In the triggerdotdev/trigger.dev repo, the policy “Never mock anything — use testcontainers instead” should only be enforced for integration tests that interact with real external services (e.g., Redis, Postgres) via actual infrastructure. For unit tests that exercise pure in-memory logic (e.g., cache semantics) it is OK to stub collaborators such as `ApiClient` using Vitest (`vi.fn()`) to assert call counts or control behavior. Do not flag `vi.fn()`-based `ApiClient` stubs in unit tests as violations of the testcontainers policy.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-04T18:16:35.386Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3836
File: apps/supervisor/src/backpressure/backpressureMonitor.ts:3-5
Timestamp: 2026-06-04T18:16:35.386Z
Learning: When reviewing TypeScript in this repo, apply the rule “prefer type aliases over interfaces” only to data/object shapes and union/intersection type modeling. If an interface is being used as a behavioral contract for collaborators to implement (e.g., method-shape interfaces that define required behavior, such as `BackpressureLogger` / `BackpressureSignalSource` in `apps/supervisor/src/backpressure/backpressureMonitor.ts`), keep it as an `interface` and do not flag it as a type-alias-vs-interface violation.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-09T17:58:04.699Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 3879
File: apps/webapp/app/models/vercelIntegration.server.ts:619-630
Timestamp: 2026-06-09T17:58:04.699Z
Learning: In this codebase, outbound raw `fetch` calls should typically rely on Node/undici’s default request timeout (about ~300s) rather than adding a per-call `AbortController` + `setTimeout` wrapper inside individual functions (e.g. in files like `apps/webapp/app/models/vercelIntegration.server.ts`). During code review, do not flag the absence of a per-call timeout on a single `fetch` as an issue; if per-call timeouts are needed, they should be implemented via a codebase-wide convention (e.g., a shared fetch wrapper or documented pattern) rather than ad-hoc per-function changes.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-06-16T09:19:47.637Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3960
File: apps/webapp/test/prismaInfrastructureErrorCapture.test.ts:0-0
Timestamp: 2026-06-16T09:19:47.637Z
Learning: In this repo’s Vitest setup, `vitest.config.ts` uses `globals: true`, so identifiers like `vi`, `describe`, `it`, and `expect` are available as globals in Vitest test files. During code review, do not flag missing `vi`/`describe`/`it`/`expect` imports as a runtime error or correctness issue when they’re used in `*.test.ts/tsx` or `*.spec.ts/tsx` files. Explicit imports are still preferred for consistency, but they’re not required for runtime behavior.

Applied to files:

  • apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts
  • internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts
  • apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts
  • apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts
📚 Learning: 2026-04-30T21:28:35.705Z
Learnt from: samejr
Repo: triggerdotdev/trigger.dev PR: 3473
File: internal-packages/database/prisma/schema.prisma:59-60
Timestamp: 2026-04-30T21:28:35.705Z
Learning: When reviewing Prisma schema files in this repository, do not suggest using Prisma’s `@check` model/table-level attribute or any native Prisma schema syntax for CHECK constraints. Prisma does not implement CHECK constraints (see prisma/prisma#3388). If a CHECK constraint is required, add it only via raw SQL in a handwritten migration (e.g., `ALTER TABLE ... ADD CONSTRAINT ... CHECK (...)`).

Applied to files:

  • internal-packages/database/prisma/schema.prisma
🔇 Additional comments (12)
apps/webapp/test/batchTaskRunEnvironmentFkDrop.test.ts (1)

1-169: LGTM!

apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts (1)

8-66: LGTM!

internal-packages/run-store/src/PostgresRunStore.controlPlaneAlertFk.test.ts (2)

15-49: LGTM!


105-133: LGTM!

internal-packages/database/prisma/schema.prisma (1)

315-402: LGTM!

Also applies to: 879-1102, 1863-1936, 2351-2379, 2470-2524, 2544-2569

internal-packages/database/prisma/migrations/20260626130000_drop_task_run_to_task_run_tag_join/migration.sql (1)

1-9: LGTM!

internal-packages/database/prisma/migrations/20260626140000_drop_bulk_action_item_group_fk/migration.sql (1)

1-2: 🩺 Stability & Availability | ⚡ Quick win

Missing IF EXISTS breaks idempotent multi-database rollout.

This drop lacks IF EXISTS, unlike the sibling migrations in this same PR. The later migration explicitly calls out that it mirrors this pattern and adds IF EXISTS "so it's idempotent across both databases," implying this constraint won't exist on one side of the split (or on repeated application) and the statement will error out.

🛠️ Proposed fix
 -- DropForeignKey
-ALTER TABLE "BulkActionItem" DROP CONSTRAINT "BulkActionItem_groupId_fkey";
+ALTER TABLE "BulkActionItem" DROP CONSTRAINT IF EXISTS "BulkActionItem_groupId_fkey";
internal-packages/database/prisma/migrations/20260626150000_drop_batch_task_run_environment_fk/migration.sql (1)

1-2: 🩺 Stability & Availability | ⚡ Quick win

Missing IF EXISTS breaks idempotent multi-database rollout.

Same concern as 20260626140000_drop_bulk_action_item_group_fk: this is the exact migration that 20260629120000_drop_run_ops_control_plane_foreign_keys's own comment calls out ("Mirrors the earlier TaskRun/BatchTaskRun drops; IF EXISTS so it's idempotent across both databases"), confirming it should have used IF EXISTS too.

🛠️ Proposed fix
 -- DropForeignKey
-ALTER TABLE "BatchTaskRun" DROP CONSTRAINT "BatchTaskRun_runtimeEnvironmentId_fkey";
+ALTER TABLE "BatchTaskRun" DROP CONSTRAINT IF EXISTS "BatchTaskRun_runtimeEnvironmentId_fkey";
internal-packages/database/prisma/migrations/20260630120000_drop_project_alert_run_subgraph_foreign_keys/migration.sql (1)

1-8: LGTM!

apps/webapp/test/v3/runOpsMigration/runOpsCascadeCleanup.server.test.ts (3)

1-8: LGTM!

Also applies to: 325-330


462-524: LGTM!

Also applies to: 526-559, 561-664


78-107: 🗄️ Data Integrity & Integration

No issue here The dedicated run-ops schema already defines BatchTaskRun.runs and the scalar backgroundWorkerId/backgroundWorkerTaskId/runtimeEnvironmentId/queueId fields, so this concern doesn’t apply.

			> Likely an incorrect or invalid review comment.

Comment thread apps/webapp/test/dropTaskRunToTaskRunTagJoin.test.ts Outdated
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@25312fc

trigger.dev

npm i https://pkg.pr.new/trigger.dev@25312fc

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@25312fc

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@25312fc

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@25312fc

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@25312fc

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@25312fc

@trigger.dev/schema-to-json

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

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@25312fc

commit: 25312fc

@d-cs

d-cs commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

On the out-of-diff finding that TaskRunAttempt (backgroundWorker/backgroundWorkerTask/runtimeEnvironment) and TaskRunTag (project) still declare @relation for the FKs dropped in 20260629120000: this is intentional and mirrors TaskRun itself, which keeps its project/runtimeEnvironment relations after its cross-DB FKs were dropped earlier in the series. These relations are never JOINed on the dedicated run-ops DB — the run store strips them from Prisma selects and rehydrates from scalar columns. The BatchTaskRun scalarization was a special case (its relation had no consumers). Prisma-migrate won't re-add these in the managed flow: hand-dropped constraints are an accepted drift condition throughout this schema.

Also fixed the one genuine consumer regression flagged inline: PerformBulkActionService now uses scalar groupId queries and reads the action kind from BulkActionItem.type instead of the removed group/items relations. Verified with a green webapp typecheck against a freshly regenerated client.

@d-cs d-cs force-pushed the runops/pr09-routes branch from 30ccb91 to caebbbc Compare July 2, 2026 19:25
@d-cs d-cs force-pushed the runops/pr10-activation branch from 3aa59bd to 3276836 Compare July 2, 2026 19:25
@d-cs d-cs force-pushed the runops/pr09-routes branch from e2cdc6d to 00f588c Compare July 2, 2026 20:23
@d-cs d-cs force-pushed the runops/pr10-activation branch from 3276836 to 25312fc Compare July 2, 2026 20:23
@d-cs d-cs force-pushed the runops/pr09-routes branch from 00f588c to 077917b Compare July 2, 2026 20:38
@d-cs d-cs force-pushed the runops/pr10-activation branch from 25312fc to 8b6bb5a Compare July 2, 2026 20:38
@d-cs d-cs force-pushed the runops/pr09-routes branch from 077917b to b74993f Compare July 2, 2026 21:44
@d-cs d-cs force-pushed the runops/pr10-activation branch from 8b6bb5a to 806b7bb Compare July 2, 2026 21:45
@d-cs d-cs force-pushed the runops/pr09-routes branch from b74993f to e7056ff Compare July 3, 2026 00:17
@d-cs d-cs force-pushed the runops/pr10-activation branch from 806b7bb to 1a72386 Compare July 3, 2026 00:17
@d-cs d-cs force-pushed the runops/pr09-routes branch from e7056ff to fa76c1b Compare July 3, 2026 01:32
@d-cs d-cs force-pushed the runops/pr10-activation branch from 1a72386 to d338e32 Compare July 3, 2026 01:32
d-cs and others added 4 commits July 3, 2026 03:24
…ps DB, enable split

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…11 activation tests

Remove Test A–F enumeration prefixes from the run-ops cascade-cleanup
comments and the RED/GREEN TDD framing from the ProjectAlert control-plane
FK reconciliation test header. Comment-only; no product logic, test
behavior, or migration SQL changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion drop

The activation schema removed the BulkActionGroup.items and BulkActionItem.group
Prisma relations, but PerformBulkActionService still queried them via include,
which would fail once the client regenerates. Switch to scalar groupId lookups and
read the action kind from BulkActionItem.type. Also drop a stale test comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the runops/pr10-activation branch from d338e32 to af028f7 Compare July 3, 2026 02:24
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