Skip to content

TML-2760: default un-namespaced Postgres models to the public namespace#662

Merged
wmadden merged 13 commits into
mainfrom
tml-public-by-default
Jun 1, 2026
Merged

TML-2760: default un-namespaced Postgres models to the public namespace#662
wmadden merged 13 commits into
mainfrom
tml-public-by-default

Conversation

@wmadden-electric
Copy link
Copy Markdown
Contributor

@wmadden-electric wmadden-electric commented Jun 1, 2026

Linked issue

Refs TML-2760. Unblocks TML-2605 (runtime-qualification). Backfills the upgrade entry that TML-2751 (domain-plane, merged in #653) shipped without. Follow-up TML-2764 hardens the coverage gate that let that miss through.

At a glance

An un-namespaced Postgres model used to fall through to the __unbound__ sentinel. It now resolves to a real public namespace, end-to-end — domain plane, storage plane, and the storage kind:

   "roots": {
-    "user": { "model": "User", "namespace": "__unbound__" }
+    "user": { "model": "User", "namespace": "public" }
   },
   "domain": {
     "namespaces": {
-      "__unbound__": { "models": { "User": { … } } }
+      "public":      { "models": { "User": { … } } }
   "storage": {
     "namespaces": {
-      "__unbound__": { "id": "__unbound__", "kind": "postgres-unbound-schema", … }
+      "public":      { "id": "public",      "kind": "postgres-schema",         … }

__unbound__ doesn't disappear — it's now reachable only through an explicit namespace unbound { … } PSL block. SQLite and Mongo are untouched; they keep __unbound__ as their default.

Decision

This slice makes public a real Postgres namespace at authoring/DDL time, so the next slice can render honest "public"."user" qualification instead of a faked string prefix. It carries five pieces:

  1. Interpreter + TS-builder default flip. Un-namespaced Postgres models resolve to public (was: undefined__unbound__). The PSL interpreter and the TS contract builder move in lockstep — a parity test pins that they agree.
  2. __unbound__ becomes an explicit opt-in. Only namespace unbound { … } lands a Postgres model in __unbound__. No diagnostic on the opt-in — the block is self-documenting (per the explicit-opt-in-over-diagnostics rule).
  3. Delete the two hardcoded 'public' DDL fakes. With public a real namespace id, the planner's defaultSchema: 'public' and PostgresUnboundSchema.ddlSchemaName projection are removed; the schema name now derives from the namespace.
  4. Relax the SqlStorage __unbound__ brand (discovered mid-slice). The SqlStorage type required __unbound__ as a mandatory namespace key — a stale assertion that made a public-only contract fail Contract<SqlStorage> and broke the postgis demo typecheck. The brand is relaxed to optional; it was never runtime-load-bearing (all production reads already use ?./??).
  5. Upgrade entries, both clusters, both transitions. The 0.11-to-0.12 entries for public-by-default and the domain-plane reshape that #653 shipped without one.

How it fits together

  1. Flip the interpreter (contract-psl/src/interpreter.ts): resolveNamespaceIdForSqlTarget returns public for the un-namespaced Postgres case; the explicit unbound branch is unchanged.
  2. Match the TS builder (contract-ts/src/build-contract.ts): a DefaultStorageNamespaceId<Definition> helper makes the inferred return type use public for Postgres and __unbound__ elsewhere, so type-level and runtime shapes agree and the parity test stays green.
  3. Remove the DDL fakes (postgres/src/core/postgres-schema.ts, …/migrations/planner.ts, …/runner.ts): effective schema is derived from contract.storage.namespaces rather than a hardcoded string.
  4. Relax the brand (sql/1-core/contract/src/ir/sql-storage.ts): drop the & { readonly __unbound__: SqlNamespace } intersection; sql-orm-client table lookups switch from indexing namespaces['__unbound__'] to scanning all namespaces.
  5. Regenerate fixtures + baselines: ~53 Postgres contract fixtures, the telemetry-backend app contracts, and the pgvector/postgis/paradedb install migration baselines (their storageHash/head-ref shifted with the namespace key).
  6. Author the upgrade entries in both skill clusters.

Reviewer notes

  • The brand relaxation (Add PGVector extension #4) was not in the original three-dispatch plan. It surfaced when the public-only contract failed to typecheck against Contract<SqlStorage>. I investigated whether the required __unbound__ key was load-bearing: it was a stale type assertion from TML-2727, not a runtime invariant (every production read path already uses optional access). Relaxing it here was the minimal unblock; the query-builder's own __unbound__ dependency (UnboundTables<C>) is deliberately left to TML-2605. The sql-orm-client "scan all namespaces" change is the same story — a regression introduced by the default flip, fixed in place.
  • Two of the four upgrade entries (the domain-plane backfill) were authored without re-execution. That transition already shipped on main (TML-2751: wire symmetric domain plane (domain.namespaces) #653), so its substrate diff vs origin/main is empty; the entries were authored from the TML-2751: wire symmetric domain plane (domain.namespaces) #653 diff per the skill's skipped-publishes guidance. The two public-by-default entries were validated by execution (re-emit on prisma-next-demo, baseline regen on the three extensions).
  • check:upgrade-coverage only asserts the transition directory exists, not that this PR has a matching entry. That gap is exactly how TML-2751: wire symmetric domain plane (domain.namespaces) #653 shipped undocumented. I corrected the record-upgrade-instructions skill body to flag the limit for reviewers and filed TML-2764 to harden the gate.
  • Largest diff is fixture regen (~130 files, mechanical). Spot-check one hand-written test change instead: side-by-side-contracts.test.ts and contract-builder.test.ts pin the new default.

Verification

Run on the final HEAD:

  • pnpm typecheck — green (incl. the previously-broken postgis demo)
  • pnpm fixtures:check — green (0 Postgres default models left under __unbound__)
  • pnpm testtarget-postgres (297), sql-orm-client (505, 3 skip), contract package type tests green
  • pnpm lint:deps — clean
  • pnpm check:upgrade-coverage — green

Follow-ups

  • TML-2605 — runtime SQL query qualification ("public"."user" on the query path) and eliminating the transitional projection helpers. This slice deliberately stops at authoring/DDL.
  • TML-2764 — make the coverage gate check per-PR entry correspondence, not just directory existence.

Alternatives considered

  • Keep __unbound__ as the default and project to public at query time. Rejected: it keeps the faked-prefix smell alive and pushes the honesty problem into the runtime layer. Making public real at the source is the root fix.
  • Warn/error when a Postgres model lands in __unbound__ via namespace unbound {}. Rejected per the explicit-opt-in-over-diagnostics rule — the block already encodes the intent at the call site; a diagnostic on a deliberate path is noise.
  • Defer the brand relaxation to TML-2605. Rejected: the public-only contract can't typecheck without it now, so the postgis demo would stay red for the duration. Relaxing the (non-load-bearing) brand here is the minimal coherent unblock.

Skill update

0.11-to-0.12 upgrade entries authored in both skills/upgrade/prisma-next-upgrade/ (user) and skills/extension-author/prisma-next-extension-upgrade/ (extension-author), with colocated re-emit/regen/codemod scripts. record-upgrade-instructions skill body corrected to document the coverage-gate limitation.

Checklist

  • All commits are signed off (git commit -s) per the DCO.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated.
  • The PR title is in TML-NNNN: <sentence-case title> form.
  • The Skill update section above is filled in.

Summary by CodeRabbit

  • Chores

    • Default Postgres namespace for unscoped models is now public; contracts regenerated and storage hashes updated across the repo.
    • Namespace resolution now scans/qualifies available namespaces rather than relying on an unbound sentinel.
  • New Features

    • Added utilities to discover and re-emit contract artifacts for the new public-default layout.
    • Extension contracts refreshed with updated Postgres capability metadata.
  • Tests

    • Tests and fixtures updated to assert namespace-scoped (public) contract outputs.
  • Documentation

    • Migration and upgrade instructions added for the public-default contract format.

@wmadden-electric wmadden-electric requested a review from a team as a code owner June 1, 2026 08:17
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Switches Postgres default namespace from the prior unbound sentinel to public across IR/types, authoring, Postgres targets (planner/runner/schema), ORM client resolution, regenerated contract artifacts and migrations, plus tests, docs, and migration utilities.

Changes

Postgres public namespace default and contract regeneration

Layer / File(s) Summary
Repository-wide public namespace flip
packages/..., examples/..., apps/..., test/..., skills/...
All contract JSON/.d.ts artifacts, SQL authoring/interpreter/builders, IR types, Postgres planner/runner, ORM client table/column resolution, tests, and upgrade/re-emit scripts were updated to materialise Postgres models under the public namespace instead of the __unbound__ sentinel; many storageHash/migration hash literals were regenerated accordingly.
  • Sequence Diagram(s): (omitted — change is repository-wide and represented in hidden artifact)

Estimated code review effort:
🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs:

  • prisma/prisma-next#630: Related work on removing unbound namespace construction shims and tightening storage namespace requirements.
  • prisma/prisma-next#368: Example changes to emitted contracts and tests expecting storage.namespaces.public.
  • prisma/prisma-next#600: Overlapping contract-typing/namespace-wiring changes for TelemetryEvent and other root models.

Suggested reviewers:

  • wmadden
  • aqrln

"A rabbit hops with a patch in paw,
I nudge contracts from old to new,
I bind the Postgres roots to 'public' law,
Regenerate hashes, tests align true.
Hooray — small hops, big change, woo-hoo! 🐇"

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-public-by-default

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 1, 2026

Open in StackBlitz

@prisma-next/extension-author-tools

npm i https://pkg.pr.new/@prisma-next/extension-author-tools@662

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/@prisma-next/mongo-runtime@662

@prisma-next/family-mongo

npm i https://pkg.pr.new/@prisma-next/family-mongo@662

@prisma-next/sql-runtime

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

@prisma-next/family-sql

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

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/@prisma-next/extension-arktype-json@662

@prisma-next/middleware-cache

npm i https://pkg.pr.new/@prisma-next/middleware-cache@662

@prisma-next/mongo

npm i https://pkg.pr.new/@prisma-next/mongo@662

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/@prisma-next/extension-paradedb@662

@prisma-next/extension-pgvector

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

@prisma-next/extension-postgis

npm i https://pkg.pr.new/@prisma-next/extension-postgis@662

@prisma-next/postgres

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

@prisma-next/sql-orm-client

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

@prisma-next/sqlite

npm i https://pkg.pr.new/@prisma-next/sqlite@662

@prisma-next/target-mongo

npm i https://pkg.pr.new/@prisma-next/target-mongo@662

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/@prisma-next/adapter-mongo@662

@prisma-next/driver-mongo

npm i https://pkg.pr.new/@prisma-next/driver-mongo@662

@prisma-next/contract

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

@prisma-next/utils

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

@prisma-next/config

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

@prisma-next/errors

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

@prisma-next/framework-components

npm i https://pkg.pr.new/@prisma-next/framework-components@662

@prisma-next/operations

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

@prisma-next/ts-render

npm i https://pkg.pr.new/@prisma-next/ts-render@662

@prisma-next/contract-authoring

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

@prisma-next/ids

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

@prisma-next/psl-parser

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

@prisma-next/psl-printer

npm i https://pkg.pr.new/@prisma-next/psl-printer@662

@prisma-next/cli

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

@prisma-next/cli-telemetry

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

@prisma-next/emitter

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

@prisma-next/migration-tools

npm i https://pkg.pr.new/@prisma-next/migration-tools@662

prisma-next

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

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

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

@prisma-next/mongo-codec

npm i https://pkg.pr.new/@prisma-next/mongo-codec@662

@prisma-next/mongo-contract

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

@prisma-next/mongo-value

npm i https://pkg.pr.new/@prisma-next/mongo-value@662

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/@prisma-next/mongo-contract-psl@662

@prisma-next/mongo-contract-ts

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

@prisma-next/mongo-emitter

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

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/@prisma-next/mongo-schema-ir@662

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/@prisma-next/mongo-query-ast@662

@prisma-next/mongo-orm

npm i https://pkg.pr.new/@prisma-next/mongo-orm@662

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/@prisma-next/mongo-query-builder@662

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/@prisma-next/mongo-lowering@662

@prisma-next/mongo-wire

npm i https://pkg.pr.new/@prisma-next/mongo-wire@662

@prisma-next/sql-contract

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

@prisma-next/sql-errors

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

@prisma-next/sql-operations

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

@prisma-next/sql-schema-ir

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

@prisma-next/sql-contract-psl

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

@prisma-next/sql-contract-ts

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

@prisma-next/sql-contract-emitter

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

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

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

@prisma-next/sql-relational-core

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

@prisma-next/sql-builder

npm i https://pkg.pr.new/@prisma-next/sql-builder@662

@prisma-next/target-postgres

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

@prisma-next/target-sqlite

npm i https://pkg.pr.new/@prisma-next/target-sqlite@662

@prisma-next/adapter-postgres

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

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/@prisma-next/adapter-sqlite@662

@prisma-next/driver-postgres

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

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/@prisma-next/driver-sqlite@662

commit: eccbbc0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

size-limit report 📦

Path Size
postgres / no-emit 135.93 KB (+0.05% 🔺)
postgres / emit 125.59 KB (+0.01% 🔺)
mongo / no-emit 75.69 KB (0%)
mongo / emit 70.68 KB (0%)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
packages/2-sql/2-authoring/contract-psl/src/interpreter.ts (1)

232-245: 🛠️ Refactor suggestion | 🟠 Major | 🏗️ Heavy lift

Move the default-namespace switch behind a target adapter.

This adds another targetId === 'postgres' branch in the shared interpreter, so Postgres namespace policy is now encoded here instead of coming from a target-specific adapter/contribution. That keeps target behavior scattered across authoring code and makes future namespace changes easier to drift.

As per coding guidelines, "Don't branch on target; use adapters per .agents/rules/no-target-branches.mdc."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/2-sql/2-authoring/contract-psl/src/interpreter.ts` around lines 232
- 245, The shared interpreter currently branches on targetId (checks for
targetId === 'postgres') inside defaultSqlNamespaceIdForTarget and
resolveNamespaceIdForSqlTarget which embeds Postgres-specific namespace policy;
remove those target-specific branches and instead delegate namespace resolution
to the target adapter API (i.e., call into the per-target adapter to obtain the
default/unspecified namespace). Specifically, eliminate the 'postgres' checks
from defaultSqlNamespaceIdForTarget and resolveNamespaceIdForSqlTarget and
replace them with adapter calls so the adapter (not these functions) returns
UNBOUND_NAMESPACE_ID, 'public', or undefined as appropriate; continue to use
UNSPECIFIED_PSL_NAMESPACE_NAME and UNBOUND_NAMESPACE_ID as inputs but move the
logic into the Postgres adapter implementation.
🧹 Nitpick comments (7)
packages/3-extensions/sql-orm-client/test/helpers.ts (2)

62-63: 💤 Low value

Verify non-null assertion safety.

The non-null assertion Object.entries(contract.domain.namespaces)[0]! will throw at runtime if the contract has no namespaces. While test fixtures should always include at least one namespace, consider adding a defensive guard or comment explaining this assumption.

🛡️ Optional: Add defensive guard
  const [namespaceId, namespace] = Object.entries(contract.domain.namespaces)[0]!;
+  if (!namespaceId) throw new Error('contract must have at least one namespace');
  const models = contractModels(contract);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/3-extensions/sql-orm-client/test/helpers.ts` around lines 62 - 63,
The non-null assertion on Object.entries(contract.domain.namespaces)[0]! can
throw if namespaces is empty; replace it with a safe check or explicit
assertion: retrieve entries via Object.entries(contract.domain.namespaces),
verify entries.length > 0 (or throw a clear error mentioning contract id), then
destructure into namespaceId and namespace; alternatively add a comment
asserting the test fixture guarantee. Update the usage sites (the const
[namespaceId, namespace] assignment in helpers.ts and any logic depending on
namespace) to rely on the validated entries before calling
contractModels(contract).

265-271: 💤 Low value

Consider adding early-exit comment for buildStiPolyContract.

The search across all namespaces with Object.values(...).find(...) followed by a throw is good defensive programming. However, the variable name usersStorageTable is assigned after the find, making the null-check slightly awkward. Consider extracting the search logic or adding a comment explaining why we search all namespaces.

♻️ Optional: Simplify with early throw
  const usersStorageTable = Object.values(
    raw.storage.namespaces as Record<
      string,
      { tables: Record<string, { columns: Record<string, unknown> }> }
    >,
  ).find((ns) => ns.tables['users'])?.tables['users'];
  if (!usersStorageTable) throw new Error('users table not found in any storage namespace');

Could be:

+ // Search all namespaces for the users table (namespace-agnostic test setup)
+ const namespaceWithUsers = Object.values(
+   raw.storage.namespaces as Record<string, { tables: Record<string, { columns: Record<string, unknown> }> }>
+ ).find((ns) => ns.tables['users']);
+ if (!namespaceWithUsers) throw new Error('users table not found in any storage namespace');
+ const usersStorageTable = namespaceWithUsers.tables['users']!;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/3-extensions/sql-orm-client/test/helpers.ts` around lines 265 - 271,
The lookup for the users table across all namespaces (using
Object.values(raw.storage.namespaces).find(...)) should be made clearer for
future readers of buildStiPolyContract: either extract the search into a small
helper (e.g., findUsersStorageTable(namespaces)) and assign its result to
usersStorageTable, or add an inline comment above the current code explaining
why we must search every namespace; if the helper returns undefined, immediately
throw an Error('users table not found in any storage namespace') to keep the
null-check simple and obvious.
packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts (1)

13-17: 💤 Low value

Consider defensive handling if public namespace doesn't exist.

The fallback to storage.namespaces['public']?.tables ?? {} assumes the public namespace exists. While this is safe for Postgres (which defaults to public), the function signature accepts StorageLike | SqlStorage, which could include non-Postgres contracts. If this helper is Postgres-specific, consider adding a JSDoc comment clarifying this constraint.

📝 Optional: Add JSDoc clarifying Postgres-specific usage
+/**
+ * Extract tables from the unbound namespace, falling back to the public
+ * namespace. Intended for Postgres contracts where public is the default.
+ */
 export function unboundTables(
   storage: StorageLike | SqlStorage,
 ): Readonly<Record<string, StorageTable>> {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts` around lines
13 - 17, The helper currently assumes a 'public' namespace when falling back
from UNBOUND_NAMESPACE_ID; update the logic around storage.namespaces and the
fallback (the block using unbound,
storage.namespaces[UNBOUND_NAMESPACE_ID]?.tables and
storage.namespaces['public']?.tables ?? {}) to defensively handle a missing
'public' namespace (e.g., explicitly check storage.namespaces &&
storage.namespaces['public'] and return an empty object or throw a clear error),
and add a brief JSDoc to the function explaining whether the helper is
Postgres-specific (or that it will return an empty record when no public
namespace exists) so callers understand the contract.
skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts (1)

22-24: ⚡ Quick win

Prefer pathe over node:path for cross-platform path operations.

Based on learnings, this repository prefers pathe over Node's built-in node:path module for all TypeScript files, including tooling and scripts.

📦 Proposed import change
 import { execFile } from 'node:child_process';
 import { access, copyFile, readdir, readFile, writeFile } from 'node:fs/promises';
-import { join } from 'node:path';
+import { join } from 'pathe';
 import { promisify } from 'node:util';

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts`
around lines 22 - 24, Replace the Node built-in path import with pathe: change
the import statement that currently reads "import { join } from 'node:path';" to
import join (and any other path utilities you need) from 'pathe' and update any
uses of join in regenerate-extension-public-baseline.ts accordingly so all path
operations use pathe for cross-platform consistency; ensure there are no
remaining references to 'node:path' in this file.
skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts (1)

22-23: ⚡ Quick win

Prefer pathe over node:path for cross-platform path operations.

Based on learnings, this repository prefers pathe over Node's built-in node:path module for all TypeScript files, including tooling and scripts.

📦 Proposed import change
 import { readdir, readFile, writeFile } from 'node:fs/promises';
-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 (including CLI commands and tooling files).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts`
around lines 22 - 23, Replace the Node built-in path import with pathe: update
the import that currently pulls join from 'node:path' to import join from
'pathe' (keeping readdir, readFile, writeFile from 'node:fs/promises' unchanged)
so all path operations in migrate-contract-testing-imports.ts use pathe for
cross-platform behavior; ensure any uses of join remain valid with the new
import.
skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts (1)

22-25: ⚡ Quick win

Prefer pathe over node:path for cross-platform path operations.

Based on learnings, this repository prefers pathe over Node's built-in node:path module for all TypeScript files, including tooling and scripts.

📦 Proposed import change
 import { execFile } from 'node:child_process';
 import { access, readdir, readFile } from 'node:fs/promises';
-import { dirname, join } from 'node:path';
+import { dirname, join } from 'pathe';
 import { promisify } from 'node:util';

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts`
around lines 22 - 25, The file currently imports dirname and join from
'node:path'; replace those imports to use 'pathe' instead (import { dirname,
join } from 'pathe') so path operations are cross-platform consistent with repo
conventions; update any references to dirname and join in this file (and ensure
no other node:path imports remain) and keep existing uses in functions like
re-emit-postgres-public-default unchanged.
skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts (1)

21-24: ⚡ Quick win

Prefer pathe over node:path for cross-platform path operations.

Based on learnings, this repository prefers pathe over Node's built-in node:path module for all TypeScript files, including tooling and scripts.

📦 Proposed import change
 import { execFile } from 'node:child_process';
 import { access, readdir, readFile } from 'node:fs/promises';
-import { dirname, join } from 'node:path';
+import { dirname, join } from 'pathe';
 import { promisify } from 'node:util';

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts`
around lines 21 - 24, Replace imports of dirname and join from 'node:path' with
the equivalent imports from 'pathe' (update the import statement that currently
pulls dirname and join from 'node:path'); then update any usage sites in this
file (functions or expressions referencing dirname and join) to use the
pathe-provided functions (no API changes required). Also ensure the file's other
imports (execFile, access, readdir, readFile, promisify) remain unchanged and
that TypeScript types still resolve after swapping the path module to 'pathe'.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/2-sql/2-authoring/contract-psl/src/interpreter.ts`:
- Around line 232-245: The shared interpreter currently branches on targetId
(checks for targetId === 'postgres') inside defaultSqlNamespaceIdForTarget and
resolveNamespaceIdForSqlTarget which embeds Postgres-specific namespace policy;
remove those target-specific branches and instead delegate namespace resolution
to the target adapter API (i.e., call into the per-target adapter to obtain the
default/unspecified namespace). Specifically, eliminate the 'postgres' checks
from defaultSqlNamespaceIdForTarget and resolveNamespaceIdForSqlTarget and
replace them with adapter calls so the adapter (not these functions) returns
UNBOUND_NAMESPACE_ID, 'public', or undefined as appropriate; continue to use
UNSPECIFIED_PSL_NAMESPACE_NAME and UNBOUND_NAMESPACE_ID as inputs but move the
logic into the Postgres adapter implementation.

---

Nitpick comments:
In `@packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts`:
- Around line 13-17: The helper currently assumes a 'public' namespace when
falling back from UNBOUND_NAMESPACE_ID; update the logic around
storage.namespaces and the fallback (the block using unbound,
storage.namespaces[UNBOUND_NAMESPACE_ID]?.tables and
storage.namespaces['public']?.tables ?? {}) to defensively handle a missing
'public' namespace (e.g., explicitly check storage.namespaces &&
storage.namespaces['public'] and return an empty object or throw a clear error),
and add a brief JSDoc to the function explaining whether the helper is
Postgres-specific (or that it will return an empty record when no public
namespace exists) so callers understand the contract.

In `@packages/3-extensions/sql-orm-client/test/helpers.ts`:
- Around line 62-63: The non-null assertion on
Object.entries(contract.domain.namespaces)[0]! can throw if namespaces is empty;
replace it with a safe check or explicit assertion: retrieve entries via
Object.entries(contract.domain.namespaces), verify entries.length > 0 (or throw
a clear error mentioning contract id), then destructure into namespaceId and
namespace; alternatively add a comment asserting the test fixture guarantee.
Update the usage sites (the const [namespaceId, namespace] assignment in
helpers.ts and any logic depending on namespace) to rely on the validated
entries before calling contractModels(contract).
- Around line 265-271: The lookup for the users table across all namespaces
(using Object.values(raw.storage.namespaces).find(...)) should be made clearer
for future readers of buildStiPolyContract: either extract the search into a
small helper (e.g., findUsersStorageTable(namespaces)) and assign its result to
usersStorageTable, or add an inline comment above the current code explaining
why we must search every namespace; if the helper returns undefined, immediately
throw an Error('users table not found in any storage namespace') to keep the
null-check simple and obvious.

In
`@skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts`:
- Around line 22-23: Replace the Node built-in path import with pathe: update
the import that currently pulls join from 'node:path' to import join from
'pathe' (keeping readdir, readFile, writeFile from 'node:fs/promises' unchanged)
so all path operations in migrate-contract-testing-imports.ts use pathe for
cross-platform behavior; ensure any uses of join remain valid with the new
import.

In
`@skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts`:
- Around line 22-24: Replace the Node built-in path import with pathe: change
the import statement that currently reads "import { join } from 'node:path';" to
import join (and any other path utilities you need) from 'pathe' and update any
uses of join in regenerate-extension-public-baseline.ts accordingly so all path
operations use pathe for cross-platform consistency; ensure there are no
remaining references to 'node:path' in this file.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts`:
- Around line 21-24: Replace imports of dirname and join from 'node:path' with
the equivalent imports from 'pathe' (update the import statement that currently
pulls dirname and join from 'node:path'); then update any usage sites in this
file (functions or expressions referencing dirname and join) to use the
pathe-provided functions (no API changes required). Also ensure the file's other
imports (execFile, access, readdir, readFile, promisify) remain unchanged and
that TypeScript types still resolve after swapping the path module to 'pathe'.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts`:
- Around line 22-25: The file currently imports dirname and join from
'node:path'; replace those imports to use 'pathe' instead (import { dirname,
join } from 'pathe') so path operations are cross-platform consistent with repo
conventions; update any references to dirname and join in this file (and ensure
no other node:path imports remain) and keep existing uses in functions like
re-emit-postgres-public-default unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 14631e37-d3d3-4d89-a182-36b2d7d11fb0

📥 Commits

Reviewing files that changed from the base of the PR and between 7ac37dd and 06fbd7f.

⛔ Files ignored due to path filters (14)
  • examples/bundle-size/src/postgres/generated/contract.d.ts is excluded by !**/generated/**
  • examples/bundle-size/src/postgres/generated/contract.json is excluded by !**/generated/**
  • packages/2-sql/4-lanes/sql-builder/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • packages/2-sql/4-lanes/sql-builder/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • projects/target-extensible-ir-namespaces/slices/public-by-default/plan.md is excluded by !projects/**
  • projects/target-extensible-ir-namespaces/slices/public-by-default/spec.md is excluded by !projects/**
  • test/e2e/framework/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/e2e/framework/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/sql-builder/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-builder/fixtures/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/sql-orm-client/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-orm-client/fixtures/generated/contract.json is excluded by !**/generated/**
📒 Files selected for processing (125)
  • apps/telemetry-backend/src/prisma/contract.d.ts
  • apps/telemetry-backend/src/prisma/contract.json
  • examples/multi-extension-monorepo/app/src/contract.d.ts
  • examples/multi-extension-monorepo/app/src/contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/audit/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/src/contract.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/end-contract.d.ts
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/end-contract.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.ts
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.json
  • examples/paradedb-demo/src/prisma/contract.d.ts
  • examples/paradedb-demo/src/prisma/contract.json
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.d.ts
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.json
  • examples/prisma-next-demo/src/prisma/contract.d.ts
  • examples/prisma-next-demo/src/prisma/contract.json
  • examples/prisma-next-demo/test/contract-authoring.test.ts
  • examples/prisma-next-demo/test/demo-dx.types.test.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.d.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.json
  • examples/react-router-demo/src/prisma/contract.d.ts
  • examples/react-router-demo/src/prisma/contract.json
  • packages/2-sql/1-core/contract/src/ir/sql-storage.ts
  • packages/2-sql/1-core/contract/src/validators.ts
  • packages/2-sql/1-core/contract/test/sql-storage.types.test-d.ts
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.defaults.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.extensions.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.polymorphism.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.relations.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.types.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.value-objects.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/ts-psl-parity.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts
  • packages/2-sql/2-authoring/contract-ts/src/build-contract.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-types.ts
  • packages/2-sql/2-authoring/contract-ts/test/config-types.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.constraints.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.contract-definition.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.portability.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.namespaces.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.per-model-namespace.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/unbound-tables.ts
  • packages/2-sql/9-family/src/core/ir/sql-contract-serializer-base.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.d.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.json
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.json
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.ts
  • packages/3-extensions/paradedb/migrations/refs/head.json
  • packages/3-extensions/paradedb/src/contract.d.ts
  • packages/3-extensions/paradedb/src/contract.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/end-contract.d.ts
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/end-contract.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.ts
  • packages/3-extensions/pgvector/migrations/refs/head.json
  • packages/3-extensions/pgvector/src/contract.d.ts
  • packages/3-extensions/pgvector/src/contract.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.d.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.ts
  • packages/3-extensions/postgis/migrations/refs/head.json
  • packages/3-extensions/postgis/src/contract.d.ts
  • packages/3-extensions/postgis/src/contract.json
  • packages/3-extensions/sql-orm-client/src/collection-contract.ts
  • packages/3-extensions/sql-orm-client/src/model-accessor.ts
  • packages/3-extensions/sql-orm-client/src/query-plan-meta.ts
  • packages/3-extensions/sql-orm-client/src/query-plan-mutations.ts
  • packages/3-extensions/sql-orm-client/src/where-binding.ts
  • packages/3-extensions/sql-orm-client/test/helpers.ts
  • packages/3-extensions/sql-orm-client/test/mutation-executor.test.ts
  • packages/3-extensions/sql-orm-client/test/unbound-tables.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner-strategies.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/runner.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/verify-postgres-namespaces.ts
  • packages/3-targets/3-targets/postgres/src/core/postgres-schema.ts
  • packages/3-targets/3-targets/postgres/test/migrations/enum-collision.test.ts
  • packages/3-targets/3-targets/postgres/test/postgres-schema.test.ts
  • skills-contrib/record-upgrade-instructions/SKILL.md
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/instructions.md
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/instructions.md
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts
  • test/integration/test/authoring/paradedb-bm25-narrowing.test.ts
  • test/integration/test/authoring/parity/callback-mode-scalars/expected.contract.json
  • test/integration/test/authoring/parity/core-surface/expected.contract.json
  • test/integration/test/authoring/parity/default-cuid-2/expected.contract.json
  • test/integration/test/authoring/parity/default-dbgenerated/expected.contract.json
  • test/integration/test/authoring/parity/default-nanoid-16/expected.contract.json
  • test/integration/test/authoring/parity/default-nanoid/expected.contract.json
  • test/integration/test/authoring/parity/default-pack-slugid/expected.contract.json
  • test/integration/test/authoring/parity/default-ulid/expected.contract.json
  • test/integration/test/authoring/parity/default-uuid-v4/expected.contract.json
  • test/integration/test/authoring/parity/default-uuid-v7/expected.contract.json
  • test/integration/test/authoring/parity/map-attributes/expected.contract.json
  • test/integration/test/authoring/parity/pgvector-named-type/expected.contract.json
  • test/integration/test/authoring/parity/relation-backrelation-list/expected.contract.json
  • test/integration/test/authoring/side-by-side-contracts.test.ts
  • test/integration/test/authoring/side-by-side/postgres/contract.json
  • test/integration/test/cli.emit-cli-process.e2e.test.ts
  • test/integration/test/contract-builder.test.ts
  • test/integration/test/contract-builder.types.test-d.ts
  • test/integration/test/dsl-type-inference.test-d.ts
  • test/integration/test/family.schema-verify.dependencies.integration.test.ts
  • test/integration/test/family.schema-verify.types.test.ts
  • test/integration/test/fixtures/contract.d.ts
  • test/integration/test/fixtures/contract.json
  • test/integration/test/sql-orm-client/collection-mutation-defaults.test.ts
  • test/integration/test/sql-orm-client/fixtures/contract.ts
  • test/integration/test/sql-orm-client/upsert.test.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
test/integration/test/vite-plugin.hmr.e2e.test.ts (1)

19-23: ⚡ Quick win

Rename unboundUserColumns to match current namespace semantics.

Line 19 still encodes the old __unbound__ concept, but the helper now reads from POSTGRES_DEFAULT_NAMESPACE (public). Renaming will reduce future confusion in HMR assertions.

♻️ Suggested rename
-function unboundUserColumns(storage: {
+function defaultNamespaceUserColumns(storage: {
   namespaces: Record<string, { tables: { user: { columns: Record<string, unknown> } } }>;
 }) {
   return storage.namespaces[POSTGRES_DEFAULT_NAMESPACE]!.tables.user.columns;
 }
-expect(unboundUserColumns(initialContract.storage)).not.toHaveProperty('name');
+expect(defaultNamespaceUserColumns(initialContract.storage)).not.toHaveProperty('name');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/integration/test/vite-plugin.hmr.e2e.test.ts` around lines 19 - 23,
Rename the helper function unboundUserColumns to a name that reflects it reads
from the default namespace (e.g., defaultNamespaceUserColumns or
userColumnsInDefaultNamespace), update the function identifier and all call
sites in the test to the new name, and keep the implementation using
POSTGRES_DEFAULT_NAMESPACE as-is (the symbol POSTGRES_DEFAULT_NAMESPACE and the
function unboundUserColumns should be replaced consistently to avoid confusion
in HMR assertions).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@test/integration/test/vite-plugin.hmr.e2e.test.ts`:
- Around line 19-23: Rename the helper function unboundUserColumns to a name
that reflects it reads from the default namespace (e.g.,
defaultNamespaceUserColumns or userColumnsInDefaultNamespace), update the
function identifier and all call sites in the test to the new name, and keep the
implementation using POSTGRES_DEFAULT_NAMESPACE as-is (the symbol
POSTGRES_DEFAULT_NAMESPACE and the function unboundUserColumns should be
replaced consistently to avoid confusion in HMR assertions).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 416bbb03-d279-4bca-a0a2-66474e04ba7b

📥 Commits

Reviewing files that changed from the base of the PR and between 06fbd7f and 908360f.

📒 Files selected for processing (11)
  • packages/1-framework/3-tooling/cli-telemetry/test/integration.test.ts
  • packages/1-framework/3-tooling/cli/test/load-ts-contract.test.ts
  • packages/3-extensions/postgres/test/psl-namespace-qualifier-routing.test.ts
  • test/e2e/framework/test/ddl.test.ts
  • test/integration/test/authoring/psl-index-type-options.integration.test.ts
  • test/integration/test/cli.db-sign.e2e.test.ts
  • test/integration/test/cli.emit.test.ts
  • test/integration/test/sql-orm-client/helpers.ts
  • test/integration/test/sql-orm-client/unbound-tables.ts
  • test/integration/test/value-objects/value-objects.integration.test.ts
  • test/integration/test/vite-plugin.hmr.e2e.test.ts

@wmadden wmadden force-pushed the tml-public-by-default branch from 4510d61 to 9eb8d7d Compare June 1, 2026 09:57
@wmadden wmadden enabled auto-merge (rebase) June 1, 2026 10:02
wmadden added 13 commits June 1, 2026 14:15
Scope the public-by-default slice: un-namespaced Postgres models default
to the `public` namespace at the PSL interpreter; `__unbound__` stays an
explicit `namespace unbound {}` opt-in; the two hardcoded `'public'` DDL
fakes derive from the real namespace; ~53 Postgres fixtures regenerate.
Folds in the missing 0.11-to-0.12 upgrade entries for both this change
and the merged domain-plane (TML-2751) reshape, in both upgrade clusters.

Signed-off-by: Will Madden <madden@prisma.io>
PSL resolveNamespaceIdForSqlTarget and the TS build-contract path now
assign namespace id public for Postgres when no namespace block is
given; namespace unbound {} still maps to __unbound__. SQLite and Mongo
are unchanged.

Tests and the sql-orm-client integration fixture follow the new shape.

Signed-off-by: Will Madden <madden@prisma.io>
Re-emit committed contract.json and contract.d.ts artefacts after the
public-by-default namespace resolution change.

Signed-off-by: Will Madden <madden@prisma.io>
…ublic default

Re-emit committed contract.json and contract.d.ts artefacts for Postgres
apps and examples where un-namespaced models now resolve to the public
namespace.

Signed-off-by: Will Madden <madden@prisma.io>
…lt namespace

Update migration.ts, migration.json, end-contract.{json,d.ts}, and
refs/head.json for the three Postgres extension packs (pgvector, postgis,
paradedb) and the two multi-extension-monorepo example packages (audit,
feature-flags) after the public-by-default namespace resolution change.

Per the Path-B/A authoring loop (ADR 212):
- Updated describe().to in each migration.ts to the new storageHash
  produced by prisma-next contract emit.
- Re-ran node migration.ts to regenerate ops.json + migration.json with
  new to/migrationHash.
- Pinned refs/head.json.hash to match the new storageHash.
- Copied src/contract.{json,d.ts} to end-contract.{json,d.ts} (baseline
  migration ends at the current contract state).

ops.json unchanged for all three standalone extension packs.

Signed-off-by: Will Madden <madden@prisma.io>
Fake 1 — `PostgresUnboundSchema.ddlSchemaName` sibling-public projection
  The override that returned `'public'` when a sibling public namespace
  existed was the bridge for the old world where un-namespaced models
  lived in `__unbound__`.  Un-namespaced models now resolve to `public`
  directly; `__unbound__` is only reachable via an explicit
  `namespace unbound {}` opt-in.  Deleting the override restores the
  base-class behaviour (`this.id` = `UNBOUND_NAMESPACE_ID`), so that
  `qualifyTableName` produces correctly *unqualified* DDL for explicit-
  unbound tables (search_path resolves the schema at runtime).

Fake 2 — `defaultSchema: 'public'` planner/runner config default
  `PlannerConfig`/`RunnerConfig` and their `DEFAULT_*` constants are
  removed entirely.  `createPostgresMigrationPlanner` and
  `createPostgresMigrationRunner` are never called with a config object.
  Both `planSql` and `executeOnConnection` now derive the effective schema
  name from the contract's storage namespaces (first non-UNBOUND_NAMESPACE_ID
  entry, falling back to UNBOUND_NAMESPACE_ID for explicit-unbound-only
  contracts).

Updated tests:
  - postgres-schema.test.ts: unbound singleton returns UNBOUND_NAMESPACE_ID
    regardless of sibling namespaces.
  - enum-collision.test.ts: AlterColumnTypeCall for an unbound-namespace table
    now carries UNBOUND_NAMESPACE_ID as schemaName (→ unqualified DDL).

Gates: 297/297 unit tests, typecheck clean, fixtures:check exit 0, lint:deps clean.
Signed-off-by: Will Madden <madden@prisma.io>
The public-by-default slice moves un-namespaced Postgres tables into the
'public' namespace, so a public-only contract has no '__unbound__' slot.
The brand added in TML-2727 required '__unbound__' on every SqlStorage,
causing 'Contract<SqlStorage>' to reject valid public-only contracts.

Changes:
- Drop `& { readonly __unbound__: SqlNamespace }` from SqlStorageInput.namespaces
  and the SqlStorage class field; namespaces is now `Readonly<Record<string, SqlNamespace>>`.
- Add sql-storage.types.test-d.ts with positive assertions for both
  public-only and __unbound__-only contracts.
- Update the phantom-__unbound__ injection in SqlContractSerializerBase and
  validators.ts: keep the runtime shim but update comments and blindCast
  reasons to reflect it is a compatibility convenience, not a type guarantee.
- Update contract-types.ts: introduce DefaultStorageNamespaceId<Definition>
  so the builder's inferred return type uses 'public' for Postgres targets and
  '__unbound__' for others, aligning type-level and runtime shapes.
- Fix sql-orm-client source files (collection-contract, model-accessor,
  query-plan-meta, query-plan-mutations, where-binding): replace hardcoded
  namespaces[UNBOUND_NAMESPACE_ID] table lookups with scan-across-all-namespaces
  (same pattern as codecRefForStorageColumn), so table resolution works for
  both __unbound__ and public namespaces.
- Fix sql-orm-client test helpers (helpers.ts, unbound-tables.ts): update
  withPatchedDomainModels, unboundDomainModels, buildStiPolyContract, and
  unboundTables to use the actual namespace the contract carries rather than
  the hardcoded __unbound__ slot.
- Update numerous integration/demo test files: replace __unbound__ / UNBOUND_*
  namespace references with 'public' where the contract now uses 'public',
  and fix TS4111 dot-notation access to bracket notation.

Signed-off-by: Will Madden <madden@prisma.io>
…+ extension-baseline upgrade scope

Signed-off-by: Will Madden <madden@prisma.io>
…plane backfill.

Document the public default namespace flip and symmetric domain plane reshape
for both user and extension-author skill clusters, with colocated re-emit and
codemod scripts for the actionable migrations.

Signed-off-by: Will Madden <madden@prisma.io>
… existence, not per-PR entry

Signed-off-by: Will Madden <madden@prisma.io>
…mespace

Update Postgres test assertions and helpers to index the `public`
namespace instead of `__unbound__` for un-namespaced models, and refresh
the E2E DDL inline snapshot for schema-qualified CREATE TABLE output.
Also isolate Gemini CLI telemetry detection from host agent env markers.

Signed-off-by: Will Madden <madden@prisma.io>
…ult namespace

Signed-off-by: Will Madden <madden@prisma.io>
…oject scope

explicit-dsl (TML-2550) is required for the Supabase integration (colliding
auth.*/public.* names the default-namespace fallback cannot disambiguate) but
is purely additive on runtime-qualification. Decouple it: the project now
closes after runtime-qualification, and explicit-dsl is tracked standalone and
parallelizable rather than as a deferrable in-project unit.

Signed-off-by: Will Madden <madden@prisma.io>
@wmadden wmadden force-pushed the tml-public-by-default branch from 9eb8d7d to eccbbc0 Compare June 1, 2026 12:15
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
packages/3-extensions/sql-orm-client/src/query-plan-mutations.ts (1)

21-24: 💤 Low value

Consider removing unnecessary cast.

The as StorageTable | undefined cast on line 23 might be redundant—TypeScript should infer the correct type from the optional chaining and the find predicate. If the cast is required due to a type-narrowing limitation, consider adding a brief comment explaining why.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/3-extensions/sql-orm-client/src/query-plan-mutations.ts` around
lines 21 - 24, The function unboundTable contains an unnecessary type cast "as
StorageTable | undefined"; remove this cast and let TypeScript infer the return
type from the find + optional chaining (function: unboundTable, types:
Contract<SqlStorage>, StorageTable). If the cast was added because of a
TypeScript narrowing limitation, instead keep the cast but add a brief inline
comment explaining the narrowing issue and why the cast is required (e.g., TS
cannot infer through optional chaining), referencing unboundTable and the
storage.namespaces lookup.
skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts (1)

24-24: ⚡ Quick win

Prefer pathe over node:path for path operations.

This codebase prefers pathe for path operations in tooling and source files. Based on learnings, in the prisma/prisma-next repo, prefer using pathe over Node's built-in node:path for any TypeScript file (including tooling).

♻️ Proposed fix
-import { dirname, join } from 'node:path';
+import { dirname, join } from 'pathe';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts`
at line 24, Replace the Node built-in path import with pathe: change the import
of dirname and join from 'node:path' to import them from 'pathe' (update the
import statement that currently reads "import { dirname, join } from
'node:path';" to use 'pathe') so all path operations in
re-emit-postgres-public-default.ts use the project's preferred pathe utilities;
ensure any other references in the file still use the same symbol names
(dirname, join).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/3-extensions/sql-orm-client/src/query-plan-mutations.ts`:
- Around line 21-24: The function unboundTable contains an unnecessary type cast
"as StorageTable | undefined"; remove this cast and let TypeScript infer the
return type from the find + optional chaining (function: unboundTable, types:
Contract<SqlStorage>, StorageTable). If the cast was added because of a
TypeScript narrowing limitation, instead keep the cast but add a brief inline
comment explaining the narrowing issue and why the cast is required (e.g., TS
cannot infer through optional chaining), referencing unboundTable and the
storage.namespaces lookup.

In
`@skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts`:
- Line 24: Replace the Node built-in path import with pathe: change the import
of dirname and join from 'node:path' to import them from 'pathe' (update the
import statement that currently reads "import { dirname, join } from
'node:path';" to use 'pathe') so all path operations in
re-emit-postgres-public-default.ts use the project's preferred pathe utilities;
ensure any other references in the file still use the same symbol names
(dirname, join).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 51bdfeae-badd-4437-a7bb-65d62fe88d7a

📥 Commits

Reviewing files that changed from the base of the PR and between 9eb8d7d and eccbbc0.

⛔ Files ignored due to path filters (16)
  • examples/bundle-size/src/postgres/generated/contract.d.ts is excluded by !**/generated/**
  • examples/bundle-size/src/postgres/generated/contract.json is excluded by !**/generated/**
  • packages/2-sql/4-lanes/sql-builder/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • packages/2-sql/4-lanes/sql-builder/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • projects/target-extensible-ir-namespaces/plan.md is excluded by !projects/**
  • projects/target-extensible-ir-namespaces/slices/public-by-default/plan.md is excluded by !projects/**
  • projects/target-extensible-ir-namespaces/slices/public-by-default/spec.md is excluded by !projects/**
  • projects/target-extensible-ir-namespaces/spec.md is excluded by !projects/**
  • test/e2e/framework/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/e2e/framework/test/fixtures/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/sql-builder/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-builder/fixtures/generated/contract.json is excluded by !**/generated/**
  • test/integration/test/sql-orm-client/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-orm-client/fixtures/generated/contract.json is excluded by !**/generated/**
📒 Files selected for processing (138)
  • apps/telemetry-backend/src/prisma/contract.d.ts
  • apps/telemetry-backend/src/prisma/contract.json
  • examples/multi-extension-monorepo/app/src/contract.d.ts
  • examples/multi-extension-monorepo/app/src/contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/audit/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/src/contract.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/end-contract.d.ts
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/end-contract.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.ts
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.json
  • examples/paradedb-demo/src/prisma/contract.d.ts
  • examples/paradedb-demo/src/prisma/contract.json
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.d.ts
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.json
  • examples/prisma-next-demo/src/prisma/contract.d.ts
  • examples/prisma-next-demo/src/prisma/contract.json
  • examples/prisma-next-demo/test/contract-authoring.test.ts
  • examples/prisma-next-demo/test/demo-dx.types.test.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.d.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.json
  • examples/react-router-demo/src/prisma/contract.d.ts
  • examples/react-router-demo/src/prisma/contract.json
  • examples/react-router-demo/test/offline-emit.e2e.test.ts
  • examples/react-router-demo/test/react-router.smoke.e2e.test.ts
  • packages/1-framework/3-tooling/cli-telemetry/test/integration.test.ts
  • packages/1-framework/3-tooling/cli/test/load-ts-contract.test.ts
  • packages/2-sql/1-core/contract/src/ir/sql-storage.ts
  • packages/2-sql/1-core/contract/src/validators.ts
  • packages/2-sql/1-core/contract/test/sql-storage.types.test-d.ts
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.defaults.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.extensions.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.polymorphism.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.relations.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.types.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.value-objects.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/ts-psl-parity.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts
  • packages/2-sql/2-authoring/contract-ts/src/build-contract.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-types.ts
  • packages/2-sql/2-authoring/contract-ts/test/config-types.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.constraints.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.contract-definition.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.portability.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.namespaces.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.per-model-namespace.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/unbound-tables.ts
  • packages/2-sql/9-family/src/core/ir/sql-contract-serializer-base.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.d.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.json
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.json
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.ts
  • packages/3-extensions/paradedb/migrations/refs/head.json
  • packages/3-extensions/paradedb/src/contract.d.ts
  • packages/3-extensions/paradedb/src/contract.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/end-contract.d.ts
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/end-contract.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.ts
  • packages/3-extensions/pgvector/migrations/refs/head.json
  • packages/3-extensions/pgvector/src/contract.d.ts
  • packages/3-extensions/pgvector/src/contract.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.d.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.ts
  • packages/3-extensions/postgis/migrations/refs/head.json
  • packages/3-extensions/postgis/src/contract.d.ts
  • packages/3-extensions/postgis/src/contract.json
  • packages/3-extensions/postgres/test/psl-namespace-qualifier-routing.test.ts
  • packages/3-extensions/sql-orm-client/src/collection-contract.ts
  • packages/3-extensions/sql-orm-client/src/model-accessor.ts
  • packages/3-extensions/sql-orm-client/src/query-plan-meta.ts
  • packages/3-extensions/sql-orm-client/src/query-plan-mutations.ts
  • packages/3-extensions/sql-orm-client/src/where-binding.ts
  • packages/3-extensions/sql-orm-client/test/helpers.ts
  • packages/3-extensions/sql-orm-client/test/mutation-executor.test.ts
  • packages/3-extensions/sql-orm-client/test/unbound-tables.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner-strategies.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/runner.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/verify-postgres-namespaces.ts
  • packages/3-targets/3-targets/postgres/src/core/postgres-schema.ts
  • packages/3-targets/3-targets/postgres/test/migrations/enum-collision.test.ts
  • packages/3-targets/3-targets/postgres/test/postgres-schema.test.ts
  • skills-contrib/record-upgrade-instructions/SKILL.md
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/instructions.md
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/instructions.md
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-postgres-public-default.ts
  • test/e2e/framework/test/ddl.test.ts
  • test/integration/test/authoring/paradedb-bm25-narrowing.test.ts
  • test/integration/test/authoring/parity/callback-mode-scalars/expected.contract.json
  • test/integration/test/authoring/parity/core-surface/expected.contract.json
  • test/integration/test/authoring/parity/default-cuid-2/expected.contract.json
  • test/integration/test/authoring/parity/default-dbgenerated/expected.contract.json
  • test/integration/test/authoring/parity/default-nanoid-16/expected.contract.json
  • test/integration/test/authoring/parity/default-nanoid/expected.contract.json
  • test/integration/test/authoring/parity/default-pack-slugid/expected.contract.json
  • test/integration/test/authoring/parity/default-ulid/expected.contract.json
  • test/integration/test/authoring/parity/default-uuid-v4/expected.contract.json
  • test/integration/test/authoring/parity/default-uuid-v7/expected.contract.json
  • test/integration/test/authoring/parity/map-attributes/expected.contract.json
  • test/integration/test/authoring/parity/pgvector-named-type/expected.contract.json
  • test/integration/test/authoring/parity/relation-backrelation-list/expected.contract.json
  • test/integration/test/authoring/psl-index-type-options.integration.test.ts
  • test/integration/test/authoring/side-by-side-contracts.test.ts
  • test/integration/test/authoring/side-by-side/postgres/contract.json
  • test/integration/test/cli.db-sign.e2e.test.ts
  • test/integration/test/cli.emit-cli-process.e2e.test.ts
  • test/integration/test/cli.emit.test.ts
  • test/integration/test/contract-builder.test.ts
  • test/integration/test/contract-builder.types.test-d.ts
  • test/integration/test/dsl-type-inference.test-d.ts
  • test/integration/test/family.schema-verify.dependencies.integration.test.ts
  • test/integration/test/family.schema-verify.types.test.ts
  • test/integration/test/fixtures/contract.d.ts
  • test/integration/test/fixtures/contract.json
  • test/integration/test/sql-orm-client/collection-mutation-defaults.test.ts
  • test/integration/test/sql-orm-client/fixtures/contract.ts
  • test/integration/test/sql-orm-client/helpers.ts
  • test/integration/test/sql-orm-client/unbound-tables.ts
  • test/integration/test/sql-orm-client/upsert.test.ts
  • test/integration/test/value-objects/value-objects.integration.test.ts
  • test/integration/test/vite-plugin.hmr.e2e.test.ts
✅ Files skipped from review due to trivial changes (45)
  • packages/3-extensions/pgvector/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.ts
  • packages/3-extensions/paradedb/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.json
  • test/integration/test/cli.emit.test.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/verify-postgres-namespaces.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.json
  • packages/3-extensions/pgvector/src/contract.json
  • packages/2-sql/1-core/contract/src/validators.ts
  • test/integration/test/authoring/parity/pgvector-named-type/expected.contract.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.json
  • test/integration/test/authoring/parity/default-nanoid-16/expected.contract.json
  • examples/paradedb-demo/src/prisma/contract.json
  • test/e2e/framework/test/ddl.test.ts
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.d.ts
  • examples/multi-extension-monorepo/app/src/contract.json
  • packages/3-extensions/postgis/src/contract.json
  • examples/react-router-demo/src/prisma/contract.json
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • test/integration/test/authoring/parity/default-pack-slugid/expected.contract.json
  • test/integration/test/authoring/side-by-side-contracts.test.ts
  • packages/2-sql/9-family/src/core/ir/sql-contract-serializer-base.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner-strategies.ts
  • test/integration/test/authoring/psl-index-type-options.integration.test.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/instructions.md
  • test/integration/test/fixtures/contract.d.ts
  • test/integration/test/authoring/parity/default-nanoid/expected.contract.json
  • test/integration/test/authoring/parity/default-uuid-v4/expected.contract.json
  • examples/paradedb-demo/src/prisma/contract.d.ts
  • examples/multi-extension-monorepo/app/src/contract.d.ts
  • test/integration/test/authoring/parity/core-surface/expected.contract.json
  • test/integration/test/authoring/parity/map-attributes/expected.contract.json
  • test/integration/test/authoring/parity/default-ulid/expected.contract.json
  • test/integration/test/authoring/parity/default-cuid-2/expected.contract.json
  • apps/telemetry-backend/src/prisma/contract.json
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.json
  • examples/prisma-next-demo/src/prisma/contract.json
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/instructions.md
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/end-contract.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.json
  • examples/prisma-next-demo/src/prisma/contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/src/contract.d.ts
🚧 Files skipped from review as they are similar to previous changes (76)
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.value-objects.test.ts
  • test/integration/test/authoring/paradedb-bm25-narrowing.test.ts
  • packages/1-framework/3-tooling/cli-telemetry/test/integration.test.ts
  • test/integration/test/sql-orm-client/collection-mutation-defaults.test.ts
  • packages/3-extensions/postgis/migrations/refs/head.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • packages/1-framework/3-tooling/cli/test/load-ts-contract.test.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.ts
  • packages/2-sql/2-authoring/contract-psl/test/unbound-tables.ts
  • test/integration/test/sql-orm-client/unbound-tables.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.json
  • test/integration/test/family.schema-verify.types.test.ts
  • packages/2-sql/1-core/contract/test/sql-storage.types.test-d.ts
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.ts
  • examples/react-router-demo/test/react-router.smoke.e2e.test.ts
  • packages/3-targets/3-targets/postgres/test/postgres-schema.test.ts
  • test/integration/test/cli.db-sign.e2e.test.ts
  • packages/3-extensions/sql-orm-client/src/where-binding.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.extensions.test.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.d.ts
  • examples/react-router-demo/test/offline-emit.e2e.test.ts
  • packages/3-extensions/sql-orm-client/src/collection-contract.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.contract-definition.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/config-types.test.ts
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/end-contract.d.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-types.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.ts
  • packages/3-extensions/sql-orm-client/src/query-plan-meta.ts
  • examples/multi-extension-monorepo/packages/audit/src/contract.json
  • test/integration/test/authoring/parity/relation-backrelation-list/expected.contract.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/end-contract.d.ts
  • packages/3-extensions/postgis/src/contract.d.ts
  • packages/3-extensions/sql-orm-client/test/mutation-executor.test.ts
  • packages/3-extensions/paradedb/src/contract.d.ts
  • packages/3-extensions/pgvector/src/contract.d.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.relations.test.ts
  • packages/3-targets/3-targets/postgres/src/core/postgres-schema.ts
  • packages/2-sql/2-authoring/contract-psl/test/ts-psl-parity.test.ts
  • examples/prisma-next-demo/test/demo-dx.types.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.constraints.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.portability.test.ts
  • packages/2-sql/1-core/contract/src/ir/sql-storage.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.polymorphism.test.ts
  • test/integration/test/authoring/side-by-side/postgres/contract.json
  • test/integration/test/sql-orm-client/helpers.ts
  • packages/3-extensions/sql-orm-client/test/helpers.ts
  • test/integration/test/vite-plugin.hmr.e2e.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.namespaces.test.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/end-contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/migrations/refs/head.json
  • packages/2-sql/2-authoring/contract-psl/test/provider.test.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.types.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/unbound-tables.ts
  • packages/3-extensions/postgres/test/psl-namespace-qualifier-routing.test.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.d.ts
  • apps/telemetry-backend/src/prisma/contract.d.ts
  • examples/react-router-demo/src/prisma/contract.d.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/migrate-contract-testing-imports.ts
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.test.ts
  • test/integration/test/contract-builder.types.test-d.ts
  • test/integration/test/value-objects/value-objects.integration.test.ts
  • packages/2-sql/2-authoring/contract-ts/test/contract-builder.dsl.test.ts
  • test/integration/test/authoring/parity/default-uuid-v7/expected.contract.json
  • packages/2-sql/2-authoring/contract-psl/test/interpreter.defaults.test.ts
  • packages/3-extensions/sql-orm-client/test/unbound-tables.ts
  • skills/upgrade/prisma-next-upgrade/upgrades/0.11-to-0.12/re-emit-domain-namespaced-contracts.ts
  • packages/2-sql/2-authoring/contract-psl/src/interpreter.ts
  • packages/3-extensions/paradedb/src/contract.json
  • test/integration/test/family.schema-verify.dependencies.integration.test.ts
  • packages/3-extensions/sql-orm-client/src/model-accessor.ts
  • test/integration/test/authoring/parity/callback-mode-scalars/expected.contract.json
  • packages/3-targets/3-targets/postgres/src/core/migrations/runner.ts
  • packages/3-targets/3-targets/postgres/src/core/migrations/planner.ts
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/end-contract.json
  • test/integration/test/contract-builder.test.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.11-to-0.12/regenerate-extension-public-baseline.ts

@wmadden wmadden merged commit 82216b8 into main Jun 1, 2026
21 checks passed
@wmadden wmadden deleted the tml-public-by-default branch June 1, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants