Council record: dissent and what_would_change_it carry first-round text from seats whose vote changed

Aperta Adatta ai principianti
#2,239 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Leggi veche.py intorno alle righe 369–373 e segui il modo in cui vengono memorizzate la risposta di ogni seggio al primo turno e la risposta al turno di critica. Usa l’esecuzione con stub dell’issue, in cui un seggio passa da REVISE a PASS, per controllare i campi finali dissent e what_would_change_it; il lavoro è concluso quando riflettono il ragionamento dell’ultimo turno e omettono la condizione obsoleta del seggio che ha cambiato posizione.

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

Descrizione

The council record's dissent and what_would_change_it come from each seat's first-round answer, even when that seat changed its vote in the critique round. A reader cannot tell what a dissenter finally held, and can act on a position the seat dropped.

Where (veche.py, 1.648.0):

  • final[i] = d["verdict"] keeps only the new vote from the critique round; the rest of d is discarded.
  • :369 dissent = [x for x, f in zip(answers, final) if f != verdict] picks seats by final vote.
  • :372 dissent=[x["raw"] for x in dissent] then prints their first answers.
  • :373 what_would_change_it=[x["would"] for x in answers if x["would"]] reads every first answer, whichever way the seat ended.

Seen twice in one day on ordinary runs:

  • A 2-1 REVISE record whose only dissent entry itself reads "verdict":"REVISE", so the entry contradicts the seat it stands for.
  • A 3-0 PASS record whose what_would_change_it reads "the verdict would move to PASS_TO_USER", a condition written against a verdict no seat held at the end.

Suggested fix. Keep each seat's critique-round reasoning and build both fields from it. Where a seat changed nothing, its first answer stands. Label anything older as round: 1.

Test. A stubbed run where one seat moves from REVISE to PASS in the critique round: dissent shows the final dissenters only, in their final words, and what_would_change_it drops the moved seat's old condition.

Different from #2235, which asks for conditions the caller can check.

Lingua principale
Python
Stelle
2
Fork
1
Merge medio
1h 29m
PR unite (30g)
567

Preparare l'ambiente

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 protocol/perun

Tutte le issue di protocol/perun

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.