oliver-zehentleitner / maity

hub: conversations/jour fixe routes: one locked-membership reader, one direct-chat audience, one replay read rule, one answer-to-round lookup

Sign in to report

tsk-0phkfdyg7t6c Open

Audit round 3b (tsk-hgnbapyw7hnh), read at 80fef076. Kind: duplication / design inconsistency (partly new since 19ed029a, the verdict route).

What is wrong

  • Lock the project, then read the membership again: hub/src/maity_hub/routes/conversations.py:582-583 (_pin_target), :1052-1053 (_verdict), routes/jour_fixe.py:834-837, :858-859, next to _locked at conversations.py:642-649.
  • Direct-chat audience and sides built by hand: conversations.py:1066-1068, routes/events.py:648-649, :1040.
  • Actor of an outside human: conversations.py:1085-1095, a fifth copy for tsk-qa39qay2gbps item 5.
  • Replay checks two styles: routes/jour_fixe.py:196-202 (_member_now, called by the loaders at :212-236 and :757-763) repeats the membership and project:read check idempotency.in_project already does (idempotency.py:95-107) for the registrations at :269-303 and :766-774; routes/conversations.py:682-698 has the check in the loader and no may_read in the registration.
  • Answer -> round lookup three ways: routes/jour_fixe.py:217-222, :239-245, :254-258.

Proposal

  • _reader_locked(conn, caller, slug); one direct_audience(agent, human) next to chat_parties; Caller.outside_actor() (with tsk-qa39qay2gbps).
  • The replay read rule only in in_project(..., may_read); loaders take mine and build the view; one _answer_round(conn, id).

Effort / risk: S. Low.