docs(docs): R4 plan rev 3 validated, contract
This commit is contained in:
1 parent
b895ecf136
commit
7575c67c47
2 files changed
+167
-24
No files matched your search
@@ -0,0 +1,119 @@
|
||||
# CONTRACT — r4-card-integrity
|
||||
|
||||
Plan: `.claude/tasks/plans/2026-11-16-r4-card-integrity-2337.md` (rev 3, validated 2026-11-17). Base: `b895ecf`.
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
|
||||
### Owner brief 2026-11-16 (R3 closed, R4 start)
|
||||
|
||||
Je confirme avoir testé le volet repliable des filtres sur téléphone.
|
||||
|
||||
Tout fonctionne correctement et l'ergonomie me convient.
|
||||
|
||||
Je valide officiellement R3, y compris sa dernière amélioration mobile.
|
||||
|
||||
Je confirme également que « Réinitialiser les filtres » doit rester uniquement à l'intérieur du volet. Aucun bouton supplémentaire n'est nécessaire.
|
||||
|
||||
Tu peux enregistrer cette validation propriétaire dans la documentation, le suivi et la mémoire, puis committer et pousser les éventuelles mises à jour.
|
||||
|
||||
R3 est terminé.
|
||||
|
||||
Nous pouvons maintenant passer à R4 : affichage des erreurs d'intégrité sur les cartes du catalogue.
|
||||
|
||||
Reprends les décisions déjà validées, notamment D9 C, les maquettes R0 et le plan V1-2.6.
|
||||
|
||||
Je te laisse autonome pour auditer l'existant, préparer le plan technique et organiser les relectures habituelles.
|
||||
|
||||
Présente-moi les éventuelles décisions qui nécessitent mon accord avant l'implémentation.
|
||||
|
||||
Conserve BLK-015 et RR-13 comme chantiers séparés.
|
||||
|
||||
Aucune fusion ni intervention sur DEV.
|
||||
|
||||
### Owner validation 2026-11-17 (plan R4, decisions D1 to D4)
|
||||
|
||||
Je valide le plan R4 avec les décisions suivantes.
|
||||
|
||||
D1 : ALTERNATIVE.
|
||||
|
||||
Une version trop volumineuse doit afficher le message spécifique existant :
|
||||
|
||||
« Cette version dépasse les limites de taille d'une fiche. »
|
||||
|
||||
Je préfère distinguer un dépassement de limite d'un véritable problème d'intégrité.
|
||||
|
||||
Le bouton « Réessayer » n'est pas nécessaire dans ce cas, puisqu'un nouvel essai sans modification de la version ne changera rien.
|
||||
|
||||
D2 : RECOMMANDATION VALIDÉE.
|
||||
|
||||
Lorsqu'une illustration ne peut pas être dessinée alors que la version a passé le contrôle d'intégrité, affiche le message neutre existant.
|
||||
|
||||
Si le problème provient du moteur, utilise le traitement d'erreur et le bouton « Réessayer » prévus.
|
||||
|
||||
Je ne souhaite plus que ce type d'erreur soit ignoré silencieusement.
|
||||
|
||||
D3 : RECOMMANDATION VALIDÉE.
|
||||
|
||||
Utilise pnpm db:sandbox trial pour mon essai manuel de R4.
|
||||
|
||||
Je préfère ne pas créer de nouvelles fiches publiées de test dans db:trial.
|
||||
|
||||
Précise dans la procédure comment distinguer les anomalies déjà présentes dans la sandbox des comportements propres à R4.
|
||||
|
||||
D4 : RECOMMANDATION VALIDÉE.
|
||||
|
||||
Le nouveau test navigateur doit nettoyer uniquement les fiches et les droits qu'il a lui-même créés.
|
||||
|
||||
La suppression logique des fiches de test et le retrait du droit créé sont autorisés, avec les contrôles d'identité prévus.
|
||||
|
||||
Aucune donnée préexistante ne doit être modifiée.
|
||||
|
||||
Je valide également les autres choix retenus dans le plan :
|
||||
- Gestion du bouton « Réessayer ».
|
||||
- Gestion du focus et des annonces accessibles.
|
||||
- Affichage des refus d'accès.
|
||||
- Gestion des dates absentes.
|
||||
- Signalement des erreurs propres à chaque carte.
|
||||
|
||||
Tu peux maintenant implémenter R4 selon ton processus habituel, avec tes tests et relectures indépendantes.
|
||||
|
||||
Conserve BLK-015, RR-13 et l'anomalie A dans leurs chantiers respectifs.
|
||||
|
||||
À la fin, présente-moi :
|
||||
- Le bilan des modifications.
|
||||
- Les résultats exacts des tests.
|
||||
- Les éventuelles limites.
|
||||
- La procédure d'essai manuel sur la sandbox.
|
||||
|
||||
Aucune fusion ni intervention sur DEV.
|
||||
|
||||
## CLARIFICATIONS
|
||||
- Graphic reference: board 30 `docs/design/v1-2-6-r0/30-catalogue-carte-integrite.png` (approved as is, 2026-11-09). Wording: A10 (`docs/design/v1-2-6-r0/ARBITRAGES.md`), REVUE.md:85.
|
||||
- D4 ruling: the spec archives its own published sheets (reachable state, out of the catalogue) rather than soft-deleting them, because the application never deletes a sheet that had a published version (§6.9); the owner's authorisation of soft deletion covers it. Its own grant is revoked by id.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. Integrity class: for `fingerprint_mismatch`, `drawing_hash_mismatch`, `drawing_missing`, `invalid_document`, the card shows « Contrôle d'intégrité échoué : cette version ne peut pas être affichée. » (EN « Integrity check failed: this version cannot be displayed. »), error tone, no « Réessayer »; name, « Publiée », « Version n » and « Consulter » (enabled, same href) kept. Unit-tested per kind through the real core.
|
||||
2. D1: `caps` shows « Cette version dépasse les limites de taille d'une fiche. » (existing key `catalogue.failure.caps`), never the integrity text, no « Réessayer ». Unit-tested.
|
||||
3. Other failures: warning tone, existing text (`catalogue.failure.<kind>`, `access_denied.title` for `denied`, the core's text for `core_unavailable`), « Réessayer » for that card only; `network` with the `wifi-off` glyph, others `alert`; no retry once the engine stopped for good. Unit-tested.
|
||||
4. D2: a version that passes but whose main view cannot be composed shows the existing `catalogue.failure.view` text in a neutral line with its counts; an engine failure there shows the core line with its retry. Never silent. Unit-tested.
|
||||
5. Retry: for `core_unavailable` it calls `coreRuntime().retry()` first; during an attempt the line and button stay mounted (`aria-disabled`, card `aria-busy`), clicks ignored; a repeated failure keeps the focus on « Réessayer » and is said again by a polite region cleared at each attempt; on success the focus moves to « Consulter » only if it was on that card's « Réessayer » or on `body`. Unit-tested, including unmount during an attempt (deferred answer, balanced blob URLs, one `free()` per preview).
|
||||
6. The card lines are not live regions; `Notice` keeps today's role and glyph at every existing call site (defaults tested).
|
||||
7. The check is never bypassed or changed: nothing under `crates/`, `packages/core-wasm/`, `apps/app/src/catalogue/catalogue.ts`, `apps/app/src/catalogue/preview.ts`.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && [ -z "$(git diff --name-only b895ecf..HEAD -- crates packages/core-wasm apps/app/src/catalogue/catalogue.ts apps/app/src/catalogue/preview.ts)" ] && echo CHECK_UNTOUCHED
|
||||
EXPECT: CHECK_UNTOUCHED
|
||||
8. The sheet page is unchanged.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && [ -z "$(git diff --name-only b895ecf..HEAD -- apps/app/src/app/routes/app/anatomy/SheetRoute.tsx apps/app/src/components/catalogue/CatalogueFailureNotice.tsx apps/app/src/catalogue/useSheetVersion.ts)" ] && echo PAGE_UNCHANGED
|
||||
EXPECT: PAGE_UNCHANGED
|
||||
9. One new key with the exact A10 texts, fr / en parity.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2/apps/app && grep -q "'catalogue.card.integrity_failed': \"Contrôle d'intégrité échoué : cette version ne peut pas être affichée.\"" src/i18n/fr.ts && grep -q "'catalogue.card.integrity_failed': 'Integrity check failed: this version cannot be displayed.'" src/i18n/en.ts && echo A10_OK
|
||||
EXPECT: A10_OK (quote style may differ per the dictionaries' convention; the text is what binds)
|
||||
10. Browser proof on the sandbox (`apps/app/e2e/shell/catalogue-integrity.spec.ts`): integrity in fr and en at desktop and 375 px (line, « Consulter » opening the unchanged sheet page notice, axe, no sideways scroll, 44 px); network in fr on both projects (abort one version with `route.fallback()` for the rest, remount by search, « Réessayer », focus). Exact counts recorded.
|
||||
11. D4 / P2: the spec cleans only what it created, by captured id: each own sheet archived through `private.set_sheet_status` and read back, its own grant revoked by id and read back; no statement matches by pattern; a guard before / after shows no pre-existing row changed.
|
||||
12. P1: `V1-2-6_OWNER_TRIAL.md` §4.16 in French on `pnpm db:sandbox trial` names the sandbox's pre-existing failing entries (anomaly A, by name, from a read-only query) and tells them apart from R4's own behaviour; the offline step names the remount and the wait.
|
||||
13. Exact test results kept in `.claude/tasks/TODO.md` and the documents; no failed suite called green; BLK-015, RR-13 and anomaly A stay separate open tracks.
|
||||
14. Documents as built: `V1-2-6_U1_CORRECTIONS.md` §R4 and §5 row C, the review's Part II row, `CHANGELOG.md`, `BROWSER_TESTS.md`, `.claude/tasks/TODO.md`.
|
||||
15. Gates: typecheck, lint, app unit suite, build; `pnpm check:all` exit 0 at the final head.
|
||||
16. No merge, no deploy, DEV unchanged, no write on the trial stack.
|
||||
|
||||
## FILE SCOPE
|
||||
apps/app/src/{catalogue/failure.ts,catalogue/useCardDetails.ts,components/catalogue/CardFailure.tsx,components/catalogue/CatalogueCard.tsx,components/ui/Notice.tsx,components/ui/Icon.tsx,i18n/fr.ts,i18n/en.ts}, apps/app/tests/**, apps/app/e2e/{support/catalogue.ts,support/admin.ts,shell/catalogue-integrity.spec.ts}, docs/**, CHANGELOG.md, .claude/tasks/**.
|
||||
Reference in new issue
Block a user