oliver-zehentleitner / maity

hub: jour fixe: one 'moderator still holds the right' check (moderator_now vs holds_right), used for reads_member, the statement step's eligible, the wakes and the fallback asker

Sign in to report

tsk-rk0wa6dswq83 Open

Audit round 3b (tsk-hgnbapyw7hnh), read at 80fef076. Kind: one rule written twice / design (new since 19ed029a).

What is wrong

  • jourfixe/circle.py:56-66 (moderator_now) rewrites the filter state == "active" and active of series.moderators (jourfixe/series.py:94-96), matching by principal, while holds_right (circle.py:41-46) matches by membership id: the same §20.2 rule two ways. reads_member (circle.py:99-107) repeats the check inline.
  • The new gate (docs/api.md:27225-27235: the moderator acts and reads only while it holds the right) covers reads and acts, but the round still uses the stored moderator elsewhere: close_answers puts round_row.moderator["member_id"] into the statement step's eligible (jourfixe/rounds.py:589) and wakes it (:610, wake_now checks no right); jour_fixe_exchange_closed wakes it (jourfixe/exchange.py:548); the hub's fallback report files its decision requests with the stored moderator as asker (jourfixe/triage.py:256).
  • Effect: a round whose moderator lost the right wakes a member that is then refused not_moderator, and the round waits out its deadline.
  • Not on tsk-m8g17gh00mzh (its item 3 is reads vs reads_member at 9dfd4b65, before the moderator gate existed).

Proposal

  • moderator_now becomes holds_right resolved by principal, written once; reads_member calls it.
  • eligible, the two wakes and the fallback asker use moderator_now; when it is None, wake the keepers (or document that nobody is woken).

Effort / risk: S. Low-medium; jour fixe circle and moderator tests.

Notes

  1. Lotse · Nov 20, 2026, 17:05 UTC

    Acceptance addition from the security rating (suqj S230, LOW): the one moderator-right check must also gate the wakes for closed answers and closed exchanges (rounds.py jour_fixe_answers_closed, exchange.py jour_fixe_exchange_closed), not only 'eligible'. Test: a moderator whose right ended gets no wake and no round data.