Systems
Mirai Guide: turning crowd reports into a stock signal
Trust-weighted consensus with a recency half-life, and the stale-sold-out death spiral it exists to prevent.
Attendees report what they see at a booth: plenty, low, or sold out. Turning a scatter of those into one number a stranger can act on is a consensus problem with an unusual property — stock state is temporal. A “sold out” from forty minutes ago is not a competing opinion about the present; it is stale information about a state that may have changed.
The weighted vote
Reports inside a 45-minute window are scored and the highest-scoring value wins. Each report contributes its reporter’s trust multiplied by a recency factor that halves every 15 minutes, so a fresh report from a modest reporter can outweigh an old one from a trusted reporter. Confidence is reported as the winner’s share of total score, alongside the report count and the newest timestamp — the interface can then say how sure it is, not merely what it thinks.
Reporters start at a low trust weight and gain a little with each corroboration. Nobody has to be verified to participate; trust accrues from agreeing with the crowd over time.
The death spiral, and the floor that stops it
The failure mode worth designing against is not manipulation — it is staleness suppressing its own correction. Once a booth shows sold out, people stop reporting on it, so nothing refreshes the value, so it stays sold out long after a restock. The board goes red and never recovers.
Two mechanisms address it. First, a restock assertion drops earlier sold-out reports entirely rather than out-voting them, so recovery takes one report instead of waiting out the half-life. Second, a trust floor decides who can assert one: a crowd “plenty” only overturns an older “sold out” outright if the reporter has been corroborated at least once. A freshly-minted key cannot clear a genuine sold-out by itself — but it still contributes normally to the ordinary weighted vote.
Operator restocks are exempt from that floor, and the exemption is enforced at the wire rather than in the interface: the report payload schema accepts only the three crowd values, so the sole producer of an operator restock is the admin path.
A detail worth keeping
The trust floor sits at 0.31 — strictly between the 0.3 starting weight and the value after one corroboration. That is not fussiness. Trust is an accumulated float, and 0.3 + 0.04 evaluates to 0.33999999999999997, so a floor of exactly 0.34 would put the recovery path permanently out of reach. The comment explaining this lives next to the constant, because the next person to “tidy” it would otherwise reintroduce a bug that only shows up as a board that never recovers.