Skip to content

test: add coverage for storage-entry-schemas.ts narrow validation - #30184

Open
EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-entry-schemas-coverage
Open

test: add coverage for storage-entry-schemas.ts narrow validation#30184
EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-entry-schemas-coverage

Conversation

@EmaToplek

@EmaToplek EmaToplek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for the .narrow() validation callback on StorageColumnSchema in packages/2-sql/1-core/contract/src/ir/storage-entry-schemas.ts, covering:

  • the typeParams/typeRef mutual-exclusivity check

  • the noCheck array non-empty requirement

  • the noCheck sorted/unique-ascending requirement

  • storage-entry-schemas.ts: 100% statements/branches/functions/lines (up from 73%/38%/100%/76%)

Related to the M9 target-extensible-IR coverage gap noted in coverage.config.json (TML-2521).

Summary by CodeRabbit

  • Tests
    • Added coverage for validating SQL storage column definitions.
    • Confirmed valid configurations using type parameters, type references, and properly ordered unique exemptions.
    • Added checks that reject conflicting type fields, empty exemption lists, unsorted values, and duplicates.

Signed-off-by: EmaToplek <toplek.ema0213@outlook.com>
@EmaToplek
EmaToplek requested a review from a team as a code owner September 1, 2026 07:24
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Team

Run ID: ecb5120d-442d-4c68-8039-54db1d4a8b26

📥 Commits

Reviewing files that changed from the base of the PR and between 5e0f135 and 39ebe3c.

📒 Files selected for processing (1)
  • packages/2-sql/1-core/contract/test/storage-entry-schemas.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Storage schema validation

Layer / File(s) Summary
Storage column validation tests
packages/2-sql/1-core/contract/test/storage-entry-schemas.test.ts
Adds tests for valid typeParams, typeRef, and noCheck values. Adds rejection tests for conflicting type fields, empty arrays, unsorted kinds, and duplicates.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 39ebe

This change adds focused tests for existing storage schema validation behavior and does not alter production behavior; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: aqrln

🚥 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. 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 identifies the test change and the .narrow() validation coverage added for storage-entry-schemas.ts.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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