diff --git a/.claude/memory/evals.md b/.claude/memory/evals.md index 7991392a..d1e7cf7d 100644 --- a/.claude/memory/evals.md +++ b/.claude/memory/evals.md @@ -115,3 +115,10 @@ Method: user manual tests round 1 (logos absent, picker blurry) → reproduction Result: neither visual defect reproduced here (4 environments, 2 engines, 2 PDF renderers); shipped the environment-independent fixes (branding bundled, no fetch; warnings surfaced) and the user confirmed logos + crisp text. Scanner: verifier CONFORME 7/7; audit 1 PASS + 2 MEDIUM (Chromium DecompressionStream read-ahead defeats the cancel: +2.2 GB on a 4 GiB bomb; ×32 candidate CPU) → executor (16 KiB slice feeding, shared 16 MiB budget, monotonic bounded endstream search, `{` pre-check; 133 pdf tests) → audit 2 focused. Workspace 710 tests, build, docker green. Anomalies: the blur fix of the previous round (will-change) had been marked PARTIALLY MET "desktop by user" — the user's "still blurry" came from that unverified half; this round could not verify real-GPU text rendering either (headless engines render grayscale AA, headed captures failed) → lesson: a screen-rendering defect needs the user's own capture + an A/B recipe early, not days of headless measurement. The Node vitest suite cannot observe browser stream read-ahead: record browser-only bounds as owed manual checks (PDF_IMPORT_HARDENING §5). Action: BLK-009 stays "mitigated, gate open" (BDR-040); Step 6 finished into develop; release/0.2.0 prepped for the user's go. + +## EVAL-015 | 2026-10-11 | Step 7 identity — gates on the whole step + +Method: contract with 16 criteria (`2026-10-11-step-07-verify.md`) → fresh verifier; security-auditor (semgrep 159 rules + checklist) on `c746952..HEAD`; headless e2e vs the local stack (playwright-core in scratchpad, Mailpit API); real-stack pgTAP + docker build by the orchestrator. +Result: verifier pass 1 ECARTS(2): (a) real gap, `safeNextPath` prefix check let `/\host` and `//host` through (router `location.assign` fallback = open redirect after login) → fixed by resolving against a sentinel origin and rebuilding from parsed parts, 5 new cases; (b) contract regex over-matched other unions (`'google' | 'apple'`, `'fr' | 'en'`) → CHECK scoped. Pass 2 CONFORME 16/16. Security PASS, 1 MEDIUM (same redirect, already fixed) + 4 LOW: 3 closed same session (sign-out failure reported, `reauthentication_needed` phrased, exact prod redirect allowlist documented), 1 pre-existing (TOTP not enforced for staff = documented gap). E2E 20/20. Workspace 763 tests, lint 0, build, docker, real-stack pgTAP 280 green. +Anomalies: both gates found the same redirect hole my own tests missed → a prefix check on a URL is never enough, parse it; the auditor misread the sign-out note ("this device") as "everywhere" but the LOW still pointed at a silent failure path worth phrasing. Mockups validated with ChatGPT are not in the repo: the screens follow the written direction and the existing tokens, pixel fidelity unverifiable here. +Action: awaiting user validation of Step 7 (manual procedure IDENTITY.md §5); release/0.2.0 still open for the human go. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index edd6cb72..3ccd2bb5 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -214,4 +214,4 @@ User round 2: logos OK, picker text crisp, flows OK → STEP 6 VALIDATED. Decisi ## 2026-10-11 (Step 7 implementation) -User: mockups validated (external, not in repo), implement Step 7 on a branch. feature/step-07-identity-app-shell off develop (release/0.2.0 still open, awaiting go). Foundation: packages/supabase auth/profile/roles services (closed AuthFailure kinds), migration 20261011100000 professional columns + pgTAP 009 (PGlite 22/22, real stack 280/280, types regenerated), config.toml TOTP on + google/apple via env(), `APP_AUTH_PROVIDERS`. App: authStore + localeSync + AuthProvider, routes /login /signup /forgot-password /reset-password /auth/callback, guards, AppLayout (sidebar / top bar / drawer), dashboard (profile completeness, local tool, account), Mon compte (4 sections, one save each), Home entry when configured. Tests 277 app + 24 supabase, lint 0, typecheck, build, docker OK; impeccable detect clean; headless e2e against the local stack 20/20 (guard, login, account save, SIRET error, language, mobile no overflow, drawer, logout, signup → Mailpit confirmation → /app, recovery → reset → login). Docs: IDENTITY.md, CLAUDE.md, SUPABASE.md, CHANGELOG, plan note. BDR-041, LRN-047. Gates (verifier, security) dispatched; awaiting user validation; `.env.example` edit denied (file rule) → user adds `APP_AUTH_PROVIDERS=`. +User: mockups validated (external, not in repo), implement Step 7 on a branch. feature/step-07-identity-app-shell off develop (release/0.2.0 still open, awaiting go). Foundation: packages/supabase auth/profile/roles services (closed AuthFailure kinds), migration 20261011100000 professional columns + pgTAP 009 (PGlite 22/22, real stack 280/280, types regenerated), config.toml TOTP on + google/apple via env(), `APP_AUTH_PROVIDERS`. App: authStore + localeSync + AuthProvider, routes /login /signup /forgot-password /reset-password /auth/callback, guards, AppLayout (sidebar / top bar / drawer), dashboard (profile completeness, local tool, account), Mon compte (4 sections, one save each), Home entry when configured. Tests 277 app + 24 supabase, lint 0, typecheck, build, docker OK; impeccable detect clean; headless e2e against the local stack 20/20 (guard, login, account save, SIRET error, language, mobile no overflow, drawer, logout, signup → Mailpit confirmation → /app, recovery → reset → login). Docs: IDENTITY.md, CLAUDE.md, SUPABASE.md, CHANGELOG, plan note. BDR-041, LRN-047. Gates (verifier, security) dispatched; awaiting user validation; `.env.example` edit denied (file rule) → user adds `APP_AUTH_PROVIDERS=`. Gates: verifier ECARTS(2) → `safeNextPath` parser-escape fix (+5 tests) + contract CHECK scoped → CONFORME 16/16; security PASS (MEDIUM = same redirect; LOWs: sign-out failure alert, `reauthentication_needed` kind, prod redirect allowlist doc). EVAL-015. Real-stack pgTAP 280, build, docker green. Stop: user validation. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 565394a9..f7313159 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -124,7 +124,7 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo - [x] 7.6 /app/account: personal (display, first, last, phone), professional (title, practice, siret), preferences (locale, timezone), security (change password, logout, MFA gap note), roles badge read-only - [x] 7.7 Home coexistence: "Mon espace / Se connecter" entry on the header when configured; characterisation tests T12 unchanged with default config - [x] 7.8 tests: config, authStore (fake client), locale sync, forms, guards, shell, dashboard, account; i18n parity; pgTAP 009 (PGlite + real stack 280/280); root check + docker build green; headless e2e vs local stack 20/20 (signup via Mailpit, recovery, logout, mobile) - - [ ] 7.9 docs: IDENTITY.md (routes, session, providers, MFA gap, manual validation), SUPABASE.md, CLAUDE.md, CHANGELOG, plan note DONE; memory BDR-041, LRN-047, journal DONE; verifier + security gates dispatched; EVAL after gates; STOP for user validation (user action: `.env.example` += `APP_AUTH_PROVIDERS=`, file edit denied) + - [x] 7.9 docs (IDENTITY.md, SUPABASE.md, CLAUDE.md, CHANGELOG, plan note); memory BDR-041, LRN-047, EVAL-015, journal; gates: verifier ECARTS(2) → open-redirect fix + contract CHECK → CONFORME 16/16; security PASS (MEDIUM fixed, 3 LOW closed, TOTP enforcement = documented gap). AWAITING USER VALIDATION (IDENTITY.md §5); user action: `.env.example` += `APP_AUTH_PROVIDERS=` (file edit denied here) --- ## Phase A — DONE (kept for reference)