Nordhavn / specs / convene / core / GroupRevision

convene / coredata

GroupRevision

Purpose

One immutable epoch of a group's membership. A group never edits its membership: every change — a member brought in, a member taken out — mints a new revision with a fresh key, and the old revision stands untouched. Access is bounded by epoch: members hold exactly the keys of the epochs they belong to, so a removed member keeps what they could already read and gets nothing after, and a new member gets the new epoch and nothing before. The founding revision begins its lineage: its id is the lineage itself, and it has no parent.

Attributes

Invariants

Scenarios

A founding revision begins its lineage

Given: revision id "g-7421", lineage "g-7421", no parent, key id "k-0142", created by "anne.bruun", and members "anne.bruun" When: a GroupRevision is created Then: it is accepted as the founding revision of lineage "g-7421" with "anne.bruun" its sole member

A successor names its parent

Given: revision id "g-7421.2", lineage "g-7421", parent "g-7421", key id "k-0150", created by "anne.bruun", and members "anne.bruun" and "sofie.lind" When: a GroupRevision is created Then: it is accepted with parent "g-7421" and both members

A founding revision under a different id is rejected

Given: revision id "g-7421.1", lineage "g-7421", no parent, key id "k-0142", created by "anne.bruun", and members "anne.bruun" When: a GroupRevision is created Then: the creation is rejected because a founding revision carries its lineage as its own id

A creator outside the membership is rejected

Given: revision id "g-7421", lineage "g-7421", no parent, key id "k-0142", created by "anne.bruun", and members "sofie.lind" When: a GroupRevision is created Then: the creation is rejected because the creator is not among the members

spoken of by