---
library: "bootstrap"
slug: "Rally"
name: "Rally"
ref: "Rally#3ef1"
hash: "sema:Rally#mh:SHA-256:3ef1a658874f6a5333a43d3362227b9ae446ee11e78868a33678cdf064b8fb35"
type: "Coordination"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Rally"
---

# Rally

Enable ad-hoc multi-party coordination

Society · Coordination

## Mechanism

Ad-hoc group-formation [Protocol](https://semahash.org/vocabularies/bootstrap/patterns/Protocol.md). An initiator broadcasts RALLY with group requirements encoded as an [AcceptSpec](https://semahash.org/vocabularies/bootstrap/patterns/AcceptSpec.md), participant [Criteria](https://semahash.org/vocabularies/bootstrap/patterns/Criteria.md), `deadline`, `min_participants`, and `max_participants`. Responders submit tentative ENLIST messages. Before `deadline`, the initiator closes ENLIST intake, executes [Select](https://semahash.org/vocabularies/bootstrap/patterns/Select.md) over the responders using the participant criteria with `limit = max_participants`, sends MUSTER to those selected, and collects confirmations. Confirmation closes when every selected responder has replied or at `deadline`; only selected responders who confirm by then count toward `min_participants`. Rally then yields one [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) whose `outcome_id` identifies this Rally run. If fewer than `min_participants` confirmed, `outcome.value` records `{status: dissolved, confirmed_participants}` and no `context_id`. Otherwise the initiator mints a fresh `context_id`; `outcome.value` records `{status: formed, confirmed_participants, context_id}`, and every confirmed participant receives that same `context_id`.

## Invariants

- `2 <= min_participants <= max_participants <= 10000`.
- Exactly one [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) is yielded per Rally run, and its `outcome_id` identifies that run.
- `outcome.value.confirmed_participants` contains exactly the responders selected under [Criteria](https://semahash.org/vocabularies/bootstrap/patterns/Criteria.md) who confirmed before MUSTER confirmation closed.
- `outcome.value.status` is `formed` if and only if at least `min_participants` selected responders confirmed before confirmation closed.
- A formed [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) carries exactly one `context_id`, fresh to that Rally run and shared with every confirmed participant; a dissolved outcome carries none.

## Parameters

- deadline: type=Duration, range=(0s, unbounded), description=Duration from Rally start by which ENLIST intake, selection, and MUSTER confirmation complete, default=5m
- max_participants: type=PositiveInteger, range=[min_participants, 10000], description=Most responders that may be selected and confirmed, default=10
- min_participants: type=PositiveInteger, range=[2, max_participants], description=Fewest selected responders who must confirm at MUSTER for group formation

## Preconditions

- Broadcast channel available
- Initiator can mint and communicate a shared group context identifier

## Postconditions

- A formed or dissolved [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) is yielded

## Failure modes

- Flaking: Responders ENLIST tentatively but selected responders fail to confirm at MUSTER before `deadline`.
- Under-quorum: Fewer than `min_participants` selected responders confirm before MUSTER confirmation closes, so no group forms.

## Where this came from

—

## Builds on

- [AcceptSpec](https://semahash.org/vocabularies/bootstrap/patterns/AcceptSpec.md) (accepts)
- [Criteria](https://semahash.org/vocabularies/bootstrap/patterns/Criteria.md) (accepts)
- [Select](https://semahash.org/vocabularies/bootstrap/patterns/Select.md) (composes_with)
- [Protocol](https://semahash.org/vocabularies/bootstrap/patterns/Protocol.md) (references)
- [Outcome](https://semahash.org/vocabularies/bootstrap/patterns/Outcome.md) (yields)

## Used by

- [Nucleate](https://semahash.org/vocabularies/bootstrap/patterns/Nucleate.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Rally#3ef1
- Hash: sema:Rally#mh:SHA-256:3ef1a658874f6a5333a43d3362227b9ae446ee11e78868a33678cdf064b8fb35

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Rally
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Rally.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
