Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

refactor(config): extract @prisma-next/config - #197

Merged
wmadden merged 15 commits into
mainfrom
tml-2018-optional-split-up-1-coremigration
Mar 3, 2026
Merged

wmadden merged 15 commits into
mainfrom
tml-2018-optional-split-up-1-coremigration

Conversation

@wmadden

@wmadden wmadden commented Mar 1, 2026 •

Copy link
Copy Markdown
Contributor

closes TML-2018

Intent

Split the prisma-next.config.ts authoring surface (types + validation + contract-source provider protocol) out of the migration/control-plane package into a dedicated shared package (@prisma-next/config), and update tooling/authoring consumers accordingly.

Change map

The story

  1. Introduce @prisma-next/config as the shared-plane home for config typing/validation and the contract-source provider protocol.
  2. Remove the moved config surface from @prisma-next/core-control-plane exports and migrate CLI + SQL authoring consumers to the new package.
  3. Keep CLI responsibilities focused on file loading/discovery and mapping config validation failures into structured CLI errors.

Behavior changes & evidence

Compatibility / migration / risk

  • PR base: this PR targets tml-2001-psl-fixtures, so the diff includes the full divergence range between those long-lived branches.
  • Config validation drift to fix: PrismaNextConfig exposes extensionPacks, but runtime validation currently checks extensions in validateConfig() (so malformed extensionPacks can slip through for non-TS configs).

Follow-ups / open questions

  • Align runtime validation with the typed config surface (extensionPacks vs extensions) and add a focused unit test.

Summary by CodeRabbit

  • New Features

    • Introduced dedicated configuration package with enhanced validation and structured error handling.
    • Added support for extension packs in configuration with improved validation.
  • Breaking Changes

    • Renamed extensions field to extensionPacks in Prisma configuration files.
    • Reorganized configuration types and validation exports to new shared package.
  • Improvements

    • Enhanced configuration validation with detailed error messages and field-specific feedback.

@linear

linear Bot commented Mar 1, 2026

Copy link
Copy Markdown
TML-2018 Optional: split up `1-core/migration`

packages/1-framework/1-core/migration/control-plane/src/config-types.ts

This package has become overloaded, with config types validations and contract types present. This task is to split out some more framework core packages - at least one for config types and logic.

@coderabbitai

coderabbitai Bot commented Mar 1, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new @prisma-next/config package is created in the shared configuration layer, consolidating configuration types, validation logic, and control-plane abstractions previously split across multiple modules. Config-related exports are removed from @prisma-next/core-control-plane, and import paths are updated across tooling and authoring packages. Test fixtures rename extensions to extensionPacks.

Changes

Cohort / File(s) Summary
New @prisma-next/config Package
packages/1-framework/1-core/shared/config/*
Created new package with configuration types (PrismaNextConfig, ContractConfig), validation logic (validateConfig), error class (ConfigValidationError), and comprehensive type definitions for control-plane instances and descriptors. Includes tsconfig, package manifest, build config, and test suite covering validation and type-level testing.
Core-Control-Plane Config Exports Removal
packages/1-framework/1-core/migration/control-plane/README.md, package.json, tsdown.config.ts, src/config-validation.ts, test/config-*.test*.ts, vitest.config.ts
Removed config-types and config-validation from public exports; simplified README to focus on migration/emission primitives and structured errors; deleted validation module and related test files; updated build and test configurations.
CLI Tooling Import Updates
packages/1-framework/3-tooling/cli/src/config-loader.ts, src/control-api/types.ts, src/exports/config-types.ts, test/config-types.test.ts, test/config-loader.test.ts
Updated imports for PrismaNextConfig, ContractConfig, and validation logic to source from @prisma-next/config instead of @prisma-next/core-control-plane; added error handling for ConfigValidationError; augmented config loader tests with manifest fields and extensionPacks validation.
SQL Authoring Package Import Updates
packages/2-sql/2-authoring/contract-psl/package.json, src/interpreter.ts, src/provider.ts, test/interpreter.test.ts, test/provider.test.ts, packages/2-sql/2-authoring/contract-ts/package.json, src/config-types.ts, src/exports/config-types.ts
Updated dependencies and imports to use @prisma-next/config instead of @prisma-next/core-control-plane for ContractConfig and related types; adjusted test data typing with Record<string, unknown> casts for storage access.
Test Fixture Configuration Field Renames
test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/*/prisma-next.config*.ts, test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/*/prisma-next.config*.ts
Renamed extensions: [] to extensionPacks: [] across 21 test fixture configuration files; value and structure unchanged, only property name updated.
Additional Type and Config Updates
tsconfig.base.json, packages/1-framework/2-authoring/psl-parser/src/exports/types.ts, packages/1-framework/2-authoring/psl-parser/test/parser.test.ts, packages/3-targets/7-drivers/postgres/test/driver.errors.test.ts
Added tsconfig reference for new config package; exported additional PSL parser types (PslIndexConstraint, PslReferentialAction, PslUniqueConstraint); added diagnostic assertions to parser tests; added timeout parameter to postgres driver test.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A package splits and reorganizes,
Config types find their perfect home,
ExtensionPacks replaces extensions true,
The framework grows more modular anew.
From core to shared, the types now roam. 🎪


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

Base automatically changed from tml-2001-psl-fixtures to main March 1, 2026 19:28
@wmadden
wmadden force-pushed the tml-2018-optional-split-up-1-coremigration branch from d9a525f to a2c6327 Compare March 1, 2026 19:37
@pkg-pr-new

pkg-pr-new Bot commented Mar 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/runtime-executor

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/runtime-executor@197

@prisma-next/sql-runtime

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-runtime@197

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-pgvector@197

@prisma-next/postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/postgres@197

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-orm-client@197

@prisma-next/contract-authoring

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract-authoring@197

@prisma-next/contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract-ts@197

@prisma-next/ids

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/ids@197

@prisma-next/psl-parser

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/psl-parser@197

@prisma-next/cli

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/cli@197

@prisma-next/emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/emitter@197

@prisma-next/eslint-plugin

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/eslint-plugin@197

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/vite-plugin-contract-emit@197

@prisma-next/sql-contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract@197

@prisma-next/sql-errors

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-errors@197

@prisma-next/sql-operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-operations@197

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-schema-ir@197

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-psl@197

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-ts@197

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-emitter@197

@prisma-next/family-sql

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/family-sql@197

@prisma-next/sql-kysely-lane

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-kysely-lane@197

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-lane-query-builder@197

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-relational-core@197

@prisma-next/sql-lane

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-lane@197

@prisma-next/target-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-postgres@197

@prisma-next/driver-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-postgres@197

@prisma-next/core-control-plane

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/core-control-plane@197

@prisma-next/core-execution-plane

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/core-execution-plane@197

@prisma-next/config

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/config@197

@prisma-next/contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract@197

@prisma-next/operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/operations@197

@prisma-next/plan

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/plan@197

@prisma-next/utils

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/utils@197

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-postgres@197

commit: 761bf00

@wmadden
wmadden changed the base branch from main to tml-2019-m4-parameterized-attributes-pgvector-parity March 1, 2026 19:49
Base automatically changed from tml-2019-m4-parameterized-attributes-pgvector-parity to main March 1, 2026 20:02
@wmadden
wmadden force-pushed the tml-2018-optional-split-up-1-coremigration branch from a2c6327 to c705a31 Compare March 1, 2026 20:21

@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

Caution

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

⚠️ Outside diff range comments (1)
packages/1-framework/1-core/shared/config/src/config-types.ts (1)

96-103: ⚠️ Potential issue | 🔴 Critical

Fix validation drift: use extensionPacks consistently in runtime validator and tests.

The runtime validator in config-validation.ts (lines 115–169) checks for configObj['extensions'] and throws errors referencing Config.extensions, but the type definition uses extensionPacks. This inconsistency allows non-TS configs to use the wrong key and pass validation.

Update the validator to check extensionPacks instead, and fix test fixtures in config-validation.test.ts (lines 194–280) that pass extensions: to use extensionPacks: consistently with the type definition.

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

In `@packages/1-framework/1-core/shared/config/src/config-types.ts` around lines
96 - 103, The validator and tests use the wrong key name `extensions` while the
type is `extensionPacks`; update the runtime validator in config-validation.ts
(the block that inspects configObj['extensions'] and emits errors referencing
Config.extensions) to instead check configObj['extensionPacks'] and update the
error messages to reference Config.extensionPacks; also update test fixtures in
config-validation.test.ts that currently pass `extensions:` to use
`extensionPacks:` so tests align with the PrismaNextConfigSchema and prevent
validation drift (refer to PrismaNextConfigSchema and ContractConfigSchema for
the expected shape).
🧹 Nitpick comments (6)
packages/1-framework/1-core/shared/config/test/config-types.test-d.ts (1)

111-112: Add reason text to @ts-expect-error directives.

Per coding guidelines, @ts-expect-error should include a short reason explaining why the error is expected.

📝 Suggested improvement
-    // `@ts-expect-error` targetId mismatch
+    // `@ts-expect-error` targetId mismatch: mysql target descriptor incompatible with postgres config
     target: mysqlTargetDescriptor,

And similarly on line 135:

-    // `@ts-expect-error` targetId mismatch
+    // `@ts-expect-error` targetId mismatch: mysql adapter descriptor incompatible with postgres config
     adapter: mysqlAdapterDescriptor,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/1-core/shared/config/test/config-types.test-d.ts` around
lines 111 - 112, Add a short reason to the `@ts-expect-error` directives that
suppress the expected type mismatch for the `target` property (the line
referencing `target: mysqlTargetDescriptor`) so reviewers know why the error is
intentional; update that directive to something like `// `@ts-expect-error`:
intentional targetId type mismatch for test` and do the same for the other
occurrence that references `mysqlTargetDescriptor` (the later `@ts-expect-error`
in the same test file) so both suppressed errors include a brief explanatory
reason.
packages/2-sql/2-authoring/contract-psl/test/provider.test.ts (1)

1-3: Consider using pathe instead of node:path.

Per coding guidelines and learnings, prefer pathe over node:path for path operations across the codebase for consistent cross-platform behavior.

📝 Suggested change
 import { mkdtemp, rm, writeFile } from 'node:fs/promises';
 import { tmpdir } from 'node:os';
-import { join } from 'node:path';
+import { join } from 'pathe';

Based on learnings: "In the Prisma-next repository, prefer importing and using 'pathe' over the built-in 'node:path' module for path operations across the codebase."

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

In `@packages/2-sql/2-authoring/contract-psl/test/provider.test.ts` around lines 1
- 3, Replace the node:path import with pathe: remove "join" from "node:path" and
import "join" (or suitable pathe functions) from "pathe" instead; update any
uses of join in the test (e.g., in provider.test.ts where join is used alongside
mkdtemp, tmpdir, writeFile, rm) to rely on the pathe-provided join to ensure
consistent cross-platform behavior.
packages/1-framework/3-tooling/cli/src/commands/db-init.ts (1)

2-2: Prefer pathe over node:path for path operations.

Based on learnings, the codebase prefers pathe for consistent cross-platform path handling.

♻️ Proposed fix
-import { relative, resolve } from 'node:path';
+import { relative, resolve } from 'pathe';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/3-tooling/cli/src/commands/db-init.ts` at line 2,
Replace the native Node path import with the project's preferred pathe module:
update the import that currently brings in relative and resolve from 'node:path'
to import them from 'pathe' instead (ensure functions referenced as relative and
resolve in this file, e.g., any uses inside db-init.ts, continue to work
unchanged).
packages/1-framework/1-core/shared/config/tsconfig.prod.json (1)

4-6: Consider removing the commented-out rootDir.

The commented placeholder serves no purpose. If it's intended as documentation for future use, it would be clearer to either remove it entirely or add a comment explaining why it's there.

🧹 Proposed cleanup
 {
   "$schema": "https://json.schemastore.org/tsconfig",
-  "extends": ["@prisma-next/tsconfig/prod"],
-  "compilerOptions": {
-    // "rootDir": "../../../../"
-  }
+  "extends": ["@prisma-next/tsconfig/prod"]
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/1-core/shared/config/tsconfig.prod.json` around lines 4
- 6, Remove the commented-out "rootDir": "../../../../" entry from
tsconfig.prod.json (or replace it with a brief explanatory comment if you intend
to keep it for future context); locate the commented line in the
"compilerOptions" block and either delete it to clean up the config or change it
into an explanatory comment that states why "rootDir" is omitted or what value
should be used in production.
packages/1-framework/3-tooling/cli/src/config-loader.ts (1)

1-1: Use pathe instead of node:path for path operations.

Per coding guidelines and learnings, prefer pathe over node:path for consistent cross-platform behavior and non-Node runtime compatibility.

♻️ Suggested change
-import { dirname, resolve } from 'node:path';
+import { dirname, resolve } from 'pathe';

Based on learnings: "In the Prisma-next repository, prefer importing and using 'pathe' over the built-in 'node:path' module for path operations across the codebase (including CLI commands and tooling files)."

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

In `@packages/1-framework/3-tooling/cli/src/config-loader.ts` at line 1, Replace
the Node built-in path import with pathe: change the import of dirname and
resolve from 'node:path' to import them from 'pathe' so all uses of dirname and
resolve inside config-loader (e.g., in any functions or top-level logic
referencing dirname or resolve) use pathe for consistent cross-platform/non-Node
runtime behavior; update the import statement accordingly and ensure no other
node:path usages remain in this file.
packages/1-framework/3-tooling/cli/test/config-types.test.ts (1)

105-111: Consider using object matchers for related assertions.

Lines 107-110 use multiple individual expect().toBe() calls. Per coding guidelines, prefer object matchers when checking 2+ related values.

♻️ Suggested refactor using toMatchObject
   it('returns the config object unchanged when no contract', () => {
     const result = defineConfig(baseConfig);
     expect(result).toBe(baseConfig);
-    expect(result.family.familyId).toBe('sql');
-    expect(result.target.id).toBe('postgres');
-    expect(result.adapter.id).toBe('postgres');
+    expect(result).toMatchObject({
+      family: { familyId: 'sql' },
+      target: { id: 'postgres' },
+      adapter: { id: 'postgres' },
+    });
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/3-tooling/cli/test/config-types.test.ts` around lines
105 - 111, The test "returns the config object unchanged when no contract" uses
multiple related assertions for properties; replace the separate
expect(result.family.familyId).toBe('sql'),
expect(result.target.id).toBe('postgres'), and
expect(result.adapter.id).toBe('postgres') with a single object matcher on
result (e.g., expect(result).toMatchObject({ family: { familyId: 'sql' },
target: { id: 'postgres' }, adapter: { id: 'postgres' }})) while keeping the
identity assertion expect(result).toBe(baseConfig); update the test that calls
defineConfig(baseConfig) to use this single toMatchObject assertion to verify
related values together.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/1-framework/1-core/shared/config/src/config-validation.ts`:
- Around line 116-171: The validation currently inspects configObj['extensions']
but the canonical property is extensionPacks; update the checker in
config-validation.ts to look for configObj['extensionPacks'] (and iterate that
array) instead of configObj['extensions'], and adjust all related validation
keys/messages (e.g., 'extensions[]', 'extensions[].kind', etc.) to use
'extensionPacks[]' names so throwValidation uses the correct property
identifiers; keep the same item shape checks (kind, id, familyId, version,
targetId, create) and the existing familyId/targetId equality checks against
familyId and expectedTargetId.

In `@packages/1-framework/1-core/shared/config/test/config-validation.test.ts`:
- Around line 56-57: Tests and runtime validation are inconsistent: the fixture
uses the key extensionPacks while the validation/tests expect extensions; update
the validation logic and/or test fixtures in config-validation.test.ts so both
use the same canonical key (pick either extensionPacks or extensions), update
occurrences of the symbol extensionPacks or extensions in the file to match, and
add one explicit regression test asserting that the non-canonical key is either
rejected or accepted per API contract (i.e., a test that submits the alternate
key and expects a validation error or success).

---

Outside diff comments:
In `@packages/1-framework/1-core/shared/config/src/config-types.ts`:
- Around line 96-103: The validator and tests use the wrong key name
`extensions` while the type is `extensionPacks`; update the runtime validator in
config-validation.ts (the block that inspects configObj['extensions'] and emits
errors referencing Config.extensions) to instead check
configObj['extensionPacks'] and update the error messages to reference
Config.extensionPacks; also update test fixtures in config-validation.test.ts
that currently pass `extensions:` to use `extensionPacks:` so tests align with
the PrismaNextConfigSchema and prevent validation drift (refer to
PrismaNextConfigSchema and ContractConfigSchema for the expected shape).

---

Nitpick comments:
In `@packages/1-framework/1-core/shared/config/test/config-types.test-d.ts`:
- Around line 111-112: Add a short reason to the `@ts-expect-error` directives
that suppress the expected type mismatch for the `target` property (the line
referencing `target: mysqlTargetDescriptor`) so reviewers know why the error is
intentional; update that directive to something like `// `@ts-expect-error`:
intentional targetId type mismatch for test` and do the same for the other
occurrence that references `mysqlTargetDescriptor` (the later `@ts-expect-error`
in the same test file) so both suppressed errors include a brief explanatory
reason.

In `@packages/1-framework/1-core/shared/config/tsconfig.prod.json`:
- Around line 4-6: Remove the commented-out "rootDir": "../../../../" entry from
tsconfig.prod.json (or replace it with a brief explanatory comment if you intend
to keep it for future context); locate the commented line in the
"compilerOptions" block and either delete it to clean up the config or change it
into an explanatory comment that states why "rootDir" is omitted or what value
should be used in production.

In `@packages/1-framework/3-tooling/cli/src/commands/db-init.ts`:
- Line 2: Replace the native Node path import with the project's preferred pathe
module: update the import that currently brings in relative and resolve from
'node:path' to import them from 'pathe' instead (ensure functions referenced as
relative and resolve in this file, e.g., any uses inside db-init.ts, continue to
work unchanged).

In `@packages/1-framework/3-tooling/cli/src/config-loader.ts`:
- Line 1: Replace the Node built-in path import with pathe: change the import of
dirname and resolve from 'node:path' to import them from 'pathe' so all uses of
dirname and resolve inside config-loader (e.g., in any functions or top-level
logic referencing dirname or resolve) use pathe for consistent
cross-platform/non-Node runtime behavior; update the import statement
accordingly and ensure no other node:path usages remain in this file.

In `@packages/1-framework/3-tooling/cli/test/config-types.test.ts`:
- Around line 105-111: The test "returns the config object unchanged when no
contract" uses multiple related assertions for properties; replace the separate
expect(result.family.familyId).toBe('sql'),
expect(result.target.id).toBe('postgres'), and
expect(result.adapter.id).toBe('postgres') with a single object matcher on
result (e.g., expect(result).toMatchObject({ family: { familyId: 'sql' },
target: { id: 'postgres' }, adapter: { id: 'postgres' }})) while keeping the
identity assertion expect(result).toBe(baseConfig); update the test that calls
defineConfig(baseConfig) to use this single toMatchObject assertion to verify
related values together.

In `@packages/2-sql/2-authoring/contract-psl/test/provider.test.ts`:
- Around line 1-3: Replace the node:path import with pathe: remove "join" from
"node:path" and import "join" (or suitable pathe functions) from "pathe"
instead; update any uses of join in the test (e.g., in provider.test.ts where
join is used alongside mkdtemp, tmpdir, writeFile, rm) to rely on the
pathe-provided join to ensure consistent cross-platform behavior.

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between e566b47 and c705a31.

⛔ Files ignored due to path filters (5)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • projects/psl-contract-authoring/plans/optional-split-up-1-core-migration-plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/plans/plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/spec.md is excluded by !projects/**
  • projects/psl-contract-authoring/specs/optional-split-up-1-core-migration.spec.md is excluded by !projects/**
📒 Files selected for processing (42)
  • packages/1-framework/1-core/migration/control-plane/README.md
  • packages/1-framework/1-core/migration/control-plane/package.json
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts
  • packages/1-framework/1-core/migration/control-plane/test/errors.test.ts
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/shared/config/README.md
  • packages/1-framework/1-core/shared/config/biome.jsonc
  • packages/1-framework/1-core/shared/config/package.json
  • packages/1-framework/1-core/shared/config/src/config-types.ts
  • packages/1-framework/1-core/shared/config/src/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/contract-source-types.ts
  • packages/1-framework/1-core/shared/config/src/errors.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/exports/types.ts
  • packages/1-framework/1-core/shared/config/src/types.ts
  • packages/1-framework/1-core/shared/config/test/config-types.test-d.ts
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts
  • packages/1-framework/1-core/shared/config/tsconfig.json
  • packages/1-framework/1-core/shared/config/tsconfig.prod.json
  • packages/1-framework/1-core/shared/config/tsdown.config.ts
  • packages/1-framework/1-core/shared/config/vitest.config.ts
  • packages/1-framework/2-authoring/psl-parser/src/exports/types.ts
  • packages/1-framework/2-authoring/psl-parser/test/parser.test.ts
  • packages/1-framework/3-tooling/cli/package.json
  • packages/1-framework/3-tooling/cli/src/commands/db-init.ts
  • packages/1-framework/3-tooling/cli/src/config-loader.ts
  • packages/1-framework/3-tooling/cli/src/control-api/types.ts
  • packages/1-framework/3-tooling/cli/src/exports/config-types.ts
  • packages/1-framework/3-tooling/cli/test/config-types.test.ts
  • packages/2-sql/2-authoring/contract-psl/package.json
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/src/provider.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-ts/package.json
  • packages/2-sql/2-authoring/contract-ts/src/config-types.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/config-types.ts
  • tsconfig.base.json
💤 Files with no reviewable changes (5)
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts

@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: 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 `@packages/1-framework/1-core/shared/config/src/config-validation.ts`:
- Around line 15-235: validateConfig currently duplicates structural checks
already handled by Arktype schemas in defineConfig/config-types.ts; refactor by
removing the per-field typeof/required validations for descriptors (family,
target, adapter, driver, extensionPacks) from validateConfig and instead create
detailed Arktype schemas in config-types.ts for those descriptor shapes, keeping
only the runtime cross-field consistency checks (e.g. familyId and targetId
match validations) inside validateConfig; update defineConfig to use the new
Arktype descriptor schemas and ensure validateConfig still asserts and throws
via throwValidation only for the logical validators (familyId/targetId matching
and presence of top-level adapter/target/family references).
- Around line 34-213: The runtime validator is missing checks for the required
descriptor fields "id" and "manifest" on all control-plane descriptors; update
the validation logic for family, target, adapter, extensionPacks[] (extObj) and
driver to assert that ['id'] is a string and ['manifest'] exists and has the
correct shape (use the existing throwValidation helper for errors), i.e. add
checks like family['id'] typeof string and family['manifest'] typeof object (or
validate against ExtensionPackManifest), and mirror those checks for
target['id']/target['manifest'], adapter['id']/adapter['manifest'],
extensionPacks[].id/extensionPacks[].manifest (extObj), and
driver['id']/driver['manifest'] using the same error keys (e.g. 'family.id',
'family.manifest', 'extensionPacks[].manifest') so missing fields produce
consistent validation messages.
- Line 221: Replace the prototype-including property check "if (!('source' in
contract))" with an own-property check using Object.hasOwn(contract, 'source')
in the validation logic (the conditional that currently references contract and
'source'); specifically, change the test to if (!Object.hasOwn(contract,
'source')) so only own properties are considered during config validation for
the contract object.

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between c705a31 and 924a9ec.

📒 Files selected for processing (3)
  • packages/1-framework/1-core/shared/config/README.md
  • packages/1-framework/1-core/shared/config/src/config-validation.ts
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts

@wmadden wmadden left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Submitting stale pending review so thread-reply automation can proceed.

@wmadden
wmadden force-pushed the tml-2018-optional-split-up-1-coremigration branch from 0b95d81 to a02d925 Compare March 2, 2026 07:25

@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

Caution

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

⚠️ Outside diff range comments (1)
packages/1-framework/1-core/migration/control-plane/README.md (1)

33-49: ⚠️ Potential issue | 🟡 Minor

Clarify the undefined config variable in the example.

Line 46 references a config variable that is not defined anywhere in the example:

const familyInstance = config.family.create(stack);

This breaks the example's self-containment. Either introduce config earlier in the example (showing how it's loaded/created), or replace this line with a comment explaining that config would typically come from loading a config file. Alternatively, if config is not the main focus of this example, consider removing this line and keeping the example focused solely on stack creation.

💡 Suggested clarification

Option 1: Add context for where config comes from:

 // Create a stack with sensible defaults
 const stack = createControlPlaneStack({
   target: postgresTarget,
   adapter: postgresAdapter,
   driver: postgresDriver, // optional, defaults to undefined
   extensionPacks: [pgvector], // optional, defaults to []
 });

-// Use stack for family instance creation
-const familyInstance = config.family.create(stack);
+// The stack is then used with your loaded config
+// (typically from `@prisma-next/config`)
+const familyInstance = loadedConfig.family.create(stack);

Option 2: Remove the undefined reference and keep the example focused:

 // Create a stack with sensible defaults
 const stack = createControlPlaneStack({
   target: postgresTarget,
   adapter: postgresAdapter,
   driver: postgresDriver, // optional, defaults to undefined
   extensionPacks: [pgvector], // optional, defaults to []
 });

-// Use stack for family instance creation
-const familyInstance = config.family.create(stack);
-
 // Stack is also used internally by ControlClient and CLI commands
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/1-core/migration/control-plane/README.md` around lines
33 - 49, The example shows createControlPlaneStack(...) but then calls an
undefined config.family.create(stack); update the example to be self-contained:
either add a brief snippet showing how to load/define config (e.g., a note that
config is loaded from your app or config file and then used as
config.family.create) or remove/replace the line with a single explanatory
comment such as "// typically you'd create a family instance via your app
config: config.family.create(stack)" so readers aren't left with an undefined
symbol; ensure the change references createControlPlaneStack and the
config.family.create(stack) call so it's clear what was adjusted.
🧹 Nitpick comments (2)
test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.missing-output.ts (1)

14-14: Add a negative runtime-validation case for extensionPacks here.

Since this fixture intentionally bypasses defineConfig, it’s a strong place to assert runtime rejection of malformed extensionPacks (not just []) so the known validation drift is covered.

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

In
`@test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.missing-output.ts`
at line 14, Add a negative runtime-validation case in the fixture that bypasses
defineConfig by assigning a deliberately malformed value to extensionPacks
(e.g., a string or object instead of an array of valid pack descriptors) and
assert that loading/initializing the config throws/rejects at runtime; update
the prisma-next.config.missing-output.ts fixture so extensionPacks is set to an
invalid value and the test expects a runtime validation error when the config is
consumed (referencing extensionPacks and the fact this fixture bypasses
defineConfig).
packages/1-framework/1-core/migration/control-plane/test/errors.test.ts (1)

139-143: Prefer object matchers for these related assertion groups.

These tests check multiple related fields on the same object; switching to toMatchObject (plus explicit undefined checks where needed) keeps failures more focused and matches repo test style.

As per coding guidelines, "Prefer object matchers (toMatchObject) over multiple individual expect().toBe() calls when checking 2 or more related values in tests".

Also applies to: 373-383

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

In `@packages/1-framework/1-core/migration/control-plane/test/errors.test.ts`
around lines 139 - 143, Replace the multiple separate assertions for
errorConfigFileNotFound() with an object matcher: call
errorConfigFileNotFound(), then use expect(...).toMatchObject({ code: '4001' })
and a separate expect(error.where).toBeUndefined() to keep the failure focused;
do the same refactor for the related test block around the other occurrence
(lines noted) so related fields are asserted via toMatchObject and explicit
undefined checks for where.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/1-framework/1-core/shared/config/src/types.ts`:
- Line 77: The method signature for emitContract currently uses the redundant
union ContractIR | unknown—change its parameter type to match the other
interface methods by declaring emitContract(options: { readonly contractIR:
unknown }): Promise<EmitContractResult>; so the API is consistent with
schemaVerify, sign and introspect and the implementation can continue to
validate the input internally; update any related type references to remove the
misleading ContractIR | unknown union and keep EmitContractResult unchanged.

In `@packages/1-framework/3-tooling/cli/test/config-loader.test.ts`:
- Line 47: Add a regression test in config-loader.test.ts that asserts malformed
extensionPacks entries are rejected: construct a config object (or fixture) with
extensionPacks set to invalid values (e.g., [123], ["valid", {bad:"obj"}], or a
non-array) and call the same entry point used by other tests (the loader
function under test, e.g., loadConfig or parseConfig); expect it to throw/return
a validation error (use the existing test harness's expect(...).toThrow /
rejects.toThrow or equivalent) so invalid extensionPacks are explicitly covered
alongside the existing good-case tests that include extensionPacks: [].

---

Outside diff comments:
In `@packages/1-framework/1-core/migration/control-plane/README.md`:
- Around line 33-49: The example shows createControlPlaneStack(...) but then
calls an undefined config.family.create(stack); update the example to be
self-contained: either add a brief snippet showing how to load/define config
(e.g., a note that config is loaded from your app or config file and then used
as config.family.create) or remove/replace the line with a single explanatory
comment such as "// typically you'd create a family instance via your app
config: config.family.create(stack)" so readers aren't left with an undefined
symbol; ensure the change references createControlPlaneStack and the
config.family.create(stack) call so it's clear what was adjusted.

---

Nitpick comments:
In `@packages/1-framework/1-core/migration/control-plane/test/errors.test.ts`:
- Around line 139-143: Replace the multiple separate assertions for
errorConfigFileNotFound() with an object matcher: call
errorConfigFileNotFound(), then use expect(...).toMatchObject({ code: '4001' })
and a separate expect(error.where).toBeUndefined() to keep the failure focused;
do the same refactor for the related test block around the other occurrence
(lines noted) so related fields are asserted via toMatchObject and explicit
undefined checks for where.

In
`@test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.missing-output.ts`:
- Line 14: Add a negative runtime-validation case in the fixture that bypasses
defineConfig by assigning a deliberately malformed value to extensionPacks
(e.g., a string or object instead of an array of valid pack descriptors) and
assert that loading/initializing the config throws/rejects at runtime; update
the prisma-next.config.missing-output.ts fixture so extensionPacks is set to an
invalid value and the test expects a runtime validation error when the config is
consumed (referencing extensionPacks and the fact this fixture bypasses
defineConfig).

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 924a9ec and a02d925.

⛔ Files ignored due to path filters (5)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • projects/psl-contract-authoring/plans/optional-split-up-1-core-migration-plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/plans/plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/spec.md is excluded by !projects/**
  • projects/psl-contract-authoring/specs/optional-split-up-1-core-migration.spec.md is excluded by !projects/**
📒 Files selected for processing (71)
  • packages/1-framework/1-core/migration/control-plane/README.md
  • packages/1-framework/1-core/migration/control-plane/package.json
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts
  • packages/1-framework/1-core/migration/control-plane/test/errors.test.ts
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/shared/config/README.md
  • packages/1-framework/1-core/shared/config/biome.jsonc
  • packages/1-framework/1-core/shared/config/package.json
  • packages/1-framework/1-core/shared/config/src/config-types.ts
  • packages/1-framework/1-core/shared/config/src/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/contract-source-types.ts
  • packages/1-framework/1-core/shared/config/src/errors.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/exports/types.ts
  • packages/1-framework/1-core/shared/config/src/types.ts
  • packages/1-framework/1-core/shared/config/test/config-types.test-d.ts
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts
  • packages/1-framework/1-core/shared/config/tsconfig.json
  • packages/1-framework/1-core/shared/config/tsconfig.prod.json
  • packages/1-framework/1-core/shared/config/tsdown.config.ts
  • packages/1-framework/1-core/shared/config/vitest.config.ts
  • packages/1-framework/2-authoring/psl-parser/src/exports/types.ts
  • packages/1-framework/2-authoring/psl-parser/test/parser.test.ts
  • packages/1-framework/3-tooling/cli/package.json
  • packages/1-framework/3-tooling/cli/src/commands/db-init.ts
  • packages/1-framework/3-tooling/cli/src/config-loader.ts
  • packages/1-framework/3-tooling/cli/src/control-api/types.ts
  • packages/1-framework/3-tooling/cli/src/exports/config-types.ts
  • packages/1-framework/3-tooling/cli/test/config-loader.test.ts
  • packages/1-framework/3-tooling/cli/test/config-types.test.ts
  • packages/2-sql/2-authoring/contract-psl/package.json
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/src/provider.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-ts/package.json
  • packages/2-sql/2-authoring/contract-ts/src/config-types.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/config-types.ts
  • packages/3-targets/7-drivers/postgres/test/driver.errors.test.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-init/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-schema-verify/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-sign/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.no-verify.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma-next.config.emit.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma-next.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/vite-plugin/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.async-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.defaults.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.document-family.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.invalid-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.missing-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.sync-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma-next.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.mysql-target.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.ts
  • tsconfig.base.json
💤 Files with no reviewable changes (5)
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/1-framework/1-core/shared/config/src/config-types.ts
🚧 Files skipped from review as they are similar to previous changes (19)
  • packages/2-sql/2-authoring/contract-ts/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/tsconfig.prod.json
  • packages/1-framework/1-core/shared/config/package.json
  • packages/1-framework/1-core/shared/config/src/exports/types.ts
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/1-framework/1-core/shared/config/src/config-validation.ts
  • packages/2-sql/2-authoring/contract-psl/package.json
  • packages/1-framework/1-core/shared/config/vitest.config.ts
  • packages/1-framework/3-tooling/cli/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/biome.jsonc
  • packages/2-sql/2-authoring/contract-psl/src/provider.ts
  • packages/2-sql/2-authoring/contract-ts/package.json
  • packages/1-framework/2-authoring/psl-parser/src/exports/types.ts
  • packages/1-framework/1-core/shared/config/tsdown.config.ts
  • packages/1-framework/3-tooling/cli/package.json
  • packages/1-framework/1-core/shared/config/tsconfig.json
  • packages/1-framework/1-core/shared/config/README.md
  • tsconfig.base.json

wmadden added 2 commits March 3, 2026 17:06
Capture TML-2018 as an optional milestone addendum, defining @prisma-next/config responsibilities and architecture placement with a concrete execution plan.
Create @prisma-next/config so config typing, provider diagnostics, and validation live in the shared core plane instead of being implicitly owned by migration code.
wmadden added 10 commits March 3, 2026 17:07
…next/config

Point config-loading and provider-facing consumers at the new package so config ownership is centralized and migration-plane packages no longer define the authoring contract.
…next/config

Finalize the split by deleting migrated config types/validation exports from core-control-plane and tightening docs/build entries to reflect its migration-focused responsibilities.
Remove stale type exports that were no longer declared in parser types, which was breaking tsdown DTS generation. Update the trailing model attribute argument test to assert the generic attribute parsing behavior that the parser now guarantees.
Use bracket-based storage access and explicit narrowing in interpreter/provider tests so strict TypeScript index-signature rules pass during workspace typecheck.
Add targeted branch-path tests for control-plane error helpers and broaden config validation/error tests to cover descriptor, extension, driver, and contract failure branches.
Use extensionPacks as the canonical runtime validation key and reject legacy extensions to prevent silent config drift in non-TypeScript config paths.
Strengthen runtime config validation so non-TypeScript config inputs enforce required descriptor metadata and own-property checks, matching control-plane contract expectations raised in PR review.
Drop manifest-required runtime checks in shared config validation, update CLI fixture configs to use extensionPacks, and harden flaky driver error test timeout so full repo checks pass after rebase.
Assert loadConfig rejects invalid extensionPacks descriptors with a structured validation error so descriptor-shape drift is caught early.
Align emitContract with sibling APIs by accepting unknown directly, avoiding the redundant ContractIR | unknown annotation that collapses to unknown.
@wmadden
wmadden force-pushed the tml-2018-optional-split-up-1-coremigration branch from 2b5027f to e412aad Compare March 3, 2026 16:07

@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

♻️ Duplicate comments (2)
packages/1-framework/1-core/shared/config/test/config-validation.test.ts (1)

359-379: ⚠️ Potential issue | 🟠 Major

This test enforces non-compliant behavior for descriptor manifest.

accepts descriptors without manifest fields codifies the exact gap we need to prevent. This should assert failure paths (family.manifest, target.manifest, etc.) instead of success.

✅ Suggested test direction
-  it('accepts descriptors without manifest fields', () => {
-    const config = createValidRawConfig({
-      family: { manifest: undefined },
-      target: { manifest: undefined },
-      adapter: { manifest: undefined },
-      driver: { manifest: undefined },
-      extensionPacks: [
-        {
-          kind: 'extension',
-          id: 'pgvector',
-          familyId: 'sql',
-          targetId: 'postgres',
-          version: '0.0.1',
-          manifest: undefined,
-          create: vi.fn(),
-        },
-      ],
-    });
-
-    expect(() => validateConfig(config)).not.toThrow();
-  });
+  it('requires manifest on descriptors', () => {
+    expectFieldError(createValidRawConfig({ family: { manifest: undefined } }), 'family.manifest');
+    expectFieldError(createValidRawConfig({ target: { manifest: undefined } }), 'target.manifest');
+    expectFieldError(createValidRawConfig({ adapter: { manifest: undefined } }), 'adapter.manifest');
+    expectFieldError(createValidRawConfig({ driver: { manifest: undefined } }), 'driver.manifest');
+    expectFieldError(
+      createValidRawConfig({
+        extensionPacks: [
+          {
+            kind: 'extension',
+            id: 'pgvector',
+            familyId: 'sql',
+            targetId: 'postgres',
+            version: '0.0.1',
+            manifest: undefined,
+            create: vi.fn(),
+          },
+        ],
+      }),
+      'extensionPacks[].manifest',
+    );
+  });
As per coding guidelines, “All control plane descriptors must include `manifest` property of type `ExtensionPackManifest`.”
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/1-core/shared/config/test/config-validation.test.ts`
around lines 359 - 379, The test "accepts descriptors without manifest fields"
currently allows missing manifest values but should enforce failure: update the
test that builds the config with createValidRawConfig (setting family.manifest,
target.manifest, adapter.manifest, driver.manifest and extensionPacks[].manifest
to undefined) to expect validateConfig(config) to throw an error instead of
notThrowing; specifically assert that validateConfig rejects configs missing the
required ExtensionPackManifest on control-plane descriptors (family, target,
adapter, driver, and extensionPacks entries) so the test verifies the validator
enforces the manifest presence.
packages/1-framework/1-core/shared/config/src/config-validation.ts (1)

34-215: ⚠️ Potential issue | 🟠 Major

Required manifest validation is still missing across descriptor validators.

Runtime validation currently accepts descriptors without manifest, so malformed raw config can still pass on non-TS paths.

🐛 Patch pattern
   if (typeof family['version'] !== 'string') {
     throwValidation('family.version', 'Config.family must have version: string');
   }
+  if (!family['manifest'] || typeof family['manifest'] !== 'object') {
+    throwValidation('family.manifest', 'Config.family must have manifest: ExtensionPackManifest');
+  }
@@
   if (typeof target['version'] !== 'string') {
     throwValidation('target.version', 'Config.target must have version: string');
   }
+  if (!target['manifest'] || typeof target['manifest'] !== 'object') {
+    throwValidation('target.manifest', 'Config.target must have manifest: ExtensionPackManifest');
+  }
@@
   if (typeof adapter['version'] !== 'string') {
     throwValidation('adapter.version', 'Config.adapter must have version: string');
   }
+  if (!adapter['manifest'] || typeof adapter['manifest'] !== 'object') {
+    throwValidation('adapter.manifest', 'Config.adapter must have manifest: ExtensionPackManifest');
+  }
@@
       if (typeof extObj['version'] !== 'string') {
         throwValidation(
           'extensionPacks[].version',
           'Config.extensionPacks items must have version: string',
         );
       }
+      if (!extObj['manifest'] || typeof extObj['manifest'] !== 'object') {
+        throwValidation(
+          'extensionPacks[].manifest',
+          'Config.extensionPacks items must have manifest: ExtensionPackManifest',
+        );
+      }
@@
     if (typeof driver['version'] !== 'string') {
       throwValidation('driver.version', 'Config.driver must have version: string');
     }
+    if (!driver['manifest'] || typeof driver['manifest'] !== 'object') {
+      throwValidation('driver.manifest', 'Config.driver must have manifest: ExtensionPackManifest');
+    }
As per coding guidelines, “All control plane descriptors must include `manifest` property of type `ExtensionPackManifest`.”
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/1-framework/1-core/shared/config/src/config-validation.ts` around
lines 34 - 215, Several descriptor validators (family, target, adapter, each
extensionPacks item extObj, and driver) are missing validation for a required
manifest property; add checks that family['manifest'], target['manifest'],
adapter['manifest'], extObj['manifest'] and driver['manifest'] exist and are of
the correct type (ExtensionPackManifest) and call throwValidation with a clear
key (e.g. 'family.manifest', 'target.manifest', 'adapter.manifest',
'extensionPacks[].manifest', 'driver.manifest') and descriptive messages when
they are missing or wrong; follow the existing pattern used for
id/version/targetId checks so the new validations are consistent with
throwValidation usage.
🧹 Nitpick comments (3)
packages/1-framework/1-core/migration/control-plane/test/errors.test.ts (1)

153-157: Remove duplicated test cases and keep this suite lean.

These two additions repeat scenarios already covered later in the file (without configPath, with only expected, with only actual). Dropping the duplicates will also help keep this test file closer to the 500-line limit.

♻️ Proposed cleanup
-  it('errorConfigFileNotFound without path omits where', () => {
-    const error = errorConfigFileNotFound();
-    expect(error.code).toBe('4001');
-    expect(error.where).toBeUndefined();
-  });
@@
-  it('errorHashMismatch with expected only', () => {
-    const error = errorHashMismatch({ expected: 'hash1' });
-    expect(error.meta?.['expected']).toBe('hash1');
-    expect(error.meta?.['actual']).toBeUndefined();
-  });
-
-  it('errorHashMismatch with actual only', () => {
-    const error = errorHashMismatch({ actual: 'hash2' });
-    expect(error.meta?.['expected']).toBeUndefined();
-    expect(error.meta?.['actual']).toBe('hash2');
-  });
As per coding guidelines, “Keep test files under 500 lines” and avoid tests that only restate already-covered behavior.

Also applies to: 395-405

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

In `@packages/1-framework/1-core/migration/control-plane/test/errors.test.ts`
around lines 153 - 157, Remove the duplicated test cases that restate scenarios
already covered later: delete the redundant it blocks invoking
errorConfigFileNotFound() for the "without path"/"without configPath"/"with only
expected"/"with only actual" variants so the suite stays lean and under 500
lines; locate the duplicate tests by searching for the errorConfigFileNotFound()
invocations and remove the earlier duplicates (the blocks around the current
snippet and the ones at the mentionedd duplicate region) leaving only the
canonical tests that assert code '4001' and the distinct where/expected/actual
behaviors.
packages/1-framework/3-tooling/cli/src/config-loader.ts (2)

4-8: Use CLI-local structured error factories at this call site.

For CLI sources, these factories should come from utils/cli-errors.ts rather than @prisma-next/core-control-plane/errors.

♻️ Suggested import change
 import {
   errorConfigFileNotFound,
   errorConfigValidation,
   errorUnexpected,
-} from '@prisma-next/core-control-plane/errors';
+} from './utils/cli-errors';

As per coding guidelines "packages/1-framework/3-tooling/cli/**/*.ts: Call sites must throw CliStructuredError instances with full context (why, fix, docsUrl, etc.) instead of generic errors. Use factory functions from utils/cli-errors.ts to create structured errors."

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

In `@packages/1-framework/3-tooling/cli/src/config-loader.ts` around lines 4 - 8,
The import of error factories errorConfigFileNotFound, errorConfigValidation,
and errorUnexpected should be switched from
'@prisma-next/core-control-plane/errors' to the CLI-local structured error
factories in utils/cli-errors.ts and the code in config-loader.ts should use
those CLI-specific factories (e.g., errorConfigFileNotFound,
errorConfigValidation, errorUnexpected from utils/cli-errors.ts) so the loader
throws CliStructuredError instances with full context (why, fix, docsUrl)
instead of generic/core-plane errors; update the import statement and ensure any
thrown errors in functions like the config parsing/validation paths call the CLI
factory functions to produce structured errors.

1-3: Switch node:path import to pathe for cross-runtime consistency.

Replace import { dirname, resolve } from 'node:path' with import { dirname, resolve } from 'pathe'. This matches the established pattern across the CLI tooling and aligns with repository conventions for path operations in TypeScript.

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

In `@packages/1-framework/3-tooling/cli/src/config-loader.ts` around lines 1 - 3,
Replace the Node builtin path import with the repository-standard pathe import:
change the import that pulls dirname and resolve from 'node:path' to import them
from 'pathe' so the code uses cross-runtime pathe utilities (affecting the
import that currently reads "import { dirname, resolve } from 'node:path'"; keep
references to dirname and resolve unchanged elsewhere in config-loader.ts).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/1-framework/1-core/shared/config/tsconfig.json`:
- Line 7: The tsconfig.json currently excludes build outputs and node_modules
but not internal test fixtures, which allows fixture-only types to leak into
package typechecking; update the "exclude" array in the tsconfig.json (the
"exclude" property) to add the fixture glob "test/fixtures/**/*" (or
"**/test/fixtures/**/*" if repo-wide), so fixtures are ignored by TypeScript
typechecking and internal fixture types won't affect package typings.

In `@packages/3-targets/7-drivers/postgres/test/driver.errors.test.ts`:
- Around line 362-363: The test currently asserts that
driver.acquireConnection() rejects twice but doesn't prove the driver attempted
a fresh connection after the first failure; update the test to also assert that
the mocked connect function was invoked twice (e.g., verify connect was called
two times) after the two rejects so you confirm the in-flight lease was cleared
and a new acquisition was attempted; locate the test around
driver.acquireConnection() calls and add an assertion referencing the mocked
connect (or connect mock) call count to equal 2.

---

Duplicate comments:
In `@packages/1-framework/1-core/shared/config/src/config-validation.ts`:
- Around line 34-215: Several descriptor validators (family, target, adapter,
each extensionPacks item extObj, and driver) are missing validation for a
required manifest property; add checks that family['manifest'],
target['manifest'], adapter['manifest'], extObj['manifest'] and
driver['manifest'] exist and are of the correct type (ExtensionPackManifest) and
call throwValidation with a clear key (e.g. 'family.manifest',
'target.manifest', 'adapter.manifest', 'extensionPacks[].manifest',
'driver.manifest') and descriptive messages when they are missing or wrong;
follow the existing pattern used for id/version/targetId checks so the new
validations are consistent with throwValidation usage.

In `@packages/1-framework/1-core/shared/config/test/config-validation.test.ts`:
- Around line 359-379: The test "accepts descriptors without manifest fields"
currently allows missing manifest values but should enforce failure: update the
test that builds the config with createValidRawConfig (setting family.manifest,
target.manifest, adapter.manifest, driver.manifest and extensionPacks[].manifest
to undefined) to expect validateConfig(config) to throw an error instead of
notThrowing; specifically assert that validateConfig rejects configs missing the
required ExtensionPackManifest on control-plane descriptors (family, target,
adapter, driver, and extensionPacks entries) so the test verifies the validator
enforces the manifest presence.

---

Nitpick comments:
In `@packages/1-framework/1-core/migration/control-plane/test/errors.test.ts`:
- Around line 153-157: Remove the duplicated test cases that restate scenarios
already covered later: delete the redundant it blocks invoking
errorConfigFileNotFound() for the "without path"/"without configPath"/"with only
expected"/"with only actual" variants so the suite stays lean and under 500
lines; locate the duplicate tests by searching for the errorConfigFileNotFound()
invocations and remove the earlier duplicates (the blocks around the current
snippet and the ones at the mentionedd duplicate region) leaving only the
canonical tests that assert code '4001' and the distinct where/expected/actual
behaviors.

In `@packages/1-framework/3-tooling/cli/src/config-loader.ts`:
- Around line 4-8: The import of error factories errorConfigFileNotFound,
errorConfigValidation, and errorUnexpected should be switched from
'@prisma-next/core-control-plane/errors' to the CLI-local structured error
factories in utils/cli-errors.ts and the code in config-loader.ts should use
those CLI-specific factories (e.g., errorConfigFileNotFound,
errorConfigValidation, errorUnexpected from utils/cli-errors.ts) so the loader
throws CliStructuredError instances with full context (why, fix, docsUrl)
instead of generic/core-plane errors; update the import statement and ensure any
thrown errors in functions like the config parsing/validation paths call the CLI
factory functions to produce structured errors.
- Around line 1-3: Replace the Node builtin path import with the
repository-standard pathe import: change the import that pulls dirname and
resolve from 'node:path' to import them from 'pathe' so the code uses
cross-runtime pathe utilities (affecting the import that currently reads "import
{ dirname, resolve } from 'node:path'"; keep references to dirname and resolve
unchanged elsewhere in config-loader.ts).

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 2b5027f and e412aad.

⛔ Files ignored due to path filters (5)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • projects/psl-contract-authoring/plans/optional-split-up-1-core-migration-plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/plans/plan.md is excluded by !projects/**
  • projects/psl-contract-authoring/spec.md is excluded by !projects/**
  • projects/psl-contract-authoring/specs/optional-split-up-1-core-migration.spec.md is excluded by !projects/**
📒 Files selected for processing (70)
  • packages/1-framework/1-core/migration/control-plane/README.md
  • packages/1-framework/1-core/migration/control-plane/package.json
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts
  • packages/1-framework/1-core/migration/control-plane/test/errors.test.ts
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/shared/config/README.md
  • packages/1-framework/1-core/shared/config/biome.jsonc
  • packages/1-framework/1-core/shared/config/package.json
  • packages/1-framework/1-core/shared/config/src/config-types.ts
  • packages/1-framework/1-core/shared/config/src/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/contract-source-types.ts
  • packages/1-framework/1-core/shared/config/src/errors.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/src/exports/config-validation.ts
  • packages/1-framework/1-core/shared/config/src/exports/types.ts
  • packages/1-framework/1-core/shared/config/src/types.ts
  • packages/1-framework/1-core/shared/config/test/config-types.test-d.ts
  • packages/1-framework/1-core/shared/config/test/config-validation.test.ts
  • packages/1-framework/1-core/shared/config/tsconfig.json
  • packages/1-framework/1-core/shared/config/tsconfig.prod.json
  • packages/1-framework/1-core/shared/config/tsdown.config.ts
  • packages/1-framework/1-core/shared/config/vitest.config.ts
  • packages/1-framework/2-authoring/psl-parser/src/exports/types.ts
  • packages/1-framework/2-authoring/psl-parser/test/parser.test.ts
  • packages/1-framework/3-tooling/cli/package.json
  • packages/1-framework/3-tooling/cli/src/config-loader.ts
  • packages/1-framework/3-tooling/cli/src/control-api/types.ts
  • packages/1-framework/3-tooling/cli/src/exports/config-types.ts
  • packages/1-framework/3-tooling/cli/test/config-loader.test.ts
  • packages/1-framework/3-tooling/cli/test/config-types.test.ts
  • packages/2-sql/2-authoring/contract-psl/package.json
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/src/provider.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-ts/package.json
  • packages/2-sql/2-authoring/contract-ts/src/config-types.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/config-types.ts
  • packages/3-targets/7-drivers/postgres/test/driver.errors.test.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-init/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-schema-verify/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-sign/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.no-verify.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma-next.config.emit.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma-next.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/vite-plugin/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.async-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.defaults.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.document-family.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.invalid-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.missing-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.sync-source.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma-next.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-contract/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.mysql-target.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.ts
  • tsconfig.base.json
💤 Files with no reviewable changes (5)
  • packages/1-framework/1-core/migration/control-plane/tsdown.config.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-validation.test.ts
  • packages/1-framework/1-core/migration/control-plane/src/config-validation.ts
  • packages/1-framework/1-core/migration/control-plane/vitest.config.ts
  • packages/1-framework/1-core/migration/control-plane/test/config-types.test-d.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/1-framework/1-core/shared/config/src/config-types.ts
🚧 Files skipped from review as they are similar to previous changes (33)
  • packages/2-sql/2-authoring/contract-ts/src/config-types.ts
  • packages/1-framework/1-core/shared/config/package.json
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-driver.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-introspect/prisma-next.config.no-db.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/1-framework/1-core/shared/config/test/config-types.test-d.ts
  • packages/1-framework/3-tooling/cli/src/control-api/types.ts
  • packages/1-framework/1-core/shared/config/src/errors.ts
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/1-framework/2-authoring/psl-parser/src/exports/types.ts
  • packages/2-sql/2-authoring/contract-psl/package.json
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/emit/prisma-next.config.no-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.async-source.ts
  • packages/2-sql/2-authoring/contract-ts/package.json
  • packages/2-sql/2-authoring/contract-psl/src/provider.ts
  • packages/1-framework/1-core/shared/config/README.md
  • packages/1-framework/1-core/shared/config/src/exports/types.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.defaults.ts
  • packages/1-framework/1-core/shared/config/tsconfig.prod.json
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.custom-output.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.sync-source.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-init/prisma-next.config.with-db.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.invalid-contract.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/emit-command/prisma-next.config.document-family.ts
  • test/integration/test/fixtures/cli/cli-integration-test-app/fixtures/verify-database/prisma-next.config.ts
  • packages/2-sql/2-authoring/contract-ts/src/exports/config-types.ts
  • packages/1-framework/1-core/shared/config/biome.jsonc
  • tsconfig.base.json
  • packages/1-framework/1-core/migration/control-plane/README.md
  • packages/1-framework/2-authoring/psl-parser/test/parser.test.ts
  • test/integration/test/fixtures/cli/cli-e2e-test-app/fixtures/db-verify/prisma-next.config.no-verify.ts
  • packages/1-framework/1-core/shared/config/vitest.config.ts

Keep migration target capability checks type-safe in the shared scaffold and update the db-update scenario fixture to use extensionPacks so contract emit succeeds under the new config surface.
wmadden added 2 commits March 3, 2026 17:59
Prevent fixture-only files from being typechecked as part of the shared config package by excluding test fixtures in tsconfig.
Strengthen the lease cleanup regression by asserting direct-client connect is retried on each failed acquireConnection call.
@wmadden
wmadden merged commit ae09270 into main Mar 3, 2026
11 checks passed
@wmadden
wmadden deleted the tml-2018-optional-split-up-1-coremigration branch March 3, 2026 17:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants