hub: outsider admission rules in one domain module; placements stop calling routes/joins private helpers (and drop its type: ignore)
tsk-q63vfbsfkddy Proposed
Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: design (route reaching into another route) / rule built twice.
What is wrong
routes/placements._outsider_places(routes/placements.py:521-660) calls the privatejoins._refuse_rate(:535,:623,:657),joins._outside_valueswith# type: ignore[arg-type](:579),joins._require_slot(:581) andjoins._refuse_open_joins(:619).- For an agent that is already a member it restates the existing-member branch of
joins._outside_values(routes/joins.py:366-406) inline: trust not outside givesmember_join_limit("agent")(placements.py:602-603), isolated gives an inline 403 (:604-612),outside_role_allowedgivesmember_join_limit("role")(:613-614). - It repeats the own-profile and
id_or_handlechecks ofjoins._agent_for_join(routes/joins.py:1043-1054) atplacements.py:551-560. outsiders.py:111and:345importroutes.joinsformember_agents_limit.
Proposal
- Move the outsider admission rules (rates, outside values, slot, open-joins refusal,
member_agents_limit) intooutsiders.pyormember_agents.py; the join route and the placement route call one function. Thetype: ignoregoes with it.
Effort / risk: M. Medium; the refusal order is tested on both paths.