Skip to content

v8.0.0-rc.17-dev.35

@StevenMcClankerton StevenMcClankerton tagged this 13 Oct 13:57
## Linked issue

n/a — no Linear ticket. Closes out the cross-namespace inheritance
project, delivered in #30577, #30646 and #30696.

## Summary

Closes the project in the team's process docs. The project's working
folder was never committed, so there is nothing to migrate or delete in
the repo.

## What changes

- **`drive/calibration/dod.md`: the project-DoD item "Artefact-format
changes load the previous format" is removed.** It contradicts
`.agents/rules/no-backward-compatibility.mdc`, and it is where this
project's spec got a "released contracts stay loadable" requirement that
was later dropped. The mitigation bullet in `failure-modes.md` (second
F20) that repeated it is removed too.
- **`drive/calibration/failure-modes.md`: one new entry, F49.** Guards,
helpers and tests are written for inputs the public API cannot produce,
then removed.

## Project definition of done

| Item | Result | Evidence |
| --- | --- | --- |
| An authored and emitted cross-namespace MTI contract loads and
executes reads and supported writes against distinct namespaces | Met |
#30696,
`test/integration/test/sql-orm-client/polymorphism-namespaces.test.ts` |
| One base tells same-named derived models in different namespaces apart
by discriminator value; equal table names across namespaces are treated
as MTI | Met | #30696, same test file and its type tests (`b.Epic` /
`c.Epic`, `a.tasks` / `b.tasks`) |
| Reads, includes, prepared queries, aggregation and supported mutations
keep qualified identity and assert complete rows | Met | #30696 |
| Type tests in both ORMs for variant inference and for rejecting model
names, undeclared values and non-polymorphic receivers | Met | #30577 |
| Duplicate discriminator values are rejected by SQL and Mongo authoring
and cannot be expressed in a contract | Met | #30577 (authoring), #30696
(value-keyed `variants`) |
| Zero-argument custom helpers return precisely typed variant
collections | Met | #30577 |
| Same-namespace STI/MTI and Mongo polymorphism regression suites pass |
Met | CI on #30696 |
| A variant entry that is not a `CrossReference` is rejected by
structural validation in both families | Met | #30696 |
| Consumers, fixtures, docs, upgrade instructions and ADR examples
describe the implemented behaviour | Met | #30577, #30646, #30696 (ADR
173, ADR 177, ADR 265, upgrade fragments) |
| Final retro | Done | F49 in this PR |
| ADR audit | Done | The contract decision (variants keyed by
discriminator value, referencing the variant by coordinate) is in ADR
173. The SQL ORM's table scope is described in the `sql-orm-client`
README. |
| Manual QA script and run report per slice | **Waived by the project
owner.** | No manual QA was run. The evidence is the automated suites,
including database tests. |
| Linear close-out items | n/a | The project had no Linear project. |

## Known gaps the project found and did not fix

These exist on `main`. None has a ticket.

SQL ORM:
- Single-row `update()` and `delete()` on a multi-table variant return
only the base table's fields, although the type promises the variant
row.
- `updateAll` / `deleteAll` with a filter on a multi-table variant's
field do not join the variant table.
- Cursor pagination ordered by a multi-table variant's field binds the
column to the base table.
- `create()` with nested relation callbacks on a variant collection
skips the variant insert.
- `createAll` on a multi-table variant runs each row in its own
transaction.
- `aggregate()` cannot reduce over a variant's field.
- `select()` types do not accept a variant's field names, although they
are read at run time.
- `select()` is not scoped to the collection's namespace when two models
in a contract share a name.
- A base model's relation cannot be included after `variant()` in the
types, although it works at run time.
- A required field on a single-table variant is optional in that
variant's create input.
- The value a grouped `having` comparison is checked against is written
into the SQL text without codec encoding.
- Projected column labels (`<alias>__<column>`) are not bounded to the
63-byte identifier limit.
- Custom collection classes require a single-namespace contract.

Mongo ORM:
- `variant()` narrows only create inputs. Read results, `where()`,
`select()` and include keys stay typed against the base model, and a
relation declared on a variant cannot be included.

Upgrade path:
- Users with polymorphic models rewrite existing migration snapshots by
a rule given in the upgrade instructions; no command does it.
- Four superseded example migration snapshots (two in
`examples/prisma-8-demo`, two in `examples/retail-store`) are still in
the previous `variants` form. Nothing loads them.

## Testing performed

Docs only. `pnpm lint:rules`, `pnpm lint:rules:symlinks` and `pnpm
lint:skills` pass.

## Skill update

n/a — internal only (team process docs under `drive/`).

## Checklist

- [x] All commits are signed off (`git commit -s`) per the
[DCO](../CONTRIBUTING.md#developer-certificate-of-origin-dco). The DCO
status check will block merge if any commit is missing a
`Signed-off-by:` trailer.
- [x] I read [CONTRIBUTING.md](../CONTRIBUTING.md) and the change is
scoped to one logical concern.
- [x] Tests are updated (or `n/a` if the change is doc-only / refactor
with no behavioural delta). n/a — doc-only.
- [ ] The PR title is in `TML-NNNN: <sentence-case title>` form. — Not
ticked: there is no Linear ticket.
- [x] The **Skill update** section above is filled in (or stated `n/a —
internal only`).

## Notes for the reviewer

The removal of the definition-of-done item is the part to read: it takes
out a rule added on 2026-09-10.

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


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

## Summary by CodeRabbit

* **Documentation**
* Updated project guidance for format changes, removing requirements to
test compatibility with artifacts from a previous release.
* Added guidance to avoid safeguards and related work for inputs that
cannot arise through a supported public call path.

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

---------

Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
Co-authored-by: Steven McClankerton <tatarintsev@prisma.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Assets 2
Loading