Repository navigation
TML-3765, TML-3766: Two package tests that fail on main pass again - #30901
Conversation
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]>
|
No actionable comments were generated in the recent review.
|
| 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:
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: 
5
-
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.
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-mysql
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-mysql
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
size-limit report 📦
|
`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]>
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.The contract package's
missing-property-readstest (Node 26)answerMissingPropertyReadsreturns a proxy over the field helpers. The test comparedutil.inspect(helpers)with the exact string{ column: [Function: column] }. Node 26 prints any proxy asProxy({ ... }), even withshowProxy: false, so the comparison fails there. CI runs Node 24, which prints the bare object, so CI passed.inspectnever 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.ingestedAtto be aDate. The contract declaresingestedAt DateTime(as: temporal). Before #30847 it was the bareDateTime, which then meant the Temporal type, and #30847 addedas: temporalon purpose so the column stayed the same. The row holds aTemporal.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 globalTemporal(the Postgres target supplies a polyfill), and the app does not depend on the polyfill, so the test cannot usetoBeInstanceOf(Temporal.Instant). The tag is set by the Temporal spec. ADategives[object Date]and fails.Testing
main(Node 26.8.1) and pass with this change.pnpm test --coverage,pnpm lintandpnpm typecheckpass inpackages/1-framework/2-authoring/contractandapps/telemetry-backend.Alternatives considered
{ showProxy: false }toinspect. Node 26 still printsProxy(...)with it.ingestedAttoDateTimeso it reads aDate. That changes the column type totimestamptz(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 readsingestedAt, so there is no reason to.ingestedAtwith the test's clock. It would also check thenow()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