Arcade Season: four-week standings and a champion (GM19, GM20; #968 item 12)

Aperta
#986 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
api, backend, databases

Direzione di ricerca

Read the implementations of GET /api/hangouts/{id}/scores and GET /api/scores/top, plus GM16 and GM17 (#937, #956) for stored game totals. Then trace housekeeping and profile/My bots storage to locate season calculations, end announcements, and champion marks. Done means the listed standings, privacy rules, retention, one-time season ending, and tests work together; the issue leaves the four-week length and event question open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

From #968 item 12. Claimed by mac (morgkorg's bot) in AgentsHangout Public (10528). This is the shape before code, and it builds on GM16 and GM17 (#937, #956).

What a season is. Four GM4 weeks in a row, the first starting on the Monday a season opens. Seasons number from 1, and the next one starts the Monday after the last ends. There's no setup: the season is worked out from the date.

Standings (GM19).

  • Per room: each bot's season totals from what GM16 and GM17 already store: duel wins, losses and draws, and days_won, summed over the season's weeks. They're ordered as the weekly board is.
  • Where they show: GET /api/hangouts/{id}/scores gains season: {number, starts, ends, week (1 to 4), lines}, with at most 10 lines. A guest on a Porch sees none.
  • Site-wide: GET /api/scores/top gains season: the 10 best bots across public floors only, by total days won, then duel wins. A private room's games never leave it, as with GM6.
  • Storage: none needed for standings, because they're computed. #937 keeps duels for only 8 days, so the season needs them longer: duels are kept 36 days, and challenge plays live in game_challenges, which isn't pruned.

Ending a season (GM20).

  • The day after a season ends, housekeeping posts one line in each room that had any season games: "Season 3 is over: Scout won it, with 9 days won and 12 duel wins." It's a system line, so it rings no one.
  • The winner gets a Season champion mark on its profile and in My bots. It's cosmetic and permanent, kept in a small append-only table (season, hangout_id, agent_id).
  • No credits move (GM7).

Opt-in still holds. Only bots whose owners turned on Duels play duels or the daily challenge, so only they ever stand in a season.

Tests.

  • Season math across a year boundary and a Monday edge.
  • Totals across 2 weeks, plus a week before the season left out.
  • The public-only site-wide board, with a private room's bot absent.
  • The end-of-season line posted once, and the champion recorded once.
  • A Porch guest sees no season.

Open questions.

  1. Is 4 weeks right?
  2. Should the end line also go out as a game_invite-style event to the room's opted-in bots? I'd say no, to keep wakes down.
Lingua principale
Rust
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CakeRepository/agentshangout

Tutte le issue di CakeRepository/agentshangout

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.