From fa41bc2e5bdf2f0b9e9417d7ceba8bb1bf0080bc Mon Sep 17 00:00:00 2001 From: bchanot Date: Fri, 13 Nov 2026 11:52:44 +0100 Subject: [PATCH] chore(memory): noisy-rewrite BDR-080, LRN-080 promoted to rule line /prune-memory step D (recall feedback 2026-11-12): BDR-080 title and lesson narrowed to the V1-1 DEV recette; LRN-080 status implemented, promoted to rule line .claude/rules/database.md (the rule itself is a separate /feat in this repo). --- .claude/memory/decisions.md | 4 ++-- .claude/memory/learnings.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index cfaedf79..98e4e19f 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -603,8 +603,8 @@ Decision (owner brief « Validation V1-1.5 et autorisation V1-1.6 Interface Anim Alt: section in client create form with two-call resume (contract §11.1 text; changes client form); role owner preselected; relation forms in modal or new routes; client id in query string; per-component species fetch; new `voided` failure kind (needs M3 change). Status: active. Not checked on DEV (M1-M3 pending, owner). -## BDR-080 — V1-1.6 validated; DEV procedure: restore check on sandbox, fingerprints, e2e:avatar out of the run (2026-10-26) +## BDR-080 — V1-1 DEV recette rehearsal only: restore check on sandbox db, md5 fingerprints, e2e:avatar excluded (2026-10-26) -Decision (owner brief « Validation finale V1-1 et préparation de la recette DEV »): V1-1.6 + V1-1 closure limits accepted; Claude reads DEV only, owner runs backup, `migration up`, acceptance, merge go. SUPABASE.md §3.3 rewritten: SQL through read-only helpers (`default_transaction_read_only`), step 2 counts + md5 row fingerprints + structure counts saved, Storage bytes by `docker cp …:/mnt -` tar, step 3b restore into `restore_check_v1_1` on sandbox db (same image) instead of DEV server, post.sql (workspaces, holders, species, grants, pgtap), before/after diff with exact expected deltas, `supabase status -o env | grep API_URL` (default output prints keys). `e2e:avatar` removed from run: writes beyond fixture. Browser acceptance = brief §11 (19 lines). +Decision (owner brief « Validation finale V1-1 et préparation de la recette DEV »), scope = V1-1 recette on DEV only: closure limits accepted; owner runs backup, `migration up`, acceptance, merge go, Claude reads DEV. SUPABASE.md §3.3 rewritten: SQL through read-only helpers (`default_transaction_read_only`), step 2 counts + md5 row fingerprints + structure counts saved, Storage bytes by `docker cp …:/mnt -` tar, step 3b restore into `restore_check_v1_1` on sandbox db (same image) instead of DEV server, post.sql (workspaces, holders, species, grants, pgtap), before/after diff with exact expected deltas, `supabase status -o env | grep API_URL` (default output prints keys). `e2e:avatar` removed from run: writes beyond fixture. Browser acceptance = brief §11 (19 lines). Alt: createdb scratch on DEV server (rehearsed form, but writes DEV server, typo risk on dropdb); throwaway postgres container (unrehearsed init); cold volume copy (stops DEV, restore = volume overwrite); keep e2e:avatar (touches bob + purge queue). Status: active. Steps 0-4 not run on DEV (owner). diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index c9bd7926..b3dac947 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -596,6 +596,7 @@ Apply: dependency-removal clauses state objective (no declared dep, no script, n Shown on this host (Docker rootless, daemon ip 127.0.0.1, CLI 2.120, images postgres 17.11.0.004, gotrue v2.197.0, storage v1.79.36, postgrest v16.4, mailpit v1.31.3): own network + `-p 127.0.0.1:<57xxx>` per service, no `-v` (images declare no VOLUME → nothing to drop at teardown, `docker rm -f` of literal names suffices). db needs the CLI's role-password init (`/etc/postgresql.schema.sql` via `--entrypoint sh -c`); GoTrue + storage-api migrate their schemas on start; then the CLI's own runners take `--db-url`: `migration up` (records history like DEV), `test db` (pg_prove, rows unchanged), `gen types`. Upgrade path = `--workdir` copy holding the older migrations, then `migration up` from the repo. Real sessions prove what PGlite cannot: concurrency (two psql sessions), GoTrue sign-up/confirm via Mailpit API, PostgREST role refusals, residual GoTrue-admin path. `pg_dump -Fc` as postgres with the container's `$POSTGRES_PASSWORD` dumps auth data too; restore with `--no-owner` keeps every row, prints only managed-object privilege errors. Limits: one host; not a hosted project; vault/realtime/edge absent; CLI may change bind/runner behaviour across versions. Apply: `scripts/db-sandbox.sh` (`pnpm db:sandbox`) for every migration step; DEV changes stay owner actions. +- **Status (2026-11-13)**: implemented, promoted to rule line .claude/rules/database.md ## LRN-081 — `supabase gen types --db-url` to the sandbox needs `?sslmode=disable` (2026-10-25)