Skip to content

named groups: concurrent self-leave of the last two members leaves a live zero-member group with no withdrawal tombstone #372

Description

@dirvine

Pre-existing race surfaced while reviewing PR #370 (#369 sole-member delete).

leave_disposition is evaluated once per daemon on its own roster snapshot. Two-admin (or admin+member) group, both DELETE /groups/:id inside the same window: each sees a 2-member roster → Proceed → emits MemberRemoved(self), does groups.remove(&id), stops its listener. The peer's MemberRemoved is rejected on arrival (group absent, named_groups.rs ~:6149); third parties see a PrevHashMismatch on one of the two. Nobody ever seals a withdrawn commit, so the public discovery card and relay caches keep advertising a live zero-member group with no anti-resurrection record.

Options: (a) the second-to-last leaver's MemberRemoved apply on a daemon that just left should still be able to seal a withdrawal for a now-empty roster; (b) a third party (relay/any member applying the commit log) that observes the roster reach zero seals the tombstone; (c) document as accepted and let discovery cards age out. ADR-0016's #369 amendment must describe the real behaviour, not a convergence guarantee the code doesn't provide.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:P2Normal priority: confirmed defect or remaining feature work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions