Skip to content

docs: close out cross-namespace inheritance - #30712

Merged
SevInf merged 3 commits into
mainfrom
close-cross-namespace-inheritance
Oct 13, 2026
Merged

SevInf merged 3 commits into
mainfrom
close-cross-namespace-inheritance

Conversation

@StevenMcClankerton

@StevenMcClankerton StevenMcClankerton commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • All commits are signed off (git commit -s) per the DCO. The DCO status check will block merge if any commit is missing a Signed-off-by: trailer.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • 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.
  • 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

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.

SevInf and others added 2 commits October 13, 2026 12:24
Adds the 2026-10-13 catalogue entry and the places each lesson is
recorded: failure modes F49 (a spec requirement that contradicts a repo
rule), F50 (guards for inputs the public API cannot produce) and F51 (a
merge of main with no textual conflict fails typecheck), a sizing
reference pattern, a spec-authoring check and a slice-close item.

Signed-off-by: Steven McClankerton <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Project-DoD item and the F20 mitigation told the loader to accept
the previous artefact format, which contradicts
.agents/rules/no-backward-compatibility.mdc. Both now state a hard cut:
tracked artefacts are re-emitted in the same PR and the PR ships upgrade
instructions. F49 and the 2026-10-13 catalogue entry record that the
spec requirement came from that item.

Signed-off-by: Steven McClankerton <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@StevenMcClankerton
StevenMcClankerton requested a review from a team as a code owner October 13, 2026 13:36
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: prisma/orm/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9eecf284-a2fc-46f8-98c2-fb565e039f47
📥 Commits

Reviewing files that changed from the base of the PR and between a5b9fe4 and b05ccf3.

📒 Files selected for processing (2)
  • drive/calibration/dod.md
  • drive/calibration/failure-modes.md
💤 Files with no reviewable changes (1)
  • drive/calibration/dod.md

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

The pull request removes guidance requiring prior-format artifact load tests and adds F49 guidance that ties safeguards and documentation caveats to inputs reachable through supported public calls.

Changes: Process guidance

Layer / File(s) Summary
Check supported call paths
drive/calibration/failure-modes.md
F49 directs briefs and reviewers to identify a supported public call path before requesting guards, tests, or documentation caveats for an input.
Remove prior-format load-test requirements
drive/calibration/dod.md, drive/calibration/failure-modes.md
The DoD overlay and F20 mitigation no longer require tests that load artifacts from a previous format or release.

Priority: ⬇️ Low

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

Change: Other

Suggested reviewers: wmadden

Merge Risk: ⚪ Minimal · up to b05cc

This documentation-only change narrows review guidance and removes a blanket compatibility-test requirement; supported-path and marker-schema requirements remain. No material merge risk is identified.

### Architecture Summary

Architecture risk: 🔵 Low · up to b05cc

The change affects 1 system.

Changed systems: drive

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — drive (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in drive/calibration/dod.md: Removed the project overlay requiring artefact-format changes to test loading a real artefact from the previous release and to derive or default new fields rather than reject older files. The removed item also stated that migration snapshots are written once and not regenerated by users.
  • observed — Modified behavior in drive/calibration/failure-modes.md: Removed the F20 mitigation requiring a previous-format artefact load test when schema or artefact formats change.
  • observed — Modified behavior in drive/calibration/failure-modes.md: Added F49, describing additions aimed at inputs unreachable through supported public calls. It directs briefs and reviewers to name the call path before requesting a guard, test, or documentation caveat; if no such path exists, these additions are omitted.
Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies this as documentation work that closes out the cross-namespace inheritance project. It matches the documented scope, including the DoD and failure-mode updates.
✨ Finishing Touches
🧪 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.

Comment thread drive/calibration/dod.md Resolved
Comment thread drive/calibration/dod.md Resolved
Comment thread drive/calibration/failure-modes.md Resolved
Comment thread drive/calibration/failure-modes.md Resolved
Comment thread drive/calibration/failure-modes.md Resolved
Comment thread drive/calibration/sizing.md Resolved
Comment thread drive/retro/README.md Resolved
Comment thread drive/spec/README.md Resolved
@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

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

@prisma/orm-extension-middleware-cache

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

@prisma/orm-extension-paradedb

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

@prisma/orm-extension-pgvector

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

@prisma/orm-extension-postgis

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

@prisma/orm-extension-supabase

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

@prisma/orm-family-mongo

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

@prisma/orm-family-sql

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

@prisma/orm-framework

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

@prisma/orm-mongo

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

@prisma/orm-postgres

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

@prisma/orm-sqlite

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

@prisma/orm-target-mongo

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

@prisma/orm-target-postgres

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

@prisma/orm-target-sqlite

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

@prisma/orm-toolchain

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

commit: b05ccf3

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 243.7 KB (0%)
postgres / emit 215.3 KB (0%)
mongo / no-emit 199.8 KB (0%)
mongo / emit 177.63 KB (0%)
cf-worker / no-emit 303.67 KB (0%)
cf-worker / emit 272.17 KB (0%)

Removes the catalogue entry, the sizing reference pattern, the
spec-authoring check, the slice-close merge item and the failure modes
for spec requirements and merges of main. Removes the artefact-format
item from the Project-DoD overlay and the matching F20 mitigation
bullet. The remaining new failure mode is renumbered to F49.

Signed-off-by: Steven McClankerton <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@StevenMcClankerton StevenMcClankerton changed the title docs: close out cross-namespace inheritance; a changed artefact format is a hard cut docs: close out cross-namespace inheritance Oct 13, 2026
@SevInf
SevInf enabled auto-merge October 13, 2026 13:42
@SevInf
SevInf added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 6e028a2 Oct 13, 2026
24 checks passed
@SevInf
SevInf deleted the close-cross-namespace-inheritance branch October 13, 2026 14:13
kpostekk pushed a commit to kpostekk/orm that referenced this pull request Oct 14, 2026
## Linked issue

n/a — no Linear ticket. Closes out the cross-namespace inheritance
project, delivered in prisma#30577, prisma#30646 and prisma#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 |
prisma#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 | prisma#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 | prisma#30696 |
| Type tests in both ORMs for variant inference and for rejecting model
names, undeclared values and non-polymorphic receivers | Met | prisma#30577 |
| Duplicate discriminator values are rejected by SQL and Mongo authoring
and cannot be expressed in a contract | Met | prisma#30577 (authoring), prisma#30696
(value-keyed `variants`) |
| Zero-argument custom helpers return precisely typed variant
collections | Met | prisma#30577 |
| Same-namespace STI/MTI and Mongo polymorphism regression suites pass |
Met | CI on prisma#30696 |
| A variant entry that is not a `CrossReference` is rejected by
structural validation in both families | Met | prisma#30696 |
| Consumers, fixtures, docs, upgrade instructions and ADR examples
describe the implemented behaviour | Met | prisma#30577, prisma#30646, prisma#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 <[email protected]>
Co-authored-by: Steven McClankerton <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
kpostekk pushed a commit to kpostekk/orm that referenced this pull request Oct 14, 2026
## Linked issue

n/a — no Linear ticket. Closes out the cross-namespace inheritance
project, delivered in prisma#30577, prisma#30646 and prisma#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 |
prisma#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 | prisma#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 | prisma#30696 |
| Type tests in both ORMs for variant inference and for rejecting model
names, undeclared values and non-polymorphic receivers | Met | prisma#30577 |
| Duplicate discriminator values are rejected by SQL and Mongo authoring
and cannot be expressed in a contract | Met | prisma#30577 (authoring), prisma#30696
(value-keyed `variants`) |
| Zero-argument custom helpers return precisely typed variant
collections | Met | prisma#30577 |
| Same-namespace STI/MTI and Mongo polymorphism regression suites pass |
Met | CI on prisma#30696 |
| A variant entry that is not a `CrossReference` is rejected by
structural validation in both families | Met | prisma#30696 |
| Consumers, fixtures, docs, upgrade instructions and ADR examples
describe the implemented behaviour | Met | prisma#30577, prisma#30646, prisma#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 <[email protected]>
Co-authored-by: Steven McClankerton <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Signed-off-by: Krystian Postek <[email protected]>
kpostekk pushed a commit to kpostekk/orm that referenced this pull request Oct 14, 2026
## Linked issue

n/a — no Linear ticket. Closes out the cross-namespace inheritance
project, delivered in prisma#30577, prisma#30646 and prisma#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 |
prisma#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 | prisma#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 | prisma#30696 |
| Type tests in both ORMs for variant inference and for rejecting model
names, undeclared values and non-polymorphic receivers | Met | prisma#30577 |
| Duplicate discriminator values are rejected by SQL and Mongo authoring
and cannot be expressed in a contract | Met | prisma#30577 (authoring), prisma#30696
(value-keyed `variants`) |
| Zero-argument custom helpers return precisely typed variant
collections | Met | prisma#30577 |
| Same-namespace STI/MTI and Mongo polymorphism regression suites pass |
Met | CI on prisma#30696 |
| A variant entry that is not a `CrossReference` is rejected by
structural validation in both families | Met | prisma#30696 |
| Consumers, fixtures, docs, upgrade instructions and ADR examples
describe the implemented behaviour | Met | prisma#30577, prisma#30646, prisma#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 <[email protected]>
Co-authored-by: Steven McClankerton <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Signed-off-by: Krystian Postek <[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