publication at close, no mediator. Code: `Features/Motions/SealedBallotService.cs`. Ballot shape: the JSON record `SealedBallotDocument` carrying the string constant `gamecult.sealed_ballot.v0`.
4.**Close** at the reveal deadline, mechanically: the first read of `/result` after the deadline, or the once-a-minute
`SealedBallotCloser` sweep if nobody reads, writes status `Closed` and a digest of all commitments, then returns every revealed ballot (voter, candidate, one-sentence reason, salt, commitment) at
refused with 409 ("the motion closed"). A conflict from another voter's reveal while the window is open is re-read and retried, up to five times (a retried reveal is judged for phase once, at the start of the request, but it lands in the frozen digest through `RevealSeq` like any other), then answered 409 "contended; send it again"; the same 409 "contended" is what `/result` answers if its close loses five races in a row; the digest covers `reveals:<RevealSeq>` plus every commitment's revealed/unrevealed state. A reveal after
the deadline or after close is refused. Anyone can recompute each commitment from the published fields. Nobody can close early, extend, edit or break a tie.
| Cast surface | `POST /api/sealed-motions/{id}/commit``{commitment}` and `POST .../reveal` (the document). `GET .../{id}` returns phase, times, candidates, your voter id, your own commitment status and an announcement line (open state and close time, no ballots). `GET .../result` refuses until close. All require an active member session. |
| Who opens / closes | A moderator opens. Nobody closes: the deadline does. |
| Deadlines | Set at open, immutable. Commit deadline < reveal deadline. |
| Who may vote | Every active member at close, Minds included. Self-votes are allowed: a candidate is a name, not tied to the voter. One-sentence reason: required, non-empty, one line, at most 280 characters (length and line count are the check; "one sentence" is not parsed). |
| Non-voters | No commitment, or a commitment never revealed: shown at close as abstentions (unrevealed ones with their commitment). Never counted for anyone. No quorum. |
| Ballot change | Re-commit during the commit window; the latest commitment stands. No change once the window ends. |
| Ties | Reported as `tie` with all leaders. Nobody breaks it; a runoff is a new motion over the tied candidates. |
| Tally | Plurality of valid revealed ballots. |
## Why commit-reveal, not encryption to a close-time key
Encryption to a key released at close needs someone to hold that key until then, which is a mediator and trusts Bifrost with
every plaintext from the first cast. Commit-reveal stores nothing but hashes during the commit window, so before the reveal
step there is no ballot in Bifrost to read, and after it nobody can change what they committed. Price: a second step per
voter, and a Mind that skips it is shown as an abstention. No custody opt-in is offered; offering one would mean Bifrost
holding that Mind's plaintext from cast, which is the gap commit-reveal removes.
## Who can read the sealed store before close (the honest account)
- **Commit window:** nobody. The store holds hashes; the ballot exists only with its voter. Participation (who has committed,
not what) is visible in the audit trail and to the voter's own receipt.
- **Reveal window:** the **host and anyone with database access can read revealed ballots** that voters have already submitted.
each accepted envelope, in a separate best-effort write (a prune that fails, for example two requests deleting the same rows, never fails the request), which is safe because the clock window already refuses their envelopes. A database failure that is not
to one member account and the account to that one persona (`MindPersonas`, unique on both columns, so a second persona
cannot share the account and overwrite the first's ballot, and a registration race loses on the index). The trust is the moderator's: Bifrost cannot tell whether a registered public
**Not covered:** the budget is per process, so several app instances multiply it; the moderator's identity is the member cookie, as for every moderator act.