chore: fix CONTRIBUTING.md setup steps and scope db:seed to webapp#3450
chore: fix CONTRIBUTING.md setup steps and scope db:seed to webapp#3450
Conversation
- Fix wrong path 'cd packages/database' -> 'cd internal-packages/database' in the migration walkthrough. - Renumber duplicate '4.' steps in Adding migrations and the skipped step in the hello-world Running section. - Combine three sequential builds into one (turbo parallelizes filters): pnpm run build --filter webapp --filter trigger.dev --filter @trigger.dev/sdk - Add a 'pnpm run db:seed' step after migrate. The seed creates a stable local user, References org, and reference projects (including hello-world with proj_rrkpdguyagvsoktglnod) so contributors no longer have to manually edit the externalRef column in Postgres. - Mention ClickHouse and the ClickHouse migrator alongside Postgres/Redis. - Remove the V1-era 'Add sample jobs' section — references/job-catalog no longer exists; the hello-world flow above replaces it. Scope db:seed in turbo.json to 'webapp#db:seed' depending on 'webapp#build'. The previous root-level entry queued 'build' for every workspace package (reference projects, docs, kubernetes-provider, etc.), and a single broken reference build (e.g. references-realtime-hooks-test failing under Turbopack) would kill the entire seed pipeline. Scoping cuts the dry-run plan from 27 tasks to 20 — only webapp's actual transitive workspace deps.
|
WalkthroughUpdated CONTRIBUTING.md with revised setup instructions including additional Docker services (Electric and ClickHouse), new database seeding step, simplified hello-world project initialization, adjusted build commands using multiple filters, and reorganized step numbering. Updated migration documentation paths and removed the "Add sample jobs" section. Modified turbo.json to namespace the db:seed task to webapp#db:seed and adjusted its dependency from the generic build pipeline to webapp#build. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 85-90: Update all fenced code blocks in CONTRIBUTING.md that
currently use triple backticks with no language identifier to include the shell
language tag `sh`; specifically add `sh` to the fences around the build command
block (``` pnpm run build ... ```), the seed command (``` pnpm run db:seed ```),
the migration creation block (``` pnpm run db:migrate:dev:create ```), the
migration/deploy/generate block (``` pnpm run db:migrate:deploy / pnpm run
generate ```), and the additional fences referenced around lines 189-199 so that
each opens with ```sh to satisfy markdownlint MD040.
- Line 112: Update the sentence that currently reads "log in at
http://localhost:3030 with any email to access it" to explicitly instruct using
the seeded account (local@trigger.dev) to access the References org and the
seeded hello-world project; e.g., replace that phrase with wording like "log in
at http://localhost:3030 using the seeded account local@trigger.dev (the seed
script creates the References org and hello-world project for that user)" so
first-time users won't be locked out.
In `@turbo.json`:
- Around line 38-42: Root-level NPM scripts still call the old unscoped Turbo
task names ("db:seed" and "setup") which now fail because turbo tasks were
renamed to the namespaced "webapp#db:seed"; update the root package.json scripts
that invoke "db:seed" (and the "setup" script that chains it) to call
"webapp#db:seed" instead so Turbo finds the namespaced task (ensure any script
that runs "pnpm run db:seed" or "turbo run db:seed" is updated to
"webapp#db:seed").
🪄 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: 2daa486c-32e2-4ad7-a648-7dea6840733e
📒 Files selected for processing (2)
CONTRIBUTING.mdturbo.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). (30)
- GitHub Check: audit
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 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 (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / e2e-webapp / 🧪 E2E Tests: Webapp
- GitHub Check: typecheck / typecheck
- GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
- GitHub Check: sdk-compat / Deno Runtime
- GitHub Check: sdk-compat / Cloudflare Workers
- GitHub Check: sdk-compat / Bun Runtime
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}
📄 CodeRabbit inference engine (AGENTS.md)
Format code using Prettier before committing
Files:
turbo.jsonCONTRIBUTING.md
🧠 Learnings (17)
📓 Common learnings
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3368
File: internal-packages/database/prisma/schema.prisma:666-666
Timestamp: 2026-04-16T14:21:18.496Z
Learning: In `triggerdotdev/trigger.dev`, the `BackgroundWorkerTask` covering index on `(runtimeEnvironmentId, slug, triggerSource)` lives in `internal-packages/database/prisma/migrations/20260413000000_add_bwt_covering_index/migration.sql` as a `CREATE INDEX CONCURRENTLY IF NOT EXISTS`, intentionally in its own migration file separate from the `TaskIdentifier` table migration. Do not flag this index as missing from the schema migrations in future reviews.
📚 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:
CONTRIBUTING.md
📚 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: Run `npx trigger.devlatest dev` to start the Trigger.dev development server
Applied to files:
CONTRIBUTING.md
📚 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: Run `npx trigger.devlatest init` to initialize a new Trigger.dev project
Applied to files:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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.trigger()` to trigger a single run of a task from inside another task
Applied to files:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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: Test new features with the `references/hello-world` reference project
Applied to files:
CONTRIBUTING.md
📚 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/init.ts : Implement `init.ts` command in `src/commands/` for project initialization
Applied to files:
CONTRIBUTING.md
📚 Learning: 2026-03-02T12:43:37.906Z
Learnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: packages/core/CLAUDE.md:0-0
Timestamp: 2026-03-02T12:43:37.906Z
Learning: Exercise caution with changes to trigger.dev/core as they affect both the customer-facing SDK and server-side webapp - breaking changes can impact deployed user tasks and the platform simultaneously
Applied to files:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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/.claude/skills/trigger-dev-tasks/**/* : Update `.claude/skills/trigger-dev-tasks/` in parallel with `rules/` when SDK features change
Applied to files:
CONTRIBUTING.md
📚 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:
CONTRIBUTING.md
📚 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: Applies to apps/webapp/app/v3/**Worker.server.ts : Do NOT add new jobs using zodworker/graphile-worker (legacy). Background job workers use `trigger.dev/redis-worker` via files like `app/v3/commonWorker.server.ts`, `app/v3/alertsWorker.server.ts`, `app/v3/batchTriggerWorker.server.ts`
Applied to files:
CONTRIBUTING.md
🪛 LanguageTool
CONTRIBUTING.md
[grammar] ~84-~84: Ensure spelling is correct
Context: ...npm run db:migrate 10. Build the webapp, CLI, and SDK pnpm run buil...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~112-~112: Ensure spelling is correct
Context: ...p First, make sure you are running the webapp according to the instructions above. Th...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[style] ~170-~170: This phrase is redundant. Consider using “inside”.
Context: ...ickup changes. Any changes to the files inside of the hello-world/src/trigger dir will ...
(OUTSIDE_OF)
[style] ~176-~176: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...ny of them accept an empty payload. 8. Feel free to add additional files in `hello-world/sr...
(FEEL_FREE_TO_STYLE_ME)
[grammar] ~205-~205: Ensure spelling is correct
Context: ...to restart the TypeScript server in the webapp to get updated type inference. Open a T...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.22.1)
CONTRIBUTING.md
[warning] 85-85: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 89-89: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 189-189: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 197-197: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
Summary
Two fixes that together get a fresh-machine setup working from
CONTRIBUTING.mdend-to-end with no manual workarounds:CONTRIBUTING.mdcd packages/database→cd internal-packages/database. The current path doesn't exist; this breaks step 2 for every contributor adding a migration.4.steps in Adding migrations and the skipped5.in the hello-world Running section.pnpm run build --filter ...calls into one (Turbo parallelizes filters):pnpm run build --filter webapp --filter trigger.dev --filter @trigger.dev/sdk.pnpm run db:seedstep after migrate. The seed creates the local user,Referencesorg, and reference projects (includinghello-worldwith the stableproj_rrkpdguyagvsoktglnod). Removes the manual instruction to edit theexternalRefcolumn in Postgres.pnpm run docker, just invisible in the docs).references/job-catalogno longer exists; the hello-world flow above replaces it.turbo.jsonScope
db:seedtowebapp#db:seed → webapp#build. The previous root-level entry queuedbuildfor every workspace package — includingreferences-*,docs,kubernetes-provider,coordinator, etc. Onlywebappactually has adb:seedscript, so the rest of those builds were dead weight. Worse: a single broken reference (today,references-realtime-hooks-testfailing under Turbopack withnode:fs/promises) kills the whole seed pipeline.After the change,
turbo run db:seed --dry-runplan drops from 27 tasks to 20 — onlywebappand its real transitive workspace deps. Reference projects no longer block seeding.Test plan
trigger dev→ triggeredhello-world, run completed with{"message":"Hello, world!"}.turbo run db:seed --dry-run=jsonconfirms 20 tasks, all webapp deps, no reference packages.