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

TML-2886: type SQL enum columns via a baked storage column lookup - #841

Merged
wmadden-electric merged 20 commits into
mainfrom
tml-2886-baked-storage-column-lookup
Jun 24, 2026
Merged

wmadden-electric merged 20 commits into
mainfrom
tml-2886-baked-storage-column-lookup

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Decision

Type SQL enum columns using a baked storage column lookup computed in the SQL family emitter. The storage plane now carries its own map of column types — keyed [namespace][table][column] — so the query builder reads it with a single indexed access and never reaches across into domain-keyed tables.

// What a consumer sees — unchanged from before
type PriorityField = FieldOutputTypes['public']['Post']['priority'];
//=> 'low' | 'high' | 'urgent'

// What the query builder reads — new, storage-keyed surface
type PriorityColumn = StorageColumnTypes['public']['post']['priority'];
//=> 'low' | 'high' | 'urgent'

Both maps are flat literal types baked at emit time. No type-level traversal anywhere in the emitted .d.ts.

Vocabulary

  • Domain layer — the model/field view of data; FieldOutputTypes/FieldInputTypes key by [namespace][model][field].
  • Storage layer — the table/column view; the new StorageColumnTypes keys by [namespace][table][column].
  • Value-set — the set of allowed string values for an enum column, stored as a valueSet entry in the SQL namespace and enforced by a CHECK constraint.
  • Reference (ref) — in the emitted contract, a column may carry a valueSet ref that names the owning value-set entry. The rejected design from PR TML-2886: derive enum column types by following the contract’s references, not a baked lookup table #833 followed this ref at the type level; this PR bakes the resolution into the emitter.

Why baked lookup, not ref-following

PR #833 (closed) typed each enum column by following the valueSet ref through the contract at the type level — an expression of the form ContractBase['storage']['namespaces'][Ns]['entries']['valueSet'][Ref]['members'][number]['value'], re-evaluated for every column in every selected row type. This was rejected on two grounds:

  1. TypeScript evaluation cost is the binding constraint. A ref-following expression compounds type instantiations: one multi-hop traversal per column, nested inside the query result's mapped type, repeated for every selected column. On a contract with many tables this hits TypeScript's "excessively deep" limit and stalls the language server. A baked literal property access — StorageColumnTypes[Ns][T][C] — pulls nothing else into the type graph and costs exactly one indexed access.

  2. The real defect was the cross-plane reach, not the lookup table. The old query builder typed columns via a path that walked storage column → domain model field → FieldOutputTypes. The lookup table was the correct tool; the bug was reaching into a domain-keyed table from the storage plane. Giving storage its own column-type lookup removes the reach at the root.

The baked lookup exists for exactly this reason: derivation happens once in the emitter (generator code), not on every consumer type evaluation.

What changed

SQL family emitter (packages/2-sql/3-tooling/emitter):

  • Emits a top-level StorageColumnTypes map — codec output narrowed by value-set literals for enum columns, parameterized codec types for Char<N>/Vector<N> columns, plain codec output otherwise.
  • Derives FieldOutputTypes/FieldInputTypes from StorageColumnTypes at emit time via the field→column mapping each model carries. The derivation is a domain→storage projection, the legal read direction.
  • Framework emitter (packages/1-framework/3-tooling/emitter) gains a resolveFieldType hook that the SQL family answers from its column lookup. No value-set or column knowledge enters the framework layer (A5).

Query builder (packages/2-sql/4-lanes/sql-builder, packages/2-sql/4-lanes/query-builder):

  • ResolvedColumnTypes and ExtractOutputType index StorageColumnTypes directly. The FindModelForTable/FindFieldForColumn walk and the FieldOutputOverride fallback chain are deleted.
  • ORM (packages/2-sql/4-lanes/relational-core, packages/3-extensions/sql-orm-client) is unchanged — ComputeColumnJsType still reads FieldOutputTypes; its source file is byte-identical to main.

No-emit path (packages/2-sql/2-authoring/contract-ts): StorageColumnChannelTypes added — a structural projection re-keyed from models to tables, re-using FieldChannelType per entry. No new ref-following. The enum-surface.types.test-d.ts tests keep passing.

SQL-only realization: Mongo is unchanged — collections are ~1:1 with model fields, no cross-plane reach to fix. MongoTypeMaps is untouched.

Verification

Self-checks:

  • grep -rn 'ContractBase\[' examples/prisma-next-demo/src/prisma/contract.d.ts → empty (A4: no ref-following in emitted output)
  • grep -rnE 'valueSet|ValueSetRef|StorageColumn|EnumValuesResolver' packages/1-framework/3-tooling/emitter/src/ → empty (A5: framework stays target-agnostic)
  • git diff --stat origin/main HEAD -- ':(glob)**/contract.json' → empty (A7: contract.json/hashes byte-identical)
  • FieldOutputTypes block in the demo contract.d.ts byte-identical to main

Reviewer break-and-revert evidence (rev-2886-v2b, verdict SATISFIED, branch tip 44816fe9e):

  • Char/Vector refinement guard: switching renderRefinedCodecType to if (false && …) collapsed parameterized types in both maps; resolved-field-types.test-d.ts failed naming Char<36> explicitly.
  • Value-set narrowing guard: switching if (column.valueSet) to if (false && …) collapsed Post.priority to string; all three expectTypeOf().toEqualTypeOf<'low' | 'high' | 'urgent'>() assertions in demo-dx.types.test.ts bit — covering the direct FieldOutputTypes index, the query-builder row type, and the ORM-via-typed-rows path.

D3 gate:

  • pnpm build ✓, pnpm typecheck (138 packages) ✓, pnpm fixtures:check ✓
  • pnpm lint:deps ✓, pnpm lint:casts ✓, pnpm check:upgrade-coverage --mode pr ✓
  • Targeted suites (@prisma-next/sql-contract-emitter, @prisma-next/emitter, @prisma-next/sql-orm-client, @prisma-next/sql-builder, @prisma-next/sql-relational-core) ✓
  • @prisma-next/integration-tests typecheck, prisma-next-demo typecheck ✓
  • Full pnpm test:packages ✓

Alternatives considered

  • Ref-following (PR TML-2886: derive enum column types by following the contract’s references, not a baked lookup table #833, rejected). Type each column by following the valueSet ref at the type level through the emitted contract. Rejected: TS evaluation cost is unbounded across large contracts; the cross-plane type-level traversal is the violation this work was meant to fix.
  • Keep cross-plane reach, fix nothing. Storage continues typing columns via domain FieldOutputTypes. Rejected: wrong read direction; breaks enum typing for raw value-set columns with no domain field.
  • Storage-encapsulated lookup with derivation (chosen). Bake storage column types in the emitter; derive field types from storage types. The derivation captures the honest data-flow direction, and both lookups are flat literals — O(1) indexed access for consumers.

Upgrade coverage

The examples/ and packages/3-extensions/ diffs are purely generated artifacts: the new StorageColumnTypes block appears in every regenerated contract.d.ts; FieldOutputTypes is byte-identical to main; contract.json and hashes are unchanged. No consumer action required — a re-emit picks up StorageColumnTypes automatically. Declared incidental in skills/upgrade/prisma-next-upgrade/upgrades/0.13-to-0.14/instructions.md and skills/extension-author/prisma-next-extension-upgrade/upgrades/0.13-to-0.14/instructions.md.

Context

This is a redo of closed PR #833. The original cut followed the valueSet ref at the type level; this redo bakes the resolution in the emitter. Design pivot recorded in projects/enums-as-domain-concept/slices/type-columns-from-valueset-ref/spec.md. Commit 23e8809b8 on this branch is a pre-existing fixture drift fix (migration op-id format from #837), kept here so fixtures:check stays green.

Summary by CodeRabbit

  • Bug Fixes

    • Improved generated type definitions so database column shapes are handled more consistently across supported projects.
  • Documentation

    • Updated upgrade guidance to reflect the latest type-generation behavior and clarify that no consumer action is required.
  • Tests

    • Expanded type-level coverage for generated contracts and query building to verify column typing and enum handling.

wmadden-electric and others added 6 commits June 16, 2026 12:49
…ified form (pre-existing main drift)

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…age value-sets (SQL emitter)

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…ookup (SQL emitter)

Completes the D1 storage lookup so the lanes can read column types from it.

Each `StorageColumnTypes[ns][table][column]` entry is now the FULL column type:
the parameterized-codec-refined codec output (via the same `renderOutputTypeFor`
path the framework uses for `FieldOutputTypes`, so `id` -> `Char<36>`,
`embedding` -> `Vector<1536>`), narrowed to the value-set literal union when the
column carries one, with nullability applied. Adds the input side as a parallel
`StorageColumnInputTypes` map for the insert/update surfaces. Both are wired into
the contract type via the `TypeMaps` phantom slot, reachable through new
`ExtractStorageColumnTypes` / `ExtractStorageColumnInputTypes` extractors in
`sql-contract` (mirroring `ExtractFieldOutputTypes`).

`FieldOutputTypes`/`FieldInputTypes` now derive from the same shared column-type
helper for plain scalar column-backed fields (the SQL `resolveFieldType` hook
returns the full column type, not just the enum union). Composite fields
(valueObject/union) and `many`/`dict` fields keep the framework default — their
element type comes from the domain field codec, not the storage container codec.
The two maps stay byte-identical to before (verified across every emitted
fixture); only `StorageColumnTypes` gains the refinements it was missing and the
new `StorageColumnInputTypes` map appears. contract.json and all hashes are
unchanged (the change is .d.ts-only).

The in-memory `defineContract` authoring path also emits the two storage maps
(`StorageColumnChannelTypes`) so its contracts stay consistent with emitted ones.

The framework emitter keeps zero value-set / storage-column knowledge (A5).

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…e reach)

Points the storage query surfaces at the now-complete storage lookup.

Query builder (`selection.ts`): `ExtractOutputType` indexes
`StorageColumnTypes[ns][table][column]` with a single O(1) access (unioned across
namespaces that declare the table), replacing the `FieldOutputOverride`
cross-plane model->field walk. A column with a value-set but no domain field now
types correctly because the storage lookup does not require a model field.

sql-builder (`table-proxy.ts`): the select-result row reads
`StorageColumnTypes[ns][table]`; insert/update read `StorageColumnInputTypes`.
This decouples the sql-builder storage surface from the shared
`ComputeColumnJsType` (it no longer routes column output through it). The ORM
keeps reading `FieldOutputTypes` via `ComputeColumnJsType` — that type now has a
single consumer (the ORM) and is unchanged, so the ORM is unaffected.

No ref-following and no fallback chains — a single indexed access per column.
Parameterized refinements (`Char<N>`, `Vector<N>`) are preserved because they are
baked into the storage lookup (verified by the sql-builder
`resolved-field-types` type test staying green).

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…hanged)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner June 16, 2026 13:40
@coderabbitai

coderabbitai Bot commented Jun 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@wmadden-electric, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 38 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: d36da7c1-6e64-4922-8d11-09bc43c45b74

📥 Commits

Reviewing files that changed from the base of the PR and between 6b9558d and 7e37506.

⛔ Files ignored due to path filters (4)
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-orm-client/fixtures/execution-defaulted-tags/generated/contract.d.ts 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/mn-psl/generated/contract.d.ts is excluded by !**/generated/**
📒 Files selected for processing (8)
  • examples/prisma-next-demo/migrations/app/20260422T0720_initial/end-contract.d.ts
  • examples/prisma-next-demo/src/prisma/contract.d.ts
  • examples/supabase/src/contract.d.ts
  • packages/2-sql/1-core/contract/src/exports/types.ts
  • packages/2-sql/1-core/contract/src/types.ts
  • packages/3-extensions/supabase/src/contract/contract.d.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.14-to-0.15/instructions.md
  • skills/upgrade/prisma-next-upgrade/upgrades/0.14-to-0.15/instructions.md
📝 Walkthrough

Walkthrough

Introduces StorageColumnTypes and StorageColumnInputTypes as new generic parameters on TypeMaps, generated per namespace/table/column by the SQL emitter via a new getStorageTypeExports SPI hook. The domain enum lookup is refactored from EnumValuesResolver to DomainEnumLookup, lane consumers (selection.ts, table-proxy.ts) switch to reading from StorageColumnTypes, and all contract fixture .d.ts files are regenerated.

Changes

StorageColumnTypes feature end-to-end

Layer / File(s) Summary
Core contract type definitions and extraction utilities
packages/2-sql/1-core/contract/src/types.ts, packages/2-sql/1-core/contract/src/column-type-resolution.ts, packages/2-sql/1-core/contract/src/exports/types.ts, packages/1-framework/1-core/framework-components/src/control/emission-types.ts
NamespacedStorageColumnTypeMap is introduced, TypeMaps gains storageColumnTypes/storageColumnInputTypes generics with extractors (ExtractStorageColumnTypes, ExtractStorageColumnInputTypes, StorageColumnTypesOf, StorageColumnInputTypesOf), StorageColumnMapAt/StorageColumnTypeAcrossNamespaces resolution utilities are added, all new types are re-exported, and EmissionSpi gains the optional getStorageTypeExports hook.
Domain enum lookup refactor in framework emitter
packages/1-framework/3-tooling/emitter/src/domain-type-generation.ts
EnumValuesResolver is replaced by DomainEnumLookup (mapping ValueSetRef → ContractEnum). renderEnumValueUnion drops its safety-filter pass; resolveFieldType looks up ContractEnum and applies isSafeTypeExpression internally. Signatures of generateBothFieldTypesMaps, generateFieldTypesMapsByNamespace, generateFieldOutputTypesMap, and generateFieldInputTypesMap are all updated accordingly.
DTS generation wiring and SQL emitter getStorageTypeExports
packages/1-framework/3-tooling/emitter/src/generate-contract-dts.ts, packages/2-sql/3-tooling/emitter/src/index.ts
generate-contract-dts.ts builds domainEnumLookup via entityKind and calls emitter.getStorageTypeExports?.(contract, codecLookup), prepending the result before the emitted TypeMaps. sqlEmission.getStorageTypeExports traverses contract.storage.namespaces to emit StorageColumnTypes/StorageColumnInputTypes, handling nullable columns, value-set unions, typeRef/typeParams codec refinement, and isSafeTypeExpression guards; getTypeMapsExpression is extended with the two new type parameters.
SQL authoring StorageColumnChannelTypes and lane consumer updates
packages/2-sql/2-authoring/contract-ts/src/contract-types.ts, packages/2-sql/4-lanes/query-builder/src/selection.ts, packages/2-sql/4-lanes/sql-builder/src/types/table-proxy.ts
StorageColumnChannelTypes is added and wired into SqlContractResult's TypeMaps. ExtractOutputType in selection.ts is rewritten using StorageColumnTypeAcrossNamespaces<ExtractStorageColumnTypes<...>>, dropping the _TColumn parameter. table-proxy.ts replaces model/field inference in ResolvedColumnTypes/ResolvedInsertValues with StorageColumnMapAt<ExtractStorageColumnInputTypes<...>>, simplifying TableProxy.insert/update signatures.
Tests: emitter, domain-type-generation, lane type-level
packages/1-framework/3-tooling/emitter/test/..., packages/2-sql/3-tooling/emitter/test/..., packages/2-sql/4-lanes/*/test/...
Adds 694-line emitter-hook.storage-column-types.test.ts covering enum literals, codec accessors, typeRef refinement, value-set handling, __unbound__, and many[] interplay; adds generate-contract-dts.spi-branches.test.ts for SPI hook plumbing and enum-lookup wiring; refactors domain-type-generation.test.ts with DomainEnumLookup-driven tests and new edge cases; updates emitter-hook.generation.basic.test.ts, emitter-hook.typeref-resolver.test.ts, query-builder, and sql-builder type-level fixtures.
Regenerated contract.d.ts fixtures
apps/telemetry-backend/src/prisma/contract.d.ts, examples/*/contract.d.ts, packages/3-extensions/*/contract.d.ts, test/integration/test/fixtures/contract.d.ts, skills/*/instructions.md
All generated contract.d.ts files across apps, examples, extension packages, and the integration fixture are updated to export StorageColumnTypes, StorageColumnInputTypes, and the expanded 6-parameter TypeMaps instantiation. Upgrade instruction docs in skills/ annotate the regeneration as .d.ts-only with byte-identical contract.json/hashes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • prisma/prisma-next#30: The storage-column type maps emitted in this PR are directly downstream of the contract change that stored each column as { nativeType, codecId, nullable }, making that schema foundational for the StorageColumnTypes generation added here.

Poem

🐇 Hippity-hoppity, types are now baked,
StorageColumnTypes — a map that we've made!
Each namespace and table, each column in kind,
With input and output precisely defined.
No more field-lookup hops through the dark —
The emitter now shines like a spark! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: SQL enum columns are typed via a baked storage column lookup.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2886-baked-storage-column-lookup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

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

@prisma-next/mongo-runtime

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

@prisma-next/family-mongo

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

@prisma-next/sql-runtime

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

@prisma-next/family-sql

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

@prisma-next/extension-arktype-json

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

@prisma-next/middleware-cache

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

@prisma-next/mongo

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

@prisma-next/extension-paradedb

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

@prisma-next/extension-pgvector

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

@prisma-next/extension-postgis

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

@prisma-next/postgres

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

@prisma-next/sql-orm-client

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

@prisma-next/sqlite

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

@prisma-next/extension-supabase

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-supabase@841

@prisma-next/target-mongo

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

@prisma-next/adapter-mongo

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

@prisma-next/driver-mongo

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

@prisma-next/contract

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

@prisma-next/utils

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

@prisma-next/config

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

@prisma-next/errors

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

@prisma-next/framework-components

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

@prisma-next/operations

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

@prisma-next/ts-render

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

@prisma-next/contract-authoring

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

@prisma-next/ids

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

@prisma-next/psl-parser

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

@prisma-next/psl-printer

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

@prisma-next/cli

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

@prisma-next/cli-telemetry

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

@prisma-next/config-loader

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

@prisma-next/emitter

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

@prisma-next/language-server

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/language-server@841

@prisma-next/migration-tools

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

prisma-next

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

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

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

@prisma-next/mongo-codec

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

@prisma-next/mongo-contract

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

@prisma-next/mongo-value

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

@prisma-next/mongo-contract-psl

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

@prisma-next/mongo-contract-ts

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

@prisma-next/mongo-emitter

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

@prisma-next/mongo-schema-ir

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

@prisma-next/mongo-query-ast

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

@prisma-next/mongo-orm

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

@prisma-next/mongo-query-builder

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

@prisma-next/mongo-lowering

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

@prisma-next/mongo-wire

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

@prisma-next/sql-contract

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

@prisma-next/sql-errors

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

@prisma-next/sql-operations

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

@prisma-next/sql-schema-ir

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

@prisma-next/sql-contract-psl

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

@prisma-next/sql-contract-ts

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

@prisma-next/sql-contract-emitter

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

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

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

@prisma-next/sql-relational-core

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

@prisma-next/sql-builder

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

@prisma-next/target-postgres

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

@prisma-next/target-sqlite

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

@prisma-next/adapter-postgres

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

@prisma-next/adapter-sqlite

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

@prisma-next/driver-postgres

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

@prisma-next/driver-sqlite

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

commit: 7e37506

@github-actions

github-actions Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 158.76 KB (+0.31% 🔺)
postgres / emit 146.34 KB (+0.34% 🔺)
mongo / no-emit 78 KB (0%)
mongo / emit 72.09 KB (0%)
cf-worker / no-emit 186.18 KB (+0.32% 🔺)
cf-worker / emit 172.18 KB (+0.32% 🔺)

…olumn-lookup

Merge commits 088813b (TML-2916: un-namespaced PG models default to public
namespace per ADR 223) and a3da203 (TML-2503: reconcile extension-supabase
spec/plan) into this branch.

Conflict resolution:
- examples/**/migration.json (3 files): resolved by taking main's hashes, then
  regenerating via `pnpm fixtures:emit` (post-build) to get the combined
  correct hashes.
- skills/extension-author/.../instructions.md: kept both TML-2916 and TML-2886
  incidental entries as separate HTML comment blocks.
- All *.d.ts contract fixtures: auto-merge kept stale __unbound__ entries in
  StorageColumnTypes; after rebuilding and re-emitting, re-staged the correct
  emitter output (no __unbound__ for Postgres contracts per ADR 223).

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@wmadden wmadden 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.

Please try and restrain yourself. Write reasonable length comments

wmadden-electric and others added 5 commits June 16, 2026 17:09
…es only storage column lookups

Domain field enum narrowing (`field.valueSet` of `entityKind: 'enum'` ->
`contract.domain.enum[name].members[*].value`) is family-agnostic — same
algorithm SQL and Mongo both need, same algorithm `contract-ts`'s
`FieldChannelType`/`EnumValueUnion` already uses for the no-emit path. Hoist it
back to the framework emitter and remove the `EmissionSpi.resolveFieldType`
override hook that put it in the SQL family.

The framework emitter now reads `contract.domain.namespaces[ns].enum[name]`
directly and bakes the literal union into `FieldOutputTypes`/`FieldInputTypes`.
`EmissionSpi.resolveFieldTypeParams` stays — parameterized codec rendering IS
family-specific (SQL `column.typeRef` -> `storage.types`).

The SQL family contributes only `StorageColumnTypes`/`StorageColumnInputTypes`
via the renamed `getStorageTypeExports` hook (was `getExtraTypeExports`). That
hook still narrows by the *storage* column's `valueSet` (storage-plane knowledge,
correctly behind the SPI boundary).

`FieldOutputTypes`/`FieldInputTypes` are byte-identical to origin/main across
every emitted fixture. `contract.json` and all hashes byte-identical to main.
`StorageColumnTypes` keeps its `Char<36>`/`Vector<1536>`/value-set unions.

Reframes A5 in the slice spec: "framework holds no STORAGE knowledge"; domain
enum narrowing is framework-level. The Phase-1 commit also tracks the SQL
emitter `index.ts` god-file extraction as a separate follow-up (TML-2926).

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
`StorageColumnMapAt` (single-namespace coordinate lookup) was duplicated across
the sql-builder lane and open-coded in the query-builder lane's
`ExtractOutputType` (cross-namespace flat-table view). Extract both to
`packages/2-sql/1-core/contract/src/column-type-resolution.ts` — the natural
home for column-type resolution helpers, alongside the existing
`ExtractStorageColumnTypes` extractors.

Adds:
- `StorageColumnMapAt<SCT, NsId, TableName>` — single-coordinate lookup,
  resolving to `never` when the map is the empty default a non-emitted
  contract carries OR when the coordinate is absent in an emitted map.
- `StorageColumnTypeAcrossNamespaces<SCT, TableName, ColumnName>` — flat-table
  lookup, unioning across every namespace that declares the table.

`table-proxy.ts` and `selection.ts` now import the helpers. No behavioral
change; fixtures unchanged.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Per Will's review on PR #841: aggressively cut every multi-line comment block I
added in this slice. Repo rule (CLAUDE.md): no comments if avoidable; comments
are a last resort; the WHY is non-obvious only. A type's mechanics are obvious
mechanism — they belong in the code, not in prose.

No behavioral change.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…SPI-hook branches

`80a9744c9` moved enum narrowing into the framework and added SPI plumbing for
`getStorageTypeExports`. The new branches lacked direct unit-test coverage, so
both files dropped below the 90% branch threshold:

  - domain-type-generation.ts  87.56% < 90%
  - generate-contract-dts.ts   88.89% < 90%

Adds focused unit tests covering the enum-narrowing edge cases (numeric /
boolean members, nullability on the narrowed union, falls-through when the
lookup returns undefined / empty / non-scalar members) and every arm of the
SPI plumbing (`getStorageTypeExports` hook absent / present-string / present-
undefined; `domainEnumLookup` non-enum / missing-ns / missing-enum-block).

Post-fix:
  - domain-type-generation.ts  branches 95.33% (was 87.56%)
  - generate-contract-dts.ts   branches 94.44% (was 88.89%)

No production code changed; tests only.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@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: 1

Caution

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

⚠️ Outside diff range comments (1)
packages/3-extensions/postgis/src/contract.d.ts (1)

63-80: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Populate the storage-column maps instead of leaving them empty.

TypeMapsType now carries the [namespace][table][column] storage map, but both regenerated fixtures still set StorageColumnTypes / StorageColumnInputTypes to { readonly public: {} } even though the contracts declare real tables. That drops every storage-column key from the emitted types and leaves these fixtures out of sync with the new contract shape.

  • packages/3-extensions/postgis/src/contract.d.ts#L63-L80: emit cafe, neighborhood, and route storage columns here.
  • test/integration/test/fixtures/contract.d.ts#L63-L80: emit the user storage columns here so the integration fixture matches the new map shape.
🤖 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/postgis/src/contract.d.ts` around lines 63 - 80, The
StorageColumnTypes and StorageColumnInputTypes fields in the TypeMapsType are
currently empty objects but should be populated with the actual storage columns
for the declared tables. At packages/3-extensions/postgis/src/contract.d.ts
(lines 63-80), populate the storage-column maps with the cafe, neighborhood, and
route table columns. At test/integration/test/fixtures/contract.d.ts (lines
63-80), populate the storage-column maps with the user table columns. This will
bring both fixtures into sync with the new contract shape that now carries
namespace, table, and column storage mappings.
🤖 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.

Inline comments:
In `@packages/1-framework/3-tooling/emitter/test/domain-type-generation.test.ts`:
- Around line 1381-1392: The test fixture in the "does not narrow non-scalar
(union) fields even with a valueSet present" test is missing the valueSet
property on the field object, even though the test name explicitly advertises
that valueSet should be present. Add a valueSet property to the ContractField
fixture to align the test setup with its stated purpose and ensure the
regression scenario is actually being tested.

---

Outside diff comments:
In `@packages/3-extensions/postgis/src/contract.d.ts`:
- Around line 63-80: The StorageColumnTypes and StorageColumnInputTypes fields
in the TypeMapsType are currently empty objects but should be populated with the
actual storage columns for the declared tables. At
packages/3-extensions/postgis/src/contract.d.ts (lines 63-80), populate the
storage-column maps with the cafe, neighborhood, and route table columns. At
test/integration/test/fixtures/contract.d.ts (lines 63-80), populate the
storage-column maps with the user table columns. This will bring both fixtures
into sync with the new contract shape that now carries namespace, table, and
column storage mappings.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 930ea04f-ca6e-42c2-9bf8-a3987e595717

📥 Commits

Reviewing files that changed from the base of the PR and between 088813b and ff374ab.

⛔ Files ignored due to path filters (11)
  • examples/bundle-size/src/postgres/generated/contract.d.ts is excluded by !**/generated/**
  • packages/2-sql/4-lanes/sql-builder/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • projects/enums-as-domain-concept/slices/type-columns-from-valueset-ref/plan.md is excluded by !projects/**
  • projects/enums-as-domain-concept/slices/type-columns-from-valueset-ref/spec.md is excluded by !projects/**
  • test/e2e/framework/test/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/e2e/framework/test/sqlite/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/namespaced-accessors/fixtures/generated/contract.d.ts is excluded by !**/generated/**
  • test/integration/test/sql-builder/fixtures/generated/contract.d.ts 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/polymorphism/generated/contract.d.ts is excluded by !**/generated/**
📒 Files selected for processing (49)
  • apps/telemetry-backend/src/prisma/contract.d.ts
  • examples/multi-extension-monorepo/app/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/audit/src/contract.d.ts
  • examples/multi-extension-monorepo/packages/feature-flags/src/contract.d.ts
  • examples/paradedb-demo/src/prisma/contract.d.ts
  • examples/prisma-next-cloudflare-worker/src/prisma/contract.d.ts
  • examples/prisma-next-demo-sqlite/src/prisma/contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260422T0720_initial/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260422T0742_migration/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260422T0742_migration/start-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260422T0748_migration/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260422T0748_migration/start-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260605T1145_mti_variant_link_columns/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260605T1145_mti_variant_link_columns/start-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260610T0000_add_priority_enum/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260610T0000_add_priority_enum/start-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260610T2216_set_priority_default/end-contract.d.ts
  • examples/prisma-next-demo/migrations/app/20260610T2216_set_priority_default/start-contract.d.ts
  • examples/prisma-next-demo/src/prisma/contract.d.ts
  • examples/prisma-next-postgis-demo/migrations/app/20260512T1309_migration/end-contract.d.ts
  • examples/prisma-next-postgis-demo/src/prisma/contract.d.ts
  • examples/react-router-demo/src/prisma/contract.d.ts
  • examples/supabase/src/contract.d.ts
  • packages/1-framework/1-core/framework-components/src/control/emission-types.ts
  • packages/1-framework/1-core/framework-components/src/exports/emission.ts
  • packages/1-framework/3-tooling/emitter/src/domain-type-generation.ts
  • packages/1-framework/3-tooling/emitter/src/generate-contract-dts.ts
  • packages/1-framework/3-tooling/emitter/test/domain-type-generation.test.ts
  • packages/1-framework/3-tooling/emitter/test/generate-contract-dts.spi-branches.test.ts
  • packages/2-sql/1-core/contract/src/column-type-resolution.ts
  • packages/2-sql/1-core/contract/src/exports/types.ts
  • packages/2-sql/1-core/contract/src/types.ts
  • packages/2-sql/2-authoring/contract-ts/src/contract-types.ts
  • packages/2-sql/3-tooling/emitter/src/index.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.generation.basic.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.storage-column-types.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.typeref-resolver.test.ts
  • packages/2-sql/4-lanes/query-builder/src/selection.ts
  • packages/2-sql/4-lanes/query-builder/test/enum-type.field-output.test-d.ts
  • packages/2-sql/4-lanes/sql-builder/src/types/table-proxy.ts
  • packages/2-sql/4-lanes/sql-builder/test/enum-type.field-output.test-d.ts
  • packages/2-sql/4-lanes/sql-builder/test/types/namespace-unique-fields.types.test-d.ts
  • packages/3-extensions/paradedb/src/contract.d.ts
  • packages/3-extensions/pgvector/src/contract.d.ts
  • packages/3-extensions/postgis/src/contract.d.ts
  • packages/3-extensions/supabase/src/contract/contract.d.ts
  • skills/extension-author/prisma-next-extension-upgrade/upgrades/0.13-to-0.14/instructions.md
  • skills/upgrade/prisma-next-upgrade/upgrades/0.13-to-0.14/instructions.md
  • test/integration/test/fixtures/contract.d.ts

…e-column-lookup

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Main bumped to 0.14.0; the in-flight transition is now 0.14 → 0.15.
This PR's incidental substrate diff (the StorageColumnTypes addition to
emitted contract.d.ts files in examples/ and packages/3-extensions/) needs
a per-PR declaration in the matching upgrade window, since main's bump PR
shipped the 0.14-to-0.15 directories with `changes: []` placeholders.

Adds matching TML-2886 (redo, PR #841) declarations to both:

  - skills/upgrade/prisma-next-upgrade/upgrades/0.14-to-0.15/instructions.md
  - skills/extension-author/prisma-next-extension-upgrade/upgrades/0.14-to-0.15/instructions.md

Same content as the equivalent 0.13-to-0.14 entries (which describe the
pre-bump state of this PR). No consumer action required — incidental
substrate diff only; observable types unchanged.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…CodeRabbit)

The test claimed to cover the "non-scalar field with valueSet present" branch
but omitted `valueSet` from the fixture, so it didn't actually exercise the
guard. Add a `valueSet` (`entityKind: 'enum'`, pointing at the existing
`priorityRef`) AND a `domainEnumLookup` that would narrow if the narrowing
code ran — proving the non-scalar-kind guard (the switch's `union` arm bypassing
the scalar narrowing block), not a missing-lookup short-circuit, is what keeps
the union shape intact.

Coverage stays at 95.33% / 94.44% branches (both ≥ 90%).

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
…e-column-lookup

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@wmadden wmadden 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.

One small comment

@wmadden-electric
wmadden-electric added this pull request to the merge queue Jun 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jun 24, 2026
…e-column-lookup

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

# Conflicts:
#	skills/upgrade/prisma-next-upgrade/upgrades/0.14-to-0.15/instructions.md
…e-column-lookup

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

# Conflicts:
#	examples/prisma-next-demo/migrations/app/20260422T0742_migration/end-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260422T0742_migration/start-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260422T0748_migration/end-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260422T0748_migration/start-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260605T1145_mti_variant_link_columns/end-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260605T1145_mti_variant_link_columns/start-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260610T0000_add_priority_enum/end-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260610T0000_add_priority_enum/start-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260610T2216_set_priority_default/end-contract.d.ts
#	examples/prisma-next-demo/migrations/app/20260610T2216_set_priority_default/start-contract.d.ts
#	skills/upgrade/prisma-next-upgrade/upgrades/0.14-to-0.15/instructions.md
@wmadden-electric
wmadden-electric added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit 8d3aadf Jun 24, 2026
20 checks passed
@wmadden-electric
wmadden-electric deleted the tml-2886-baked-storage-column-lookup branch June 24, 2026 14:25
wmadden-electric added a commit that referenced this pull request Jun 26, 2026
…ion kind

TML-2886 (#841) and TML-2911 (#846) merged in tests that build SQL-storage
namespaces in the pre-TML-2891 kind-less form { id, entries }. This branch makes a
namespace kind required (every namespace is a target concretion). Inject
kind: test-sql-namespace for entries-form namespaces in the emitter fixture
normalizeRootSqlStorage, and add it to the three namespace literals in
storage-column-many.test.ts.

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
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