Skip to content

Typecheck package test trees and fix the drift they were hiding#941

Merged
wmadden-electric merged 1 commit into
mainfrom
worktree/upbeat-clarke-2ca925
Jul 10, 2026
Merged

Typecheck package test trees and fix the drift they were hiding#941
wmadden-electric merged 1 commit into
mainfrom
worktree/upbeat-clarke-2ca925

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Ten workspace packages had a tsconfig.json whose include was ["src/**/*.ts"], so their test/ trees were never typechecked. Type errors in those tests accumulated silently over time. The concrete trigger: psl-printer tests construct PslExtensionBlock literals without the now-required blockAttributes field, and nothing caught it.

What this does

Aligns every one of those package tsconfigs with the repo convention (the other 30 packages already include test/**/*.ts), then fixes the type errors that surfaced — roughly 400 across five packages, all pre-existing test-side drift.

The drift that was hidden

The tests had fallen out of sync with the current IR shapes:

  • Storage fixtures still used the removed flat { tables: {...} } shape instead of { storageHash, namespaces: { <id>: { entries: { table: {...} } } } }, and omitted the now-required storageHash.
  • Branded types — plain string passed where NamespaceId / StorageHashBase are now required.
  • Index-signature accessobj.Foo where noPropertyAccessFromIndexSignature requires obj["Foo"].
  • Missing required properties on PslExtensionBlock, ContractModelBase, PslAttribute, etc.

Fixes build objects through the repo’s factories and hash constructors (coreHash/profileHash, crossRef) rather than hand-forced literals or casts, per the use-contract-ir-factories, use-hash-constructors, and no-contract-data-patching-in-tests rules. No test assertion was weakened.

Two genuine bugs in test/dev code turned up and were fixed: a stray [] argument shifting generateContractDts call sites (sql + mongo emitters), and a dev fixture script with a stale call signature.

cli was config-only: its test fixtures import a shared helper across a package boundary by relative path (an established pattern here), which conflicted with an over-tight rootDir; dropped rootDir and bumped lib to ES2024 for Promise.withResolvers.

Scope

No production src/ changed — every fix is in test files, test-only fixtures/helpers, or tsconfig.

Verification

  • Repo-root pnpm typecheck — green (143 tasks).
  • Each affected package pnpm test — green.
  • pnpm lint:deps and per-package biome lint — green.

Note: 3 failing tests in @prisma-next/config-loader (test/load.test.ts, c12 path resolution) are pre-existing on main and unrelated to this change — verified by running that suite on a clean checkout of HEAD. Not addressed here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated test suites to align with revised PSL AST and SQL contract shapes (including helper-based AST construction, readonly type expectations, and safer token/model assertions).
    • Refreshed printer and emitter test fixtures for more consistent inputs (explicit optional qualifier handling, required AST fields, and storage/hash setup).
    • Adjusted relation targets to use cross-references in Mongo and SQL emitter fixtures.
  • Build / Type Checking
    • Expanded TypeScript tsconfig compilation scope to include test/**/*.ts (instead of only src/**/*.ts) across multiple packages.

@wmadden-electric wmadden-electric requested a review from a team as a code owner July 9, 2026 16:46
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 7c327436-0d48-4a31-844b-ca612edde629

📥 Commits

Reviewing files that changed from the base of the PR and between 0a4a5df and 6d4cc78.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (42)
  • packages/1-framework/2-authoring/contract/tsconfig.json
  • packages/1-framework/2-authoring/ids/tsconfig.json
  • packages/1-framework/2-authoring/psl-parser/test/attribute-helpers.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec-combinators.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec.test-d.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/named-type-declaration.test-d.ts
  • packages/1-framework/2-authoring/psl-parser/test/symbol-table.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/syntax/navigation.test.ts
  • packages/1-framework/2-authoring/psl-parser/tsconfig.json
  • packages/1-framework/2-authoring/psl-printer/package.json
  • packages/1-framework/2-authoring/psl-printer/test/fixtures/declarative-policy-select-extension.ts
  • packages/1-framework/2-authoring/psl-printer/test/generic-extension-block-printer.test.ts
  • packages/1-framework/2-authoring/psl-printer/test/print-psl-from-ast.test.ts
  • packages/1-framework/2-authoring/psl-printer/tsconfig.json
  • packages/1-framework/3-tooling/cli/tsconfig.json
  • packages/1-framework/3-tooling/vite-plugin-contract-emit/tsconfig.json
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.generation.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.resolve-field-value-set.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.structure.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.value-set-codec-path.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/fixtures/blog-contract.ts
  • packages/2-mongo-family/3-tooling/emitter/test/fixtures/create-mongo-contract.ts
  • packages/2-mongo-family/3-tooling/emitter/test/generate-orm-fixture.ts
  • packages/2-mongo-family/3-tooling/emitter/tsconfig.json
  • packages/2-sql/1-core/contract/test/contract-typemaps-shape.test.ts
  • packages/2-sql/1-core/contract/test/domain-types.test.ts
  • packages/2-sql/1-core/contract/test/foreign-key-cross-space.test.ts
  • packages/2-sql/1-core/contract/test/resolve-storage-table.test.ts
  • packages/2-sql/1-core/contract/test/sql-storage.test.ts
  • packages/2-sql/1-core/contract/test/storage-column-many.test.ts
  • packages/2-sql/1-core/contract/test/test-support.ts
  • packages/2-sql/1-core/contract/test/validators.test.ts
  • packages/2-sql/1-core/contract/tsconfig.json
  • packages/2-sql/3-tooling/emitter/test/create-emitter-test-contract.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.generation.advanced.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.generation.basic.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.parameterized-types.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.structure.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.types.test.ts
  • packages/2-sql/3-tooling/emitter/test/sql-storage-fixture.ts
  • packages/2-sql/3-tooling/emitter/tsconfig.json
📝 Walkthrough

Walkthrough

This PR expands multiple package tsconfig includes to compile test sources and updates parser, printer, mongo emitter, and sql test fixtures to match revised helper types, storage hashes, relation references, and generated type expectations.

Changes

Test infrastructure and fixture updates

Layer / File(s) Summary
tsconfig include expansion
packages/1-framework/.../tsconfig.json, packages/2-mongo-family/.../tsconfig.json, packages/2-sql/.../tsconfig.json
Multiple tsconfig.json files now include test/**/*.ts; the CLI config also removes rootDir, sets lib: ["ES2024"], and excludes dist.
psl-parser test refactors
packages/1-framework/2-authoring/psl-parser/test/*
Tests use helper constructors, readonly type expectations, bracket-notation lookups, and explicit token assertions.
psl-printer fixtures and tests
packages/1-framework/2-authoring/psl-printer/*
Adds a contract devDependency, adjusts AST inputs for block attributes and conditional qualifier fields, and updates a fixture type to include undefined explicitly.
Mongo emitter test fixtures
packages/2-mongo-family/3-tooling/emitter/test/*
Relation targets now use crossRef, hashes use coreHash/profileHash, malformed fixtures use blindCast, and some generateContractDts call signatures change.
SQL contract test refactors
packages/2-sql/1-core/contract/test/*
SQL contract tests switch to expectTypeOf, namespaced field shapes, bracket-access lookups, coreHash storage hashes, blindCast reconstruction, and contractModel/crossRef helpers.
SQL emitter test fixtures
packages/2-sql/3-tooling/emitter/test/*
Emitter helpers normalize storage and hashes, and emitter-hook tests update relation typing, model fixtures, owner shapes, and generateContractDts signatures.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: wmadden, aqrln

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.05% 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 accurately summarizes the main change: typechecking package test trees and fixing resulting drift.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree/upbeat-clarke-2ca925

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 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-author-tools

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

@prisma-next/mongo-runtime

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

@prisma-next/family-mongo

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

@prisma-next/sql-runtime

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

@prisma-next/family-sql

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

@prisma-next/extension-arktype-json

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

@prisma-next/middleware-cache

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

@prisma-next/mongo

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

@prisma-next/extension-paradedb

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

@prisma-next/extension-pgvector

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

@prisma-next/extension-postgis

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

@prisma-next/postgres

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

@prisma-next/sql-orm-client

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

@prisma-next/sqlite

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

@prisma-next/extension-supabase

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

@prisma-next/target-mongo

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

@prisma-next/adapter-mongo

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

@prisma-next/driver-mongo

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

@prisma-next/contract

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

@prisma-next/utils

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

@prisma-next/config

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

@prisma-next/errors

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

@prisma-next/framework-components

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

@prisma-next/operations

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

@prisma-next/ts-render

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

@prisma-next/contract-authoring

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

@prisma-next/ids

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

@prisma-next/psl-parser

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

@prisma-next/psl-printer

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

@prisma-next/cli

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

@prisma-next/cli-telemetry

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

@prisma-next/config-loader

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

@prisma-next/emitter

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

@prisma-next/language-server

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

@prisma-next/migration-tools

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

prisma-next

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

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

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

@prisma-next/mongo-codec

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

@prisma-next/mongo-contract

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

@prisma-next/mongo-value

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

@prisma-next/mongo-contract-psl

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

@prisma-next/mongo-contract-ts

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

@prisma-next/mongo-emitter

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

@prisma-next/mongo-schema-ir

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

@prisma-next/mongo-query-ast

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

@prisma-next/mongo-orm

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

@prisma-next/mongo-query-builder

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

@prisma-next/mongo-lowering

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

@prisma-next/mongo-wire

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

@prisma-next/sql-contract

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

@prisma-next/sql-errors

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

@prisma-next/sql-operations

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

@prisma-next/sql-schema-ir

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

@prisma-next/sql-contract-psl

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

@prisma-next/sql-contract-ts

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

@prisma-next/sql-contract-emitter

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

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

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

@prisma-next/sql-relational-core

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

@prisma-next/sql-builder

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

@prisma-next/target-postgres

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

@prisma-next/target-sqlite

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

@prisma-next/adapter-postgres

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

@prisma-next/adapter-sqlite

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

@prisma-next/driver-postgres

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

@prisma-next/driver-sqlite

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

commit: 6d4cc78

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

size-limit report 📦

Path Size
postgres / no-emit 153.18 KB (0%)
postgres / emit 128.51 KB (0%)
mongo / no-emit 98.36 KB (0%)
mongo / emit 89.39 KB (0%)
cf-worker / no-emit 180.2 KB (0%)
cf-worker / emit 153.16 KB (0%)

@wmadden-electric wmadden-electric force-pushed the worktree/upbeat-clarke-2ca925 branch from f279f3c to 0a4a5df Compare July 9, 2026 16:58

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

🧹 Nitpick comments (2)
packages/2-mongo-family/3-tooling/emitter/test/generate-orm-fixture.ts (1)

17-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Redundant whole-object as Contract cast undercuts the narrower blindCast fix.

The variable is already declared const contract: Contract = {...}, and domain is already narrow-cast via blindCast. The trailing } as Contract; casts the entire object anyway, which can silently mask type errors on any other field (e.g., roots, storage) that the narrower casts were specifically introduced to avoid.

♻️ Proposed fix
   meta: {},
-} as Contract;
+};

If this still fails to typecheck without the cast, that likely indicates an actual mismatch worth narrowing further (similar to how domain was handled) rather than casting the whole object.

🤖 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-mongo-family/3-tooling/emitter/test/generate-orm-fixture.ts`
around lines 17 - 38, The trailing whole-object cast on the contract fixture
undermines the narrower `blindCast` workaround and can hide real type issues in
`roots`, `storage`, or other fields. Remove the final `as Contract` from the
`contract` object in `generate-orm-fixture.ts`, keep the explicit `const
contract: Contract` annotation, and if typechecking breaks, narrow the specific
mismatching field instead of casting the entire object.
packages/2-mongo-family/3-tooling/emitter/test/fixtures/create-mongo-contract.ts (1)

34-51: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Sibling profileHash literal left unconverted.

storageHash was just migrated to coreHash(...), but profileHash: 'sha256:test' as const (line 49) in the same function remains a raw string, unlike generate-orm-fixture.ts in this cohort which uses profileHash('sha256:orm-profile') for the equivalent field. The trailing } as Contract; on line 51 likely hides any type mismatch here.

♻️ Proposed fix
+import { coreHash, profileHash } from '`@prisma-next/contract/types`';
...
-    profileHash: 'sha256:test' as const,
+    profileHash: profileHash('sha256:test'),

Please confirm whether Contract['profileHash'] is a branded type requiring the profileHash(...) constructor (as storageHash requires coreHash(...)).

🤖 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-mongo-family/3-tooling/emitter/test/fixtures/create-mongo-contract.ts`
around lines 34 - 51, The create-mongo-contract fixture still sets profileHash
as a raw string, unlike the migrated storageHash and the equivalent
generate-orm-fixture helper. Update the createMongoContract fixture to construct
profileHash with the proper profileHash(...) branded constructor (or otherwise
confirm the Contract['profileHash'] type and align with its required factory) so
the returned Contract matches the expected branded type instead of relying on
the final cast.
🤖 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/2-mongo-family/3-tooling/emitter/test/fixtures/create-mongo-contract.ts`:
- Around line 34-51: The create-mongo-contract fixture still sets profileHash as
a raw string, unlike the migrated storageHash and the equivalent
generate-orm-fixture helper. Update the createMongoContract fixture to construct
profileHash with the proper profileHash(...) branded constructor (or otherwise
confirm the Contract['profileHash'] type and align with its required factory) so
the returned Contract matches the expected branded type instead of relying on
the final cast.

In `@packages/2-mongo-family/3-tooling/emitter/test/generate-orm-fixture.ts`:
- Around line 17-38: The trailing whole-object cast on the contract fixture
undermines the narrower `blindCast` workaround and can hide real type issues in
`roots`, `storage`, or other fields. Remove the final `as Contract` from the
`contract` object in `generate-orm-fixture.ts`, keep the explicit `const
contract: Contract` annotation, and if typechecking breaks, narrow the specific
mismatching field instead of casting the entire object.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 177e96ea-e77e-4da0-a84f-abfd0067b423

📥 Commits

Reviewing files that changed from the base of the PR and between 9175ebb and f279f3c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (42)
  • packages/1-framework/2-authoring/contract/tsconfig.json
  • packages/1-framework/2-authoring/ids/tsconfig.json
  • packages/1-framework/2-authoring/psl-parser/test/attribute-helpers.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec-combinators.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec.test-d.ts
  • packages/1-framework/2-authoring/psl-parser/test/attribute-spec.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/named-type-declaration.test-d.ts
  • packages/1-framework/2-authoring/psl-parser/test/symbol-table.test.ts
  • packages/1-framework/2-authoring/psl-parser/test/syntax/navigation.test.ts
  • packages/1-framework/2-authoring/psl-parser/tsconfig.json
  • packages/1-framework/2-authoring/psl-printer/package.json
  • packages/1-framework/2-authoring/psl-printer/test/fixtures/declarative-policy-select-extension.ts
  • packages/1-framework/2-authoring/psl-printer/test/generic-extension-block-printer.test.ts
  • packages/1-framework/2-authoring/psl-printer/test/print-psl-from-ast.test.ts
  • packages/1-framework/2-authoring/psl-printer/tsconfig.json
  • packages/1-framework/3-tooling/cli/tsconfig.json
  • packages/1-framework/3-tooling/vite-plugin-contract-emit/tsconfig.json
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.generation.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.resolve-field-value-set.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.structure.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/emitter-hook.value-set-codec-path.test.ts
  • packages/2-mongo-family/3-tooling/emitter/test/fixtures/blog-contract.ts
  • packages/2-mongo-family/3-tooling/emitter/test/fixtures/create-mongo-contract.ts
  • packages/2-mongo-family/3-tooling/emitter/test/generate-orm-fixture.ts
  • packages/2-mongo-family/3-tooling/emitter/tsconfig.json
  • packages/2-sql/1-core/contract/test/contract-typemaps-shape.test.ts
  • packages/2-sql/1-core/contract/test/domain-types.test.ts
  • packages/2-sql/1-core/contract/test/foreign-key-cross-space.test.ts
  • packages/2-sql/1-core/contract/test/resolve-storage-table.test.ts
  • packages/2-sql/1-core/contract/test/sql-storage.test.ts
  • packages/2-sql/1-core/contract/test/storage-column-many.test.ts
  • packages/2-sql/1-core/contract/test/test-support.ts
  • packages/2-sql/1-core/contract/test/validators.test.ts
  • packages/2-sql/1-core/contract/tsconfig.json
  • packages/2-sql/3-tooling/emitter/test/create-emitter-test-contract.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.generation.advanced.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.generation.basic.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.parameterized-types.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.structure.test.ts
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.types.test.ts
  • packages/2-sql/3-tooling/emitter/test/sql-storage-fixture.ts
  • packages/2-sql/3-tooling/emitter/tsconfig.json
💤 Files with no reviewable changes (1)
  • packages/2-sql/3-tooling/emitter/test/emitter-hook.types.test.ts

Ten packages had a tsconfig that only included src/, so their test files
were never typechecked. Errors in the tests therefore accumulated
silently — the trigger was psl-printer tests constructing
PslExtensionBlock literals without the now-required blockAttributes field.

Align every package tsconfig with the repo convention of including
test/**/*.ts, then fix the ~400 pre-existing type errors this surfaced.
The errors were entirely test-side drift from current IR shapes: storage
fixtures using the removed {tables} shape instead of
namespaces.<id>.entries.table, missing required storageHash, plain
strings where branded NamespaceId/hash types are now required, and
property access on index-signature maps. Fixes use the repo factories and
hash constructors (coreHash/profileHash, crossRef) rather than hand-forced
literals; assertions are unchanged.

cli was config-only: dropped an over-tight rootDir (its test fixtures
import a shared helper across a package boundary by relative path, an
established pattern here) and bumped lib to ES2024 for Promise.withResolvers.

Two genuine test-code bugs surfaced and were fixed: a stray [] argument
in generateContractDts call sites (sql + mongo emitters) and a dev
fixture script with a stale call signature.

No production src/ changed. Verified: repo-root pnpm typecheck (143 tasks)
and each package pnpm test are green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric force-pushed the worktree/upbeat-clarke-2ca925 branch from 0a4a5df to 6d4cc78 Compare July 9, 2026 17:12
@wmadden-electric wmadden-electric added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit 09a6ce0 Jul 10, 2026
21 checks passed
@wmadden-electric wmadden-electric deleted the worktree/upbeat-clarke-2ca925 branch July 10, 2026 07:30
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