From 5a125961957e2125b26aac26d89c37bcc439d742 Mon Sep 17 00:00:00 2001 From: bchanot Date: Tue, 13 Oct 2026 22:07:00 +0200 Subject: [PATCH] =?UTF-8?q?chore(memory):=20R1=20validated=20and=20merged,?= =?UTF-8?q?=20identity=20and=20environments,=20LAN=20rule=20=E2=80=94=20BD?= =?UTF-8?q?R-049,=20journal,=20TODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/memory/decisions.md | 6 ++++++ .claude/memory/journal.md | 4 ++++ .claude/tasks/TODO.md | 2 ++ 3 files changed, 12 insertions(+) diff --git a/.claude/memory/decisions.md b/.claude/memory/decisions.md index eefad8a6..91a9fd07 100644 --- a/.claude/memory/decisions.md +++ b/.claude/memory/decisions.md @@ -388,3 +388,9 @@ Status: active; awaiting the owner's final validation before R1. Built on STEP8 D1–D9 (D1 = Rust worker, D3 = top-bar avatar + name → Mon compte). Choices beyond the analysis: (1) `assets.lock_token` uuid set by `claim_avatar_jobs`, required by complete/reject → stale worker after lease expiry refused (`invalid_state`), not only superseded rows; (2) complete refused → worker deletes nothing, purge queue owns every object of a terminal row (the analysis' "delete the clean object it wrote" would race a legit re-claim); (3) key-driven quarantine sweep = SQL anti-join RPC `claim_quarantine_leftovers` on `storage.objects` (same DB) instead of paginated Storage API listing; `expire_pending_uploads` RPC for the 24 h expiry; (4) closed refusals = SQLSTATE P0001 with the code as message, authz = 42501; TS/Rust map message → closed kind only when it has the code shape; (5) worker HTTP = `ureq` 3 (rustls + ring, webpki-roots), hand JSON log lines, 25-line base64url decoder: deviation from review Part V (tokio/reqwest/tracing/base64) justified by sequential loop + smaller keyed-process tree (34 → 84 crates, no aws-lc-rs/cmake); (6) Storage API v1.79 answers a missing object HTTP 400 + statusCode "404" → normalised to 404 = purge done (found by the e2e, queue entries looped otherwise); (7) e2e = vitest file outside the default include, runner script starts the worker container (5 s sweep, 0 grace), fresh admin-created user per run (10/h rate limit), purge clock shifted via `docker exec psql`; (8) `run --check` exit 0 when startable OR wholly unconfigured (check:all envless stage), 2 on partial config; (9) `.env.worker*` not writable here (file rule) → documented in DEPLOY.md, user creates it; (10) R1 branch cut from the R0 tip because `gitflow finish` of R0 was refused by the harness classifier. Alt rejected: profile column avatar pointer (D5 kept derived); signed read URL (bearer outlives row flip); Storage listing sweep (3-level prefix pagination); reqwest blocking (pulls tokio). Status: active; awaiting owner validation (TEST FONCTIONNEL + TEST GRAPHIQUE), no merge. + +## BDR-049 | 2026-10-13 | Identity Faunosteo / faunosteo.com; DEV-STAGING-PROD; DEV reachable on the private network; R0+R1 validated and merged + +Owner decisions: (1) R1 validated 10/10 manual + graphic → R0 and R1 finished into develop (5cfb6f1, f5865f0; the earlier classifier refusal did not recur); (2) identity final: product/app/site = **Faunosteo**, domain **https://faunosteo.com**, no new brand name, logo/palette/mockups kept; (3) environments: DEV = self-hosted Ubuntu native (Claude Code, git, rustup, Vite, Docker rootless, local Supabase, worker), STAGING = `staging.faunosteo.com` planned not created, PROD = separate VPS, current site preserved, no DNS/cert/proxy/data change; isolation of DB/Storage/secrets/accounts/OAuth/payments/mails/files per env, prod data never copied to DEV, merge ≠ deploy, no CI/CD operational (workflows preparatory); (4) permanent rule: the owner tests from other devices (computer, phone) → every test surface addressed by the DEV origin (LAN address or private name), never 127.0.0.1/localhost, never hard-coded; implemented as `scripts/dev-env.sh` (`FAUNOSTEO_DEV_HOST`, detected via `hostname -I`, prod host refused) + `scripts/supabase.sh` wrapper (config.toml `env()` for api.external_url, auth.site_url, studio.api_url) + `scripts/dev.sh` (`pnpm dev` on the origin, `pnpm dev:offline` without backend) + private-network redirect URLs; (5) exposure: 5173/54321 needed by browsers, Studio 54323 + Mailpit 54324 unauthenticated → private subnet only, PostgreSQL 54322 published by the CLI on 0.0.0.0 (no bind option) → firewall restriction proposed to the owner, not applied; worker no port; (6) Rust native via Cargo, Docker for services/worker/sandbox/images/prod, VPS never compiles. +Alt rejected: hard-coded IP in config.toml (first iteration, replaced the same day); Vite `dev:lan` variant (folded into `dev`); binding the CLI ports to loopback (impossible in config.toml). +Status: active; `chore/dev-lan-access` awaiting the owner's LAN validation; R2 not started. diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index aceee697..fc4f80b8 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -240,3 +240,7 @@ Owner brief: dev = Ubuntu native server, Docker for services/isolation/images, V ## 2026-10-13 (Step 8 = Rust R1 delivered) Owner validated R0, go for R1 with D1–D9 (D1 Rust worker, D3 top-bar avatar). `gitflow finish` of R0 refused by the classifier → R1 branch feature/step-08-files-foundation cut from the R0 tip (owner finishes both). Delivered: migration 20261013100000 (assets, 7 private buckets, avatar policies through assets, purge queue, 11 RPCs, lease token, per-account byte budget + bytes-present ceiling), pgTAP 010 (140), worker R1 loop (ureq, config/log/keys/backend/http/job/sweep/watchdog, 11 loop tests, child untouched, allowlist unchanged), TS assets layer + avatar UI (Mon compte, sidebar, drawer, top bar), real-stack e2e + runner, compose worker profile, STORAGE.md + docs. Gates: verifier CONFORME (pass 2), security PASS after 5 passes (1 BLOCK from my own fix), check:all ×4 green, e2e ×7, Chromium smoke 18/18. BDR-048, LRN-051, EVAL-019. Stop: owner manual validation; no merge, no deploy, no release. + +## 2026-10-13 (R1 validated, merges, DEV on the LAN) + +Owner: R1 10/10 validated, identity final (Faunosteo, faunosteo.com), env DEV/STAGING/PROD, permanent LAN-access rule. gitflow finish R0 then R1 → develop (linear graph, two merge commits, branches deleted). chore/dev-lan-access: DEV origin centralised (`scripts/dev-env.sh`, CLI wrapper, `pnpm dev` on the LAN, config.toml via env()), ENVIRONMENTS.md, docs, CHANGELOG. Verified: GoTrue/Studio on the LAN address, signup mail link on the LAN, probes from a separate Docker network (app/api/mailpit 200, studio 307), 10-step procedure in headless Chromium at http://192.168.1.100:5175 computer + phone 26/26 with URL audit. Firewall state unreadable (no sudo) → proposal to the owner (54322 loopback, 54323/54324 subnet). BDR-049. Stop: owner LAN validation + R2 go. diff --git a/.claude/tasks/TODO.md b/.claude/tasks/TODO.md index 058deef2..250c2f6d 100644 --- a/.claude/tasks/TODO.md +++ b/.claude/tasks/TODO.md @@ -136,6 +136,8 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo - [x] 8.6 integration: docker-compose `worker` service under profile `worker` (read-only, cap_drop ALL, no-new-privileges, mem 512m, cpus 1, pids 64, external Supabase network), `.env.worker` variables documented (file not editable here), real-stack e2e `pnpm --filter @faunosteo/supabase test:e2e` (worker container against the local stack: Alice flow clean + download 200, replace, remove, Bob 400, anon 400, quarantine 400, late signed-upload bytes swept, purge after grace via clock shift) - [x] 8.7 docs: STORAGE.md final (model, keys, statuses, worker operations, purge/grace, reconciliation query, backup ordering + invariant, managed migration runbook), DEPLOY.md (worker service, env file, network, CSP connect-src), SUPABASE.md (worker in dev, buckets), RUST.md §3 (R1 loop), WORKSPACE.md, TEST_STRATEGY.md, IDENTITY.md §5 avatar steps, docs/design/README.md (avatar built), CLAUDE.md, CHANGELOG; CI yml untouched beyond a comment (no runner) - [x] 8.8 verify: `pnpm check:all` ×4, PGlite + real stack pgTAP (140 / 420), types unchanged, worker image + sandbox tests, e2e ×7, Chromium smoke 18/18, verifier CONFORME (pass 2), security PASS after 5 passes (BLOCK on my ceiling join fixed: bytes-present ceiling + 64 MiB per-account budget); BDR-048, LRN-051, EVAL-019, journal. OPEN: owner manual validation; owner runs `gitflow finish` for feature/rust-r0-foundation then, after validation, for this branch; `.env.worker` to create by hand (DEPLOY.md); residual LOWs documented in STORAGE.md §2.1 (colluding-account ceiling fill, search-domain on native glibc runs, ceiling race) + - [x] 8.9 owner validation 2026-10-13: 10/10 manual + graphic → R0 (5cfb6f1) and R1 (f5865f0) finished into develop; identity + environments + LAN rule → BDR-049 +- [ ] chore/dev-lan-access (2026-10-13): DEV origin centralised (`scripts/dev-env.sh`, `pnpm supabase` wrapper, `pnpm dev` on the LAN, config.toml env()), ENVIRONMENTS.md; automated 26/26 at http://192.168.1.100 (computer + phone viewports, URL audit); AWAITING owner's validation from their own devices + firewall decision (54322 loopback, 54323/54324 subnet) before finish - [ ] Rust by default (rule adopted 2026-10-12, BDR-043; orientation + 10 principles VALIDATED by the owner 2026-10-12, BDR-044; study `docs/development/RUST_ARCHITECTURE_REVIEW.md` rev 2 + Annex A decision table + Annex B R0 scope on chore/step-08-files-analysis; AWAITING the owner's validation of decisions D-R1..D-R14 (D-R6 withdrawn); R0 and Step 8 NOT started until then). Roadmap (each phase: oracles frozen with the old code, consumer-driven deletion, rollback row, gates): - [ ] R0 foundation (GO 2026-10-12, BDR-045; branch feature/rust-r0-foundation; Annex B; owner constraints: builds reproducible in Docker, no Rust on the VPS, live deployment untouched, frontend never loads the module, no R1): - [x] R0.1 toolchain: `docker/rust-builder.Dockerfile` (rust:1.99.0-bookworm + wasm target + wasm-bindgen-cli 0.2.129 + cargo-deny 0.20.2 + rustfmt/clippy), `docker/rust-run.sh` (named volumes faunosteo_cargo_registry / faunosteo_rust_target), `docker/rust-check.sh`, `docker/wasm-build.sh` (CLI/crate version lock), root scripts rust:builder / rust:check / wasm:build / worker:test / worker:image