docs(parity): chantier C5 vague 1 — 14 contrats individualisés, 3 durcis v2 - #29
Conversation
…cis v2 (billing ledger, import/remix, gallery) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfc078d684
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const receipt = (reviewReceiptsForContracts.receipts ?? []).find((r) => r.reviewReceiptId === c.reviewReceiptId); | ||
|
|
||
| if (!receipt || receipt.completeness !== 'COMPLETE') { | ||
| fail('CONTRACT_REGISTRY.yaml', `${c.contractId}: SIGNED sans reçu COMPLET`); |
There was a problem hiding this comment.
Bind SIGNED status to an explicit contract acceptance
The new guard only verifies that the referenced receipt is COMPLETE; it never verifies that the receipt accepted this specific contract. For example, RR-20260720-CODEX-02 is complete but explicitly says that zero contracts were reexamined, yet assigning its ID to any SIGNED registry entry would pass validation and falsely close the contract. Require an accepted-contract identifier in the receipt and check membership, as the existing P0 receipt validation does.
Useful? React with 👍 / 👎.
| 4. **Comptage des 14 contrats** : DEUX vues cohérentes — (a) **14 points individuels** | ||
| = les fichiers annotés `reviewVerdict: REFUSED` (comptés ci-dessus : 14), | ||
| = les fichiers annotés `reviewVerdict: REFUSED` (comptés ci-dessus : 11), |
There was a problem hiding this comment.
Derive contract reconciliation from the new registry
The three hardened documents remove reviewVerdict: REFUSED, but the unchanged reconciliation generator still discovers contracts by scanning for that annotation. Consequently this generated section now claims there are 14 individual contracts while reporting only 11 as “counted above,” and future pending/signed transitions in CONTRACT_REGISTRY.yaml will not be represented reliably. Use the new registry's signatureResult values and report refused, pending, and signed counts separately.
Useful? React with 👍 / 👎.
| - I-GAL-1 : le remix clone le SNAPSHOT épinglé, jamais la source vivante. | ||
| - I-GAL-2 : lecture publique, remix authentifié, consentement explicite versionné (checkbox + 400 serveur sans acceptation). | ||
| - I-GAL-3 : toute stat publique citée provient d'un artefact rendu HASHÉ présent en repo (plus jamais une valeur périmée — leçon V4-1/V4-2). |
There was a problem hiding this comment.
Give the new Gallery invariants unique identifiers
These definitions reuse I-GAL-1, I-GAL-2, and I-GAL-3, while the same document later defines those identifiers again for different parity/evidence rules. Any test, review receipt, or evidence referring to an I-GAL-* identifier is therefore ambiguous, defeating the named-invariant structure introduced by this hardening. Consolidate the definitions or assign distinct IDs.
Useful? React with 👍 / 👎.
| if (entries.length !== 14) { | ||
| fail('CONTRACT_REGISTRY.yaml', `${entries.length} contrats ≠ 14 (§2.3)`); | ||
| } |
There was a problem hiding this comment.
Validate the canonical contract IDs, not only the count
Checking only entries.length does not guarantee that the 14 contracts are represented one by one: duplicating one entry while deleting another still passes, as do duplicate contractId or file values. Since this registry is now the canonical individual-contract view, compare its unique IDs/files against the expected §2.3 set so omissions cannot silently satisfy the guard.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Cette PR fait évoluer le chantier C5 de durcissement des contrats “parity” en rendant les 14 contrats §2.3 traçables individuellement via un registre dédié, et en mettant à jour plusieurs contrats en v2 (avec métadonnées + structure renforcée), tout en ajoutant une garde CI associée.
Changes:
- Ajout de
CONTRACT_REGISTRY.yaml(14 entrées explicites) + validation CI correspondante dansscripts/parity/validate-registries.mjs. - Durcissement / passage en v2 de 3 contrats (Billing Ledger, Import/Remix, Gallery/Community) avec nouvelles métadonnées (
contractId,contractVersion,signatureResult, ancrages d’implémentation). - Mise à jour des artefacts générés/traçabilité (
DOCUMENT_MANIFEST.yaml,COUNTER_RECONCILIATION_20260720.md,CHANGELOG_AUDIT.md) pour intégrer le nouveau registre et les versions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/parity/validate-registries.mjs | Ajoute la validation CI de CONTRACT_REGISTRY.yaml (comptage 14 + contraintes par état + règle SIGNED↔receipt). |
| docs/parity/CONTRACT_REGISTRY.yaml | Nouveau registre listant les 14 contrats avec statut de durcissement, refus v1, reviewer attendu et résultat de signature. |
| docs/parity/BILLING_LEDGER_CONTRACT.md | Passage en v2 et réécriture du contrat sur le ledger double-entrée (ancré PR #28 non mergée). |
| docs/parity/IMPORT_REMIX_CONTRACT.md | Passage en v2 et clarification “UNE machine normative” (ancrée PR #27 non mergée) + rappel remix prod fail-closed. |
| docs/parity/GALLERY_COMMUNITY_CONTRACT.md | Passage en v2, métadonnées de signature, invariants et tests négatifs documentés. |
| docs/parity/DOCUMENT_MANIFEST.yaml | Met à jour le manifeste (hashes + schemaVersion/repoCommit) et ajoute l’entrée CONTRACT_REGISTRY.yaml. |
| docs/parity/COUNTER_RECONCILIATION_20260720.md | Met à jour les compteurs/texte générés suite aux changements de statut/annotations des contrats. |
| docs/parity/CHANGELOG_AUDIT.md | Ajoute une entrée d’audit retraçant le chantier C5 vague 1 (registre + contrats v2 + statuts). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // RÈGLE MAÎTRESSE : SIGNED exige un reçu de revue COMPLET. | ||
| if (c.signatureResult === 'SIGNED') { | ||
| const receipt = (reviewReceiptsForContracts.receipts ?? []).find((r) => r.reviewReceiptId === c.reviewReceiptId); | ||
|
|
||
| if (!receipt || receipt.completeness !== 'COMPLETE') { | ||
| fail('CONTRACT_REGISTRY.yaml', `${c.contractId}: SIGNED sans reçu COMPLET`); | ||
| } | ||
| } |
| 4. **Comptage des 14 contrats** : DEUX vues cohérentes — (a) **14 points individuels** | ||
| = les fichiers annotés `reviewVerdict: REFUSED` (comptés ci-dessus : 14), | ||
| = les fichiers annotés `reviewVerdict: REFUSED` (comptés ci-dessus : 11), | ||
| chacun avec sa raison verbatim ; (b) **1 groupe** dans la colonne chantiers (ligne C5). |
…este durci pour de vrai Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tre↔fichier satisfaite Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… + vues régénérées Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Quoi (C5 — durcissement des 14 contrats §2.3, progressif)
signatureResult: PENDING_REVIEWouREFUSED_V1— rien de CLOSED/SIGNED sans reçu complet (garde machine).🤖 Generated with Claude Code