Skip to content

spec: a roll-up recomputes on the child's update too - #40

Open
delchev wants to merge 1 commit into
mainfrom
spec/rollup-child-update
Open

spec: a roll-up recomputes on the child's update too#40
delchev wants to merge 1 commit into
mainfrom
spec/rollup-child-update

Conversation

@delchev

@delchev delchev commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Proposal 0021-rollups-recompute-on-child-update.md (proposal-first — versions/ untouched).

1.5 states a roll-up's event set only for the counting case, and states it as create / delete:

A count roll-up keeps a counter on a parent current on the child's create / delete.

Create and delete are not the only ways the set of children of a parent changes. A child changes parents by an ordinary edit of its own parent relation — a task dragged to another sprint, a loan reassigned to another member. No child is created and none destroyed, so on that reading nothing recomputes: the parent that received the child does not count it, the parent that lost it goes on counting it, and both stay wrong until some unrelated child of the same parent happens to be created or deleted.

The proposal makes the event set a property of the construct rather than of the aggregation — create, update and delete for every op — with the affected parent on an update being the one the child names after the edit, and the vacated parent left to a moved-key event where a generator publishes one. aggregates, the keyed sibling, has been normative on exactly this since 1.1.

No new syntax. The Specification text section carries the replacement opening sentence and the new normative paragraph, at the rollups anchor.

Implementation: eclipse-dirigible/dirigible#6820.

🤖 Generated with Claude Code

1.5 states a roll-up's event set only for the counting case, and states it
as create / delete. Create and delete are not the only ways a parent's set
of children changes: a child changes parents by an ordinary edit of its own
parent relation, and on that reading nothing recomputes - the parent that
received the child does not count it and the parent that lost it goes on
counting it.

The proposal makes the event set a property of the construct rather than of
the aggregation: create, update and delete for every op, with the affected
parent on an update being the one the child names after the edit. The
keyed sibling `aggregates` has been normative on exactly this since 1.1.

No new syntax.
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.

1 participant