Skip to content

TML-2984: declare contractSpace on the core extension descriptor - #967

Merged
SevInf merged 3 commits into
tml-2984-slice-02-extension-contractsfrom
tml-2984-slice-03-contractspace-core
Jul 13, 2026
Merged

TML-2984: declare contractSpace on the core extension descriptor#967
SevInf merged 3 commits into
tml-2984-slice-02-extension-contractsfrom
tml-2984-slice-03-contractspace-core

Conversation

@SevInf

@SevInf SevInf commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Slice 03 of the lsp-interpreter-diagnostics project (TML-2984). Stacked on #948 — the base is the slice-02 branch; only the top commits are this slice. Operator-authorized scope addition: contract spaces are a framework concept, so the descriptor should say so.

Changes

  • framework-components (core): ControlExtensionDescriptor gains readonly contractSpace?: ContractSpace — the type already lived in core (control-spaces.ts: "contract-space identity is a framework concept, not a SQL-specific one"); only the member declaration was missing. Both families' existing narrowed overrides (ContractSpace<Contract<SqlStorage>>, ContractSpace<MongoContract<MongoStorageShape>>) compile unchanged — zero family-package edits.
  • Bridges deleted: ContractSpaceCarryingDescriptor (the structural view slice 02 introduced) is gone; assembleExtensionContracts reads the typed member — the last contractSpace.contractJson cast in the repo is deleted. The load-order view (DependencyDeclaringDescriptor) is deliberately kept: buildExtensionLoadOrder is public API consumed by family-sql, its structural parameter is a contract rather than a cast bridge, and typing it would cost fixture fabrication and API narrowing for zero cast savings.
  • Guardrail tightened: the Contract-cast-hygiene gate now covers the whole repo (no framework-components exclusion) in two regex forms — reach-through and picked-variable — since the exclusion-drop alone would have been blind to the form the deleted cast actually used. Both forms verified repo-wide and against pre-change trees as positive controls.

Why

Every structural cast this project has been melting down existed because consumers could see the descriptors (stack.extensionPacks) but not their contract spaces — the member was declared per-family despite both families agreeing on its shape. Declaring it once in core makes typed access universal for any current or future family, makes extensionContracts (slice 02) cast-free to build, and lets the grep gate hold the strongest possible line: zero contractJson casts anywhere.

Project spec + plan live under projects/lsp-interpreter-diagnostics/ (deleted at project close-out).

SevInf added 3 commits July 13, 2026 09:46
…r (spec+plan amended, slice 03 authored)

Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
ContractSpace was already a framework-level type; only the declaration
site was family-level. ControlExtensionDescriptor now carries the
optional member, families keep their storage-narrowed overrides, and
the ControlStack bridges fall: ContractSpaceCarryingDescriptor is gone
and assembleExtensionContracts property-picks a typed contractJson with
no cast. Grep gate tightened: contractSpace.contractJson casts are
forbidden repo-wide, both reach-through and picked-variable forms.

Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
@SevInf
SevInf requested a review from a team as a code owner July 13, 2026 10:08
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 1afa4b29-6f2d-41d2-a2b0-f50a4613eba3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2984-slice-03-contractspace-core

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 Jul 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

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

@prisma-next/mongo-runtime

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

@prisma-next/family-mongo

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

@prisma-next/sql-runtime

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

@prisma-next/family-sql

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

@prisma-next/extension-arktype-json

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

@prisma-next/middleware-cache

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

@prisma-next/mongo

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

@prisma-next/extension-paradedb

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

@prisma-next/extension-pgvector

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

@prisma-next/extension-postgis

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

@prisma-next/postgres

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

@prisma-next/sql-orm-client

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

@prisma-next/sqlite

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

@prisma-next/extension-supabase

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

@prisma-next/target-mongo

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

@prisma-next/adapter-mongo

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

@prisma-next/driver-mongo

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

@prisma-next/contract

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

@prisma-next/utils

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

@prisma-next/config

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

@prisma-next/errors

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

@prisma-next/framework-components

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

@prisma-next/operations

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

@prisma-next/ts-render

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

@prisma-next/contract-authoring

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

@prisma-next/ids

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

@prisma-next/psl-parser

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

@prisma-next/psl-printer

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

@prisma-next/cli

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

@prisma-next/cli-telemetry

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

@prisma-next/config-loader

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

@prisma-next/emitter

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

@prisma-next/language-server

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

@prisma-next/migration-tools

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

prisma-next

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

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

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

@prisma-next/mongo-codec

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

@prisma-next/mongo-contract

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

@prisma-next/mongo-value

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

@prisma-next/mongo-contract-psl

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

@prisma-next/mongo-contract-ts

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

@prisma-next/mongo-emitter

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

@prisma-next/mongo-schema-ir

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

@prisma-next/mongo-query-ast

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

@prisma-next/mongo-orm

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

@prisma-next/mongo-query-builder

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

@prisma-next/mongo-lowering

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

@prisma-next/mongo-wire

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

@prisma-next/sql-contract

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

@prisma-next/sql-errors

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

@prisma-next/sql-operations

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

@prisma-next/sql-schema-ir

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

@prisma-next/sql-contract-psl

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

@prisma-next/sql-contract-ts

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

@prisma-next/sql-contract-emitter

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

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

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

@prisma-next/sql-relational-core

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

@prisma-next/sql-builder

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

@prisma-next/target-postgres

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

@prisma-next/target-sqlite

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

@prisma-next/adapter-postgres

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

@prisma-next/adapter-sqlite

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

@prisma-next/driver-postgres

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

@prisma-next/driver-sqlite

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

commit: c3a4f43

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 154.11 KB (0%)
postgres / emit 129.23 KB (0%)
mongo / no-emit 98.55 KB (0%)
mongo / emit 89.39 KB (0%)
cf-worker / no-emit 181.26 KB (0%)
cf-worker / emit 153.93 KB (0%)

@SevInf SevInf closed this Jul 13, 2026
@SevInf
SevInf merged commit c3a4f43 into tml-2984-slice-02-extension-contracts Jul 13, 2026
16 checks passed
@SevInf
SevInf deleted the tml-2984-slice-03-contractspace-core branch July 13, 2026 10:56
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.

1 participant