Ferme le finding HIGH de la revue Produits (#17) : le PIN d'action sensible
etait verifie sans limitation de tentatives. Conception via panel multi-agents
(3 lentilles + synthese + passe adversariale, holds=true) puis revue de
l'implementation (holds=true).
Dimension du throttle = UTILISATEUR AGISSANT (identite de session, RG-T02), pas
l'email cible (contournable par rotation) ni l'IP (collateral sur poste partage).
Table dediee pin_throttle (entite 22) STRICTEMENT SEPAREE des compteurs de login
(user.failed_login_attempts / login_throttle) : un echec de PIN n'incremente aucun
compteur de connexion (pas d'escalade DoS vers le login).
- db/migrations/0002_pin_throttle.sql : table cle sur actor_user_id (UNIQUE, FK
-> user ON DELETE CASCADE), separee du login. Appliquee a la base dev.
- ThrottlePolicy : dimension 'pin' (bornes propres PIN_THROTTLE_*, 30s..300s, plus
permissives que le login : controle de dissuasion, residuel Faible).
- PinThrottle (nouveau) : isLocked / recordFailure (upsert atomique + backoff, une
transaction, miroir d'AuthService) / reset (UPDATE simple). N'ecrit jamais
user/login_throttle/audit_log.
- PinVerifier::payTimingDecoy : parite de timing du chemin verrouille.
- ProductController update/destroy : gate AVANT verification (leurre + 422
generique, pas de pin.failed sous verrou actif = borne anti-flood de l'audit) ;
recordFailure sur PIN faux ; reset sur succes, cle sur l'acteur de SESSION.
- Docs Merise 21 -> 22 entites : RG-T22 (mlt), entite 22 pin_throttle
(mcd/mld/dictionary), couverture MCT 22/22 (mct).
- .env.example + docker-compose : PIN_THROTTLE_THRESHOLD/BASE/MAX/WINDOW.
- Journal RNCP : docs/journal/2026-06-15--p3-throttle-pin-rg-t22.md.
Tests : 188 verts (525 assertions), PHPStan L6 propre.
Baseline of the P1 conception work produced over sessions 5-7 (was
uncommitted in the working tree). 11-entity model, French naming.
Superseded next by the prod-like revision (English, ~16 entities) per
the 2026-06-04 decision session - this commit preserves the baseline
in history before that rewrite.
Switch from Mermaid to drawio for MCD diagrams to gain manual layout
control on the global view (10 entites + 10 associations, planarite
intrinseque non resolue par Mermaid auto-layout).
- mcd-global.drawio : 10 entites + 8 associations (vue compacte sans attributs)
- mcd-catalogue.drawio : Categorie / Produit / Menu / MenuProduit avec attributs
- mcd-commande.drawio : Commande / LigneCommande + polymorphisme vers Produit/Menu
- mcd-rbac.drawio : User / Role / Permission / RolePermission
Notation Merise (min,max) sur chaque cote d'association. Layout de
depart a affiner manuellement dans drawio web (Edit Diagram -> XML).
SVG a regenerer en exportant depuis drawio web.
Bottom-up derivation from school JSON sources + PROJECT_CONTEXT business rules.
Covers : Categorie, Produit, Menu, MenuProduit, Commande, LigneCommande,
User, Role, Permission, RolePermission. Decisions documented :
prices in INT cents, VAT in per-mille, polymorphic FK with snapshots
on ligne_commande, dynamic roles vs static permissions for RBAC.
- docs/merise/_sources/ : raw JSON sources (categories + produits)
preserved unchanged for jury traceability, plus provenance note
documenting 7 typos in image refs and gaps to address at the MCD
phase (no FK, float prices, missing menu composition, etc.)
- docs/design/ : Figma maquette PDF (renamed without accent) plus
README pointing to the live Figma URL
- src/public/borne/assets/images/ : 71 visual assets (53 produits +
9 categories + 9 UI) normalized to kebab-case lowercase to avoid
the case-sensitive Linux pitfall in Docker production
The 'wacdo' naming from the school brief is preserved only inside
docs/merise/_sources/ for traceability. The rest of the project keeps
the canonical 'Wakdo' naming.
TODO P1: rename cheesecake-choconuts-m&m-s.png (the & breaks URLs
without percent-encoding); will be fixed during seed normalization.