Skip to content

Test/add seed to test voting - #335

Merged
sabinem merged 2 commits into
mainfrom
test/add-seed-to-test-voting
Oct 13, 2026
Merged

sabinem merged 2 commits into
mainfrom
test/add-seed-to-test-voting

Conversation

@sabinem

@sabinem sabinem commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

A hackathon where voting can actually be tested

Anyone testing the platform needs a hackathon where voting is open and they still have a vote to cast. Until now there wasn't one. The only hackathon with voting on ended weeks ago, it had two projects, and its one account that can sign in had already voted. So nobody could try voting the way a participant would, and organizers had no real tallies to turn into results.

The test data now includes a seventh-day-style "Open Science Hackathon 2026" that is in its voting phase right now. It has nine teams and four prizes, each set up a different way: pick one, spread points, rank, and jury only. Thirty made-up participants have already voted, so the tallies have a clear winner, a tie and an outsider, but no results are published yet. bob and charles still have every vote to cast: bob is on a team and on the jury, charles on neither.

The test-data guide also now starts with which hackathon to use for which phase and which test, and explains when the data needs refreshing. Nothing refreshes it on deploy, and because its dates are relative to the moment it was created, it goes stale after a few days.

  • Seed only: no app code changed.
  • After merging, local databases need just clean::state before just db::seed, and the dev cluster needs just cluster::reseed <context> to get the new hackathon.
  • Left out on purpose: the ranked category can't be voted in from the voting page, which has no ranked control yet. Its seeded votes are there for the organizer's results and exports.

H3 was the only hackathon with voting on, but it is over, alice — its
only login — had already voted, and two submissions leave a ranking or
a points split with nothing to decide. H6 (Open Science Hackathon 2026)
is ongoing in its Demo & Voting phase: nine teams, eight final
submissions, and four categories covering single choice, points, ranked
and jury, with thirty synthetic participants' votes already cast and no
results recorded. bob (on a team, on the jury) and charles (on neither)
have every ballot still to fill in.

The seed README now opens with which hackathon to use for which phase
and which test, and when the fixture needs re-seeding — nothing
re-seeds it on deploy.

Existing databases need `just clean::state` before `just db::seed`
picks up H6.
The skill still described the seed as it was before it moved to the
in-process gRPC harness: rows written through ent in one transaction,
casbin roles added by hand, a single sentinel hackathon and three
hackathons in all. Following it now would reintroduce the drift the
harness was built to remove.

It is rewritten as a how-to — how the harness works, building from the
steps.go helpers, capabilities that must be on when used, users who
cannot log in, adding a hackathon, verifying against a throwaway
database — and points to cmd/seed/README.md for what the fixture
contains, rather than keeping a second inventory that goes stale.

CLAUDE.md, backend-api-explore and backend-service-dev named
seedCapabilities, which no longer exists; backend-service-dev also
claimed the seed writes an extra Owner preference row, which it no
longer does. The identity count in harness.go is updated for H6.
@sabinem
sabinem merged commit 58a6ff8 into main Oct 13, 2026
3 checks passed
@sabinem
sabinem deleted the test/add-seed-to-test-voting branch October 13, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant