Skip to content

Exemplar votes: assertion_votes.reason, cached assertion_scores, the vote control and endorse-on-duplicate (#181 build 3) #189

Closed as not planned

Description

@holden

Build 3 of #181, carried out of it when #181 closed on its prototype scope (builds 1 and 2, PR #183 and PR #186). #105's step 2, taken as written. This is the one migration in the #181 design.

What exists today (after #186)

  • assertion_votes stores (assertion_revision_id, actor_id, value ∈ {-1, 1}, review_context_id), unique on (revision, actor). It has no reason column and no cached tally.
  • Examples.exemplars/3 already reads human_up, human_down, bot_up and bot_down from those rows, split by actors.actor_kind (only user counts as human), and Rank.order/1 already orders by net votes. A test shows one vote reordering two exemplars.
  • Contributions.propose/6 returns {:error, {:held, id}} for a current, unrejected duplicate (subject, predicate, object). Endorsement is the missing half.
  • Nothing lets anyone vote. There is no control on the card or on /connections/:id.

Schema

ALTER TABLE assertion_votes ADD COLUMN reason text;
CREATE TABLE assertion_scores (
  assertion_id  bigint PRIMARY KEY REFERENCES assertions(id) ON DELETE CASCADE,
  revision_id   bigint NOT NULL REFERENCES assertion_revisions(id),
  human_up      integer NOT NULL DEFAULT 0,
  human_down    integer NOT NULL DEFAULT 0,
  bot_up        integer NOT NULL DEFAULT 0,
  bot_down      integer NOT NULL DEFAULT 0,
  computed_at   timestamp NOT NULL
);

Build

Acceptance

  • An actor's second vote on one revision replaces their first.
  • A property test shows assertion_scores matching sum(value) split by actor kind after every vote.
  • The ordering on /define/:slug and on the person page changes when the tally does.
  • A second nominator's manifest row or form submission is an endorsement, and still produces no second claim.

Not here: rate limits and public nomination (#105 steps 6–7), and Wilson ordering (a later Rank.order/1 change).

Panel boundary — 26 September 2026

#193/#197's internal support/oppose/abstain ballots live in #196's curation_ballots, frozen to an actual panel, candidate, round and profile version. They do not automatically call Claims.vote/4, add human tallies, or require this issue's public voting UI to exist. An explicit future bot endorsement remains attributed to a bot and distinct from a panel recommendation. This issue retains its human vote/reason/tally/duplicate-endorsement scope.

Activity

  1. holden commented on Oct 21, 2026

    @holden
    MemberAuthor

    Folded into #193, the curation programme's one open tracker, on the owner's word (21 October 2026). The specification here stands; reopen when the work starts. Status is in the consolidation comment on #193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions