Skip to content

TML-3765, TML-3766: Two package tests that fail on main pass again - #30901

Merged
wmadden merged 1 commit into
mainfrom
bot/fix-main-failing-tests
Oct 29, 2026
Merged

wmadden merged 1 commit into
mainfrom
bot/fix-main-failing-tests

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

Fixes TML-3765 and TML-3766.

Summary

Two package tests failed on main. In both, the test was wrong and the code was right, so only the tests change.

FAIL test/missing-property-reads.test.ts > leaves the object plain: its prototype, keys, copies and inspection
-   "{ column: [Function: column] }",
+   "Proxy({ column: [Function: column] })",

FAIL test/handler.test.ts > accepts events carrying the required-set, optional fields, ...
AssertionError: expected Temporal.Instant{ ... } to be an instance of Date

The contract package's missing-property-reads test (Node 26)

answerMissingPropertyReads returns a proxy over the field helpers. The test compared util.inspect(helpers) with the exact string { column: [Function: column] }. Node 26 prints any proxy as Proxy({ ... }), even with showProxy: false, so the comparison fails there. CI runs Node 24, which prints the bare object, so CI passed.

inspect never runs a proxy's traps on either version, so the check can only test that printing the helpers shows their contents. It now asserts that the output contains { column: [Function: column] }. That passes on Node 24 and 26 and still fails if inspection stops showing the helpers.

The telemetry backend's ingestedAt (TML-3766)

The handler test expected row.ingestedAt to be a Date. The contract declares ingestedAt DateTime(as: temporal). Before #30847 it was the bare DateTime, which then meant the Temporal type, and #30847 added as: temporal on purpose so the column stayed the same. The row holds a Temporal.Instant, so the test was stale.

The test now checks the value's type tag, Object.prototype.toString.call(row.ingestedAt) === '[object Temporal.Instant]'. Node has no global Temporal (the Postgres target supplies a polyfill), and the app does not depend on the polyfill, so the test cannot use toBeInstanceOf(Temporal.Instant). The tag is set by the Temporal spec. A Date gives [object Date] and fails.

Testing

  • Both tests fail on unchanged main (Node 26.8.1) and pass with this change.
  • pnpm test --coverage, pnpm lint and pnpm typecheck pass in packages/1-framework/2-authoring/contract and apps/telemetry-backend.

Alternatives considered

  • Pass { showProxy: false } to inspect. Node 26 still prints Proxy(...) with it.
  • Change ingestedAt to DateTime so it reads a Date. That changes the column type to timestamptz(3), needs a migration and a deploy of the telemetry backend, and reverses what TML-3712: PostgreSQL gets convenience types DateTime, Date, Time and Duration, and the tools write them #30847 chose to keep. Nothing in the app reads ingestedAt, so there is no reason to.
  • Compare ingestedAt with the test's clock. It would also check the now() default, but the database clock can differ from the test's, which could make the test flaky.

Agent: zeno-78

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated validation for accepted telemetry events to recognize the timestamp representation used by the system.
    • Adjusted inspection-output checks to verify expected text without requiring an exact match of the entire output.

The contract package's missing-property-reads test compared util.inspect output
exactly. Node 26 prints a proxy as "Proxy({ ... })" whatever showProxy is set
to, so it now checks that the output shows the object's contents.

The telemetry backend's handler test expected ingestedAt to be a Date. The
contract declares it DateTime(as: temporal), so the row holds a
Temporal.Instant; the test now checks for that.

Co-Authored-By: Claude Opus 5.5 <[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 October 29, 2026 14:25
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 50f6c74 and be38ec3.

Files selected for processing: 2
  • apps/telemetry-backend/test/handler.test.ts
  • packages/1-framework/2-authoring/contract/test/missing-property-reads.test.ts

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

Walkthrough

Two test assertions change: one checks the stored timestamp’s object tag, and the other accepts an inspection string containing the expected property output.

Changes: Telemetry ingestion test

Layer / File(s) Summary
Ingestion timestamp assertion
apps/telemetry-backend/test/handler.test.ts
The accepted-event test checks that row.ingestedAt has the object tag [object Temporal.Instant] instead of asserting it is a Date.

Authoring contract test

Layer / File(s) Summary
Inspection output assertion
packages/1-framework/2-authoring/contract/test/missing-property-reads.test.ts
The inspection expectation uses expect.stringContaining for { column: [Function: column] } instead of an exact string match.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: tensordreams

Merge Risk: Minimal · up to be38e

No application behavior changes or unresolved review risks were identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two tests and says they pass again after failing on main. The changeset edits two test files: the contract package's missing-property-reads test and the telemetry backend's handler…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Title check

Explanation

The title names the two tests and says they pass again after failing on main. The changeset edits two test files: the contract package's missing-property-reads test and the telemetry backend's handler test. Both edits change assertions to match Node 26 behavior and Temporal.Instant typing. The title does not name the specific mechanisms (Proxy wrapping of inspect output, Temporal.Instant type check), but it identifies the change accurately at a suitable level of detail. Ticket IDs in the title add no description, but the rest of the title still states the main change.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-arktype-json@30901

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-middleware-cache@30901

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-paradedb@30901

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-pgvector@30901

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-postgis@30901

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-extension-supabase@30901

@prisma/orm-family-mongo

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-family-mongo@30901

@prisma/orm-family-sql

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-family-sql@30901

@prisma/orm-framework

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-framework@30901

@prisma/orm-mongo

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

@prisma/orm-mysql

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-mysql@30901

@prisma/orm-postgres

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-postgres@30901

@prisma/orm-sqlite

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-sqlite@30901

@prisma/orm-target-mongo

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-target-mongo@30901

@prisma/orm-target-mysql

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-target-mysql@30901

@prisma/orm-target-postgres

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-target-postgres@30901

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-target-sqlite@30901

@prisma/orm-toolchain

npm i https://pkg.pr.new/prisma/orm/@prisma/orm-toolchain@30901

commit: be38ec3

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 276.69 KB (0%)
postgres / emit 241.81 KB (0%)
mongo / no-emit 226.81 KB (0%)
mongo / emit 184.59 KB (0%)
cf-worker / no-emit 339.58 KB (0%)
cf-worker / emit 300.73 KB (0%)

@wmadden
wmadden added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit f440022 Oct 29, 2026
24 checks passed
@wmadden
wmadden deleted the bot/fix-main-failing-tests branch October 29, 2026 16:03
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-prisma__orm that referenced this pull request Oct 30, 2026
`8.0.0-rc.21` → `8.0.0-rc.22`. See
[versioning](https://github.com/prisma/orm/blob/main/docs/oss/versioning.md).

**Publishing was broken and is fixed.** From 23 October every `Publish
to npm` run on `main` failed with `ENEEDAUTH` on three packages that had
never been on npm: `@prisma/orm-mysql`, `@prisma/orm-target-mysql`
(prisma#30856) and `@prisma/orm-postgres-contrib` (prisma#30904). Trusted publishing
cannot authenticate a package that does not exist yet. They were
published once by hand and given a trusted publisher; the re-run of run
41053844815 then published all three from CI. The failed runs had also
skipped the rc.21 git tag and GitHub Release, which the upgrade-coverage
check needs to find the previous release.
[`v8.0.0-rc.21`](https://github.com/prisma/orm/releases/tag/v8.0.0-rc.21)
now exists at the rc.21 release commit `fad17c1d03`.

**Merging this PR ships the release.** The push to `main` carries the
new root version. The `Publish to npm` workflow then publishes
`8.0.0-rc.22` under the `latest` dist-tag and creates a pre-release
GitHub Release.

## What to review

- **Release notes:**
[`docs/releases/v8.0.0-rc.22.md`](https://github.com/prisma/orm/blob/release/8.0.0-rc.22/docs/releases/v8.0.0-rc.22.md),
mirrored in `CHANGELOG.md`. Seven breaking changes: the PostgreSQL
convenience date and time types (prisma#30847), value objects in storage
(prisma#30869), the MongoDB execution context (prisma#30865), the MongoDB driver
descriptor (prisma#30906), packs declaring their Postgres extension (prisma#30902),
one installed copy of Prisma ORM (prisma#30883) and merged MongoDB indexes
(prisma#30894). Six features and two fixes. The notes leave out prisma#30728
(telemetry backend), prisma#30891 (CI), prisma#30901 (tests), and prisma#30862, prisma#30895,
prisma#30897 and prisma#30898 (docs only).
- **Upgrade guides:**
`skills/prisma-8/upgrading/{app,extension}/upgrades/8.0.0-rc.21-to-8.0.0-rc.22/instructions.md`,
assembled from the fifteen pending fragments (the fifteenth, from
prisma#30918, declares no change). The app guide has 19 changes plus the
Supabase restamp, opens with the order to do the steps in, and ships one
script (`value-objects-in-storage`). The extension guide has 16 changes.
None was dropped. The originals are archived unchanged under
`upgrade-instructions/releases/8.0.0-rc.21-to-8.0.0-rc.22/sources/`.
- **Corrections made while assembling:**
- `mongo-runtime-takes-adapter` said `createMongoExecutionStack()` no
longer takes a `driver`. prisma#30906, merged later, gave it one back, and the
driver entry tells you to pass it. The entry now says what `main` does,
and its detection no longer flags a stack built with a driver.
- The convenience types entry now says to leave a `DateTime(as: ...)`
field alone, and the step order renames the old types before rewriting
the `temporal.*` aliases. Otherwise an agent would rename the
`DateTime(as: temporal)` the alias table writes.
- References to "this release's guide" now name the rc.20 → rc.21 guide
they meant.
- **Tests:** the upgrade-instruction tests read the published guides and
script. The `value-objects-in-storage` tests no longer call live
framework code: the two tests that checked the fixtures against this
release's serializers are removed, and the one hash they computed is a
recorded constant.
- **Version bump:** every `package.json`, `pnpm-lock.yaml` (workspace
specifiers only), the skill's `library_version`, and the Supabase
contract version stamps.

## Checks run locally

- `check:upgrade-coverage --mode publish --prev fad17c1 --head HEAD`:
pass. The `--mode pr` form CI runs passes now that the tag exists.
- `check:release-notes --mode pr`: pass
- `lint:skills`: pass
- `test/upgrade-instructions`: 102 files, 1,980 tests pass

The prisma/web docs PR follows once this is published.

Agent: paddington-54

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added repeatable client `connect()` behavior, PostgreSQL extension
declarations and additional types, plus MySQL ORM and SQL-builder read
support.
* **Breaking Changes**
* PostgreSQL date/time defaults and types, value-object storage, MongoDB
APIs and indexes, and extension-pack migrations have changed. Review the
upgrade guidance before updating.
* **Bug Fixes**
* Improved precision for PostgreSQL `now()` values and clarified Prisma
7 `@db.*` diagnostics.
* **Documentation**
  * Added Prisma 8.0.0-rc.22 release notes and upgrade instructions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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