- crates/ld-engine : formule inertielle (parité avec la maquette, garde C), coquille / changement de fond, assistant d'édition à règles, composition d'un document sous vote permanent (adoptions, aperçus, rivales). - crates/trustin-access : qui voit, qui ouvre, qui gère les accès. - crates/ld-server : API axum + SQLite, connexion Ğ1 (client OAuth2 de connect.monnaie-libre.fr), invitations, entrée en vigueur automatique, signalements de contradiction, traductions éditoriales, publication git, taille de la toile lue sur la chaîne. - seeds/acte-engagement-certification.json : 33 articles, fr + en + es ; en vigueur : préambule, E1, E2 (seed a minima). - maquette/ : frontend, backend et docker v2 déplacés tels quels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
773 B
Python
32 lines
773 B
Python
"""Smith sub-WoT threshold criterion.
|
|
|
|
The Smith criterion requires a minimum number of votes from Smith members
|
|
(forgerons) for certain decisions to be valid.
|
|
|
|
Formula: ceil(SmithWotSize ^ S)
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import math
|
|
|
|
|
|
def smith_threshold(smith_wot_size: int, exponent: float = 0.1) -> int:
|
|
"""Compute the minimum number of Smith member votes required.
|
|
|
|
Parameters
|
|
----------
|
|
smith_wot_size:
|
|
Number of active Smith members.
|
|
exponent:
|
|
S in the formula ``ceil(smith_wot_size^S)``.
|
|
|
|
Returns
|
|
-------
|
|
int
|
|
Minimum Smith votes required.
|
|
"""
|
|
if smith_wot_size <= 0:
|
|
raise ValueError("smith_wot_size doit etre strictement positif")
|
|
return math.ceil(smith_wot_size ** exponent)
|