From 2d7f4c16ed51c212a7b41b474b808dc32b12cb4c Mon Sep 17 00:00:00 2001 From: bchanot Date: Sat, 14 Nov 2026 19:16:40 +0100 Subject: [PATCH 1/2] docs(rules): migrations run on the throwaway sandbox first (LRN-080 promotion) --- .claude/rules/database.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.claude/rules/database.md b/.claude/rules/database.md index 14d4b318..6abb3352 100644 --- a/.claude/rules/database.md +++ b/.claude/rules/database.md @@ -15,6 +15,8 @@ paths: ["supabase/migrations/**", "supabase/tests/**", "packages/supabase/**", " from public and granted only to the roles that evaluate them. - A migration is never edited once applied. Each migration ships its pgTAP file with allowed AND denied cases, and a regenerated `database.types.ts`. +- Every migration step runs first on the throwaway sandbox (`pnpm db:sandbox`, + `scripts/db-sandbox.sh`), never against DEV; changes to DEV stay owner actions (LRN-080). - The browser holds the anon key only. The `service_role` key value never appears in env.js, .env.example or code; operator scripts under `packages/*/scripts/` read it from the environment and are never bundled. - pgTAP files run on PGlite and on the real image: scope counts to fixture ids, pin `collate "C"` on text ordering. From 8992c19ae6737f088e306bfeda09358bfbec63b6 Mon Sep 17 00:00:00 2001 From: bchanot Date: Sat, 14 Nov 2026 19:16:41 +0100 Subject: [PATCH 2/2] chore(memory): sandbox rule line journal --- .claude/memory/journal.md | 3 +++ .../2026-11-14-sandbox-rule-line-1410.md | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .claude/tasks/contracts/2026-11-14-sandbox-rule-line-1410.md diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index ec509414..24d81be6 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -459,3 +459,6 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp ## 2026-11-02 - bugfix/avatar-e2e-sandbox-only: develop e2e:avatar → sandbox only (3a4614b, e8da0d9, d3dfd03). Proofs a-j strace with forged JWTs, 2 × 5/5, DEV untouched. Verifier CONFORME 10/10, security PASS ×2. BLK-013, LRN-095, TODO RR-11. Owner authorised merge into develop; worktree kept. + +## 2026-11-14 +- chore/sandbox-rule-line: LRN-080 promotion made true, .claude/rules/database.md gains the db:sandbox line (block F claimed it 2026-11-13 without the line). Security PASS. diff --git a/.claude/tasks/contracts/2026-11-14-sandbox-rule-line-1410.md b/.claude/tasks/contracts/2026-11-14-sandbox-rule-line-1410.md new file mode 100644 index 00000000..eade8986 --- /dev/null +++ b/.claude/tasks/contracts/2026-11-14-sandbox-rule-line-1410.md @@ -0,0 +1,22 @@ +# CONTRACT — sandbox-rule-line (LRN-080 promotion made true) +- date: 2026-11-14 | flow: hotfix | branch: chore/sandbox-rule-line (off develop) +- status: active + +## REQUEST (verbatim — IMMUTABLE) +faunosteo: LRN-080 status (2026-11-13, block F) says "implemented, promoted to rule line .claude/rules/database.md" but that rule file has no sandbox line: the promotion claim is false. Add one bullet to .claude/rules/database.md from LRN-080's own Apply text: every migration step is tried first on the throwaway sandbox (`pnpm db:sandbox`, scripts/db-sandbox.sh), never on DEV; DEV changes stay owner actions. 1 file. + +## CLARIFICATIONS +- [gated 2026-11-14] wording = LRN-080 Apply line; no challenge (doc line, no behaviour); placed right after the "A migration is never edited once applied" bullet. + +## ACCEPTANCE CRITERIA +1. The rule file carries the sandbox line. + CHECK: grep -c 'db:sandbox' .claude/rules/database.md + EXPECT: 1 + EVIDENCE: PENDING +2. Frontmatter unchanged, project rules check green. + CHECK: git diff -U0 .claude/rules/database.md | grep -c '^[-+]paths:' + EXPECT: 0 + EVIDENCE: PENDING + +## FILE SCOPE +.claude/rules/database.md