chore(memory): TODO + journal + BDR-009..011 + LRN-011..012

Mark B0/B1/B2/B5 done on TODO. Journal 2026-05-20 entry with the three
commit SHAs and a per-phase recap. Three new design decisions captured:
JSON snake_case kept in TS (BDR-009), snapshot labels at selection time
(BDR-010), hard-fail v1 PDF with FR-language message (BDR-011). Two new
learnings: Zod recursive schemas via z.lazy + explicit ZodType<T>
(LRN-011), once-per-session UX modal via sessionStorage flag (LRN-012).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.7 committed 2026-05-20 03:51:36 +02:00
1 parent b67f4cd82b
commit b7b094535e
4 files changed
+79 -65

No files matched your search

+25
View File
@@ -64,3 +64,28 @@ Status: closed — deviation accepted.
Each PDF page leads with bold-uppercase accent eyebrow (size 9), Times 22 title, 2pt × 48pt accent rule under title. Section labels follow same eyebrow style (uppercase bold accent) above their values. Observation severity rendered as filled color-coded pill (sage / amber / red) next to the obs number.
Alts: plain text titles only — rejected (overlapped header rule + read unstyled).
Status: closed.
---
## BDR-009 | 2026-05-20 | Findings JSON keeps snake_case in TS, observation snapshot uses camelCase
JSON catalog fields (name_fr/name_en/description_fr/requires_vet_referral/...) stay snake_case in TS types/Zod schema — no transform layer. Domain-expert authored, reads natural in JSON, zero remap cost. Observation Finding snapshot uses camelCase (labelFrSnapshot/labelEnSnapshot/requiresVetReferral) per app convention.
Alt: Zod transform to camelCase everywhere — rejected (extra layer, hides JSON shape, no real upside for a static catalog).
Status: closed.
---
## BDR-010 | 2026-05-20 | Observation findings snapshot labels at selection time
Finding stores labelFrSnapshot + labelEnSnapshot copied from leaf at click time. Exported reports remain readable years later even if catalog renames/restructures leaves. Path[] still carried for future re-link/migration.
Alt: lookup labels on render via path — rejected (breaks already-exported PDFs if catalog edits).
Status: closed.
---
## BDR-011 | 2026-05-20 | v1 PDF import — hard-fail with version-specific FR message
importReportFromPdf detects `data.version !== 2` BEFORE strict Zod parse, throws IncompatibleReportVersionError, wrapped into ImportError with explicit "v{n}, incompatible avec v2, réexportez..." message. No retro-compat shim (no prod PDFs in the wild).
Alt: silent generic ImportError — rejected (user can't tell why import failed).
Alt: v1→v2 migration adapter — rejected (no install base to justify cost).
Status: closed.