Skip to content

chore: close the aggregate-pagination project - #30100

Merged
SevInf merged 1 commit into
mainfrom
aggregate-pagination-closeout
Aug 21, 2026
Merged

chore: close the aggregate-pagination project#30100
SevInf merged 1 commit into
mainfrom
aggregate-pagination-closeout

Conversation

@StevenMcClankerton

Copy link
Copy Markdown
Contributor

Closes the aggregate-pagination project and removes its working artifacts. Documentation-only — no source, no tests, no behaviour.

⚠️ Merge order

This must merge after #30098. That PR lands the project's retro learnings into drive/calibration/dod.md and the upgrade-instructions skill. This project produced no long-lived documentation to migrate — the one guide it wrote was deleted on review — so the learnings are its only durable output. Merging this first deletes them.

What the project delivered

.aggregate() silently ignored take / skip / cursor / distinct / distinctOn, reducing over every matching row and returning a confident, wrong number with no signal. groupBy() had the same defect for everything chained before it. Both are fixed, with clause position deciding meaning: before a terminal, clauses shape the rows it reduces; after groupBy(), they page the groups.

Definition of Done

All items met, with one closed as deliberately refused:

  • Root aggregate() honours take/skip/cursor including bare skip, and distinct()/distinctOn()
  • Pre-group clauses scope rows, post-group clauses page groups, both verified with having() present ✅
  • Post-group pagination gated on a prior orderBy in the type state ✅
  • CI-enforced guard that an unpaginated aggregate's compiled AST is unchanged — the baseline snapshot is byte-identical across every commit of both slices ✅
  • Integration tests assert values, not plan shape, on PGlite and SQLite for each chain position ✅
  • test/aggregate-pagination.test.ts free of it.fails
  • No new ORM error subcode ✅
  • Position rule documented where a user meets it — closed as refused. Both halves were rejected on operator review: TSDoc as restating the signatures, and a reference guide as unwarranted for what is a bug fix. The changelog entries in v8.0.0-rc.5.md carry the user-facing notice.

Spun out, not dropped

#30099 fixes enum ORDER BY / DISTINCT ON losing declaration order behind any derived table. Manual QA found it through the grouped path, but it is pre-existing and wider.distinct().orderBy(enumCol) has had it since wrapWithRowNumberDedup first aliased a derived table back to its base name. It ships separately, before rc.5 is cut, so no released version exposes the new route unfixed.

Notes

Two findings were deliberately not ticketed, per standing direction on QA follow-ups: an empty TSDoc hover at the never-narrowing error site (cursor() behaves identically, so it is a house-level property, not a slice regression), and the demo's namespaced contract requiring db.orm.<ns>.<Model> where flat-namespace examples use db.orm.<Model>.

🤖 Generated with Claude Code

Both slices merged (#30067, #30092). Retro learnings landed separately
in #30098 — this must merge after it, since the learnings are the
project's only durable output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Steven McClankerton <tatarintsev@prisma.io>
@StevenMcClankerton
StevenMcClankerton requested a review from a team as a code owner August 21, 2026 15:21
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (23)
  • projects/aggregate-pagination/learnings.md is excluded by !projects/**
  • projects/aggregate-pagination/plan.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/01-baseline-snapshot.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/02-lift-row-scope.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/03-root-pagination.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/04-root-distinct.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/04b-variant-join.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/04c-distincton-capability-gate.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/05-integration-values.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/05b-sqlite-offset-renderer.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/dispatches/06-tsdoc-position-semantics.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/manual-qa-reports/2026-08-18-qa-runner.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/manual-qa.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/plan.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/slice-close.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/aggregate-row-scope/spec.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/grouped-pagination/manual-qa.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/grouped-pagination/plan.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/grouped-pagination/pr-description.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/grouped-pagination/qa-run-1.md is excluded by !projects/**
  • projects/aggregate-pagination/slices/grouped-pagination/spec.md is excluded by !projects/**
  • projects/aggregate-pagination/spec.md is excluded by !projects/**
  • projects/aggregate-pagination/trace.jsonl is excluded by !projects/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: ce3a2716-db32-47df-b9cc-d29cf7290287

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@SevInf
SevInf added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit dd6c12b Aug 21, 2026
19 checks passed
@SevInf
SevInf deleted the aggregate-pagination-closeout branch August 21, 2026 16:21
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