feat(queen): XP for the lanes people lend, and a public leaderboard - #510
Merged
Merged
Conversation
Owner, 2026-09-23: people who lend the swarm a provider token of their own should earn XP for it, and there should be a leaderboard. XP is NOT a count of keys lent: a key added and never used carries nothing, and paying for the adding would pay for ten dead keys. Every bee runs on one credential and the dispatch records which (key_index), how long it ran and what the review said, so the score is a reading of work that happened: 100 XP per accepted issue on that lane, 10 XP per hour a bee spent on it. Nothing is stored - the numbers are summed from rows that already exist on every read, so anyone can recompute them. Whose lane is which comes from the operator's environment, because the credentials do: TRIOS_KEY_OWNERS="0=Dmitrii,1=@alex". A lane nobody claimed shows as "key #N" rather than being dropped: the work is real, and the board must not imply the swarm ran on four keys when it ran on fourteen. No key is read here and none can be - only its index is in the database. GET /queen/public-leaderboard is public on the same terms as the board: no titles, no worker text, no credential. Measured against the live database over 30 days: lane 0 at 176 accepted and 169 hours, lane 1 at 154 and 186, down to lanes never chosen. Tests: 6. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Tests passed — 2400/2460
|
The route-guard gate pins the shape of the route table, and its own note says why: a pinned count is a restated list, and it goes stale either because something was added on purpose or because a hole opened -- the pin cannot tell them apart, so whoever updates it has to look. Looked. The audit moves by exactly one mount, `/queen/public-leaderboard`, classified `public-read` via an explicit `publicReadCorsMiddleware()` -- which is where a route with `public` in its name belongs. prefixGuardCount stays 18 and guardedSubAppCount stays 15: no guarded route lost its guard to make room. totalMounts 44 -> 45 publicReadCount 7 -> 8 /queen mounts 21 -> 22 (public-read 7 -> 8; wrapper 8 and shells 6 as before) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner, 2026-09-23: people who lend the swarm a provider token of their own should earn XP for it, and there should be a leaderboard.
The score is a reading, not a bookkeeping entry
XP is not a count of keys lent: a key added and never used carries nothing, and paying for the adding would pay for ten dead keys. Every bee runs on exactly one credential, and the dispatch already records which (
key_index), how long it ran and what the review said. So:Nothing is stored. The numbers are summed on every read from rows that already exist, so anyone can recompute them - a score nobody can check is a score nobody should trust.
Whose lane is whose
The credentials come from the operator's environment, so the mapping does too:
TRIOS_KEY_OWNERS="0=Dmitrii,1=@alex". A lane nobody claimed shows askey #Nrather than being dropped: the work is real, and the board must not imply the swarm ran on four keys when it ran on fourteen. No key is read here and none can be - only its index is in the database.GET /queen/public-leaderboardis public on the same terms as/queen/public-board: no issue titles, no worker text, no credential. It takes?days=(1-90, default 30).Checks
Next, and not in this PR: letting a person add their own token from the app's profile page, so the lane is claimed by them rather than by an operator's variable.
🤖 Generated with Claude Code