1. Contexte
- Story : PD-277 — PV PRE — Implémenter anti-rejeu nonce et PKI certificate binding (v1.1)
- Gate : 3 (CONFORMITY_CHECK)
- Itération : v2
- Date : 2026-02-28
- P1 (review) : Claude (claude-p)
- P2 (confrontation) : ChatGPT (opencode gpt-5.3-codex)
- Score v1 : 7.0/10 (RESERVE)
2. Corrections apportées (v1 → v2)
| Écart v1 | Statut v2 | Correction |
| ECT-01 (BLOQUANT) Format nonce | LEVÉ | Section §4 ajoutée : UUID v4, ASCII, crypto.randomUUID(), 36 chars |
| ECT-02 (BLOQUANT) Faits Prolog | LEVÉ | Section §8 ajoutée : 3 faits Prolog canoniques pour CHECK 23/24 |
| ECT-03 (BLOQUANT) Tests TC-INV manquants | LEVÉ | TC-INV-03, TC-INV-05, TC-INV-06, TC-INV-08 définis avec GIVEN/WHEN/THEN |
| ECT-04 (MAJEUR) Politique used_nonces | LEVÉ | TTL = durée de vie du ReKey, destruction conjointe |
| ECT-05 (MAJEUR) Types SQL | LEVÉ | DDL contractuel ajouté : JSONB, VARCHAR(255), contraintes |
| ECT-06 (MAJEUR) Atomicité TOCTOU | LEVÉ | Transaction atomique (SERIALIZABLE ou advisory lock) spécifiée |
| ECT-07 (MAJEUR) Ref Epic | LEVÉ | Epic : PD-189 (CRYPTO) unifié |
| ECT-08 (MAJEUR) INV-06/08 partiel | ATTÉNUÉ | INV-06 : hérité infra, TC-INV-06 documenté. INV-08 : TC-INV-08 vérifie StatusEnum |
3. Écarts résiduels v2
BLOQUANTS : 0
MAJEURS (1)
| ID | Source | Écart | Impact |
| ECT-14 | Review P1 v2 | Migration NOT NULL sans default pour owner/recipient_certificate_id sur données pré-existantes | Migration échoue si LegalReKey existants |
MINEURS (9)
| ID | Source | Écart |
| ECT-15 | Review P1 v2 | Origine nonce serveur vs tests qui fournissent nonce en entrée (ambiguïté API) |
| ECT-16 | Review P1 v2 | Structure entries used_nonces non détaillée |
| ECT-17 | Review P1 v2 | Distinction erreurs runtime vs build-time non explicite |
| ECT-18 | Review P1 v2 | Mapping ST-277 → TC à formaliser |
| ECT-19 | Review P1 v2 | Variant bits UUID non validés |
| ECT-20 | Review P1 v2 | Enforcement level immutabilité certificats |
| ECT-21 | Review P1 v2 | Cycle de vie post-binding non couvert |
| ECT-22 | Review P1 v2 | Retry strategy SERIALIZABLE |
| ECT-23 | Confrontation P2 v2 | Baseline StatusEnum Legal* non identifiée |
4. Scoring v2
| Critère | Score v1 | Score v2 | Delta |
| completeness | 6.0 | 8.5 | +2.5 |
| testability | 7.0 | 8.5 | +1.5 |
| clarity | 7.5 | 8.0 | +0.5 |
| traceability | 7.5 | 8.0 | +0.5 |
Justification : - completeness 8.5 : 0 bloquant, 1 majeur (-1), 9 mineurs (-0.5×9×0.055 ≈ -0.5) → 10-1-0.5 = 8.5 - testability 8.5 : Tous les TC-INV définis, couverture forte, 1 majeur migration (-1), mineurs (-0.5) - clarity 8.0 : Nonce format clarifié, Prolog facts listés, 2 ambiguïtés mineures (-1) - traceability 8.0 : Epic unifié, faits Prolog canoniques, baseline StatusEnum manquante (-1)
5. Recommandation
Conforme — Les 3 bloquants v1 sont levés. Le majeur résiduel (migration NOT NULL) est tratable en implémentation (default value ou hypothèse base vide). Progression recommandée.