From 83b5dd038dbd4eae7ec994c86f146b969846c3ab Mon Sep 17 00:00:00 2001 From: Erik Thorelli Date: Mon, 5 Oct 2026 14:11:45 -0700 Subject: [PATCH 1/2] chore(review): configure CodeRabbit in TypeScript Move the CodeRabbit configuration from `.coderabbit.yaml` to `.coderabbit.config.ts`, typed by the `@coderabbitai/config` SDK, so misspelled keys, nested ones included, and invalid values fail type-checking. The settings are unchanged. A committed `.coderabbit.yaml` takes precedence over the TypeScript file, so it goes. CodeRabbit loads the config by filename, so knip treats it as an entry. --- .coderabbit.config.ts | 16 ++++++++++++++++ .coderabbit.yaml | 9 --------- knip.jsonc | 6 +++++- package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 5 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 .coderabbit.config.ts delete mode 100644 .coderabbit.yaml diff --git a/.coderabbit.config.ts b/.coderabbit.config.ts new file mode 100644 index 000000000000..f9a970af810c --- /dev/null +++ b/.coderabbit.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from "@coderabbitai/config"; + +export default defineConfig({ + reviews: { + high_level_summary: false, + review_status: false, + auto_review: { + enabled: true, + }, + path_filters: [ + // Vendored read-only reference checkouts of upstream Effect and Alchemy + // (see scripts/lib/reference-repos.ts). Nothing imports from them. + "!.repos/**", + ], + }, +}); diff --git a/.coderabbit.yaml b/.coderabbit.yaml deleted file mode 100644 index bf28b1b342d2..000000000000 --- a/.coderabbit.yaml +++ /dev/null @@ -1,9 +0,0 @@ -reviews: - high_level_summary: false - review_status: false - auto_review: - enabled: true - path_filters: - # Vendored read-only reference checkouts of upstream Effect and Alchemy - # (see scripts/lib/reference-repos.ts). Nothing imports from them. - - "!.repos/**" diff --git a/knip.jsonc b/knip.jsonc index 8865bf58869c..5ba7414158a7 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -8,7 +8,11 @@ ".": { // Keep vendored reference repositories outside the root project. "project": ["*.{js,mjs,cjs,ts,mts,cts}", ".github/**/*.cjs"], - "entry": [".github/scripts/thread-transfer-report.cjs"], + "entry": [ + // CodeRabbit loads its configuration by filename. + ".coderabbit.config.ts", + ".github/scripts/thread-transfer-report.cjs", + ], "vite": { "entry": [".github/**/*.test.cjs"] }, "vitest": { "entry": [".github/**/*.test.cjs"] }, }, diff --git a/package.json b/package.json index e4b92d711fb9..559801c550c7 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "sync:repos": "node scripts/sync-reference-repos.ts" }, "devDependencies": { + "@coderabbitai/config": "1.1.0", "@effect/tsgo": "catalog:", "@shadcn/lint": "0.1.5", "@types/node": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56f1bfa60f86..39ebcca645f4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,6 +124,9 @@ importers: .: devDependencies: + '@coderabbitai/config': + specifier: 1.1.0 + version: 1.1.0 '@effect/tsgo': specifier: 'catalog:' version: 0.41.0 @@ -2073,6 +2076,9 @@ packages: '@cloudflare/workers-types@5.20261004.1': resolution: {integrity: sha512-K9D4/Y6bSIDNYFzjqzFMNoWK99pLgfgFxqSa76kfW++3VCkTSzJbzsQRffir366G3kmNyjoigC6ekp7DxIkxkw==} + '@coderabbitai/config@1.1.0': + resolution: {integrity: sha512-NvQKaoOD7fWb7lMKhid57ABVlIBSczw/S+ePk5YvoPuWdrDkyY+PWdqVtq3TRq7VY8f3SNRlMFjmAtXVab66pw==} + '@connectrpc/connect-web@1.7.0': resolution: {integrity: sha512-qyP0YOnUPRWwCc/VfsoydMJvkb7EyUPr2q9sHgBuJzbADjiqck1gKH5V5ZPzPhTLBvmz5UvG+wiZ5sMRQHU1MQ==} peerDependencies: @@ -11520,6 +11526,9 @@ packages: zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + zod@4.5.4: + resolution: {integrity: sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==} + zod@4.6.5: resolution: {integrity: sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==} @@ -12774,6 +12783,10 @@ snapshots: '@cloudflare/workers-types@5.20261004.1': {} + '@coderabbitai/config@1.1.0': + dependencies: + zod: 4.5.4 + '@connectrpc/connect-web@1.7.0(@bufbuild/protobuf@1.10.0)(@connectrpc/connect@1.7.0(@bufbuild/protobuf@1.10.0))': dependencies: '@bufbuild/protobuf': 1.10.0 @@ -22863,6 +22876,8 @@ snapshots: zod@4.4.3: {} + zod@4.5.4: {} + zod@4.6.5: {} zustand@5.0.14(@types/react@19.3.0)(react@19.2.6)(use-sync-external-store@1.6.0(react@19.2.6)): From 3b314ac63029baa0ed66b2b4cb447d415edb781e Mon Sep 17 00:00:00 2001 From: Erik Thorelli Date: Mon, 5 Oct 2026 16:15:22 -0700 Subject: [PATCH 2/2] chore(review): point CodeRabbit at the Effect services guide CodeRabbit uses `docs/internals/effect-services.md` only when its guideline discovery picks it. Of 20 recent reviews of pull requests that changed server, package, or infra TypeScript and listed the guidelines they used, 3 left the guide out. Map the guide to the TypeScript under `apps`, `packages`, and `infra`, and add a path instruction for those paths that names it. Path instructions always reach reviews of matching files, so each one is told to apply the guide; the mapping brings in its text. The guide stays the only copy of the rules. --- .coderabbit.config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.coderabbit.config.ts b/.coderabbit.config.ts index f9a970af810c..52f257921836 100644 --- a/.coderabbit.config.ts +++ b/.coderabbit.config.ts @@ -12,5 +12,18 @@ export default defineConfig({ // (see scripts/lib/reference-repos.ts). Nothing imports from them. "!.repos/**", ], + path_instructions: [ + { + path: "{apps,packages,infra}/**/*.ts", + instructions: "Hold changed code to the rules in docs/internals/effect-services.md.", + }, + ], + }, + knowledge_base: { + code_guidelines: { + filePatterns: [ + { files: "docs/internals/effect-services.md", applyTo: "{apps,packages,infra}/**/*.ts" }, + ], + }, }, });