From 882905ed211d4ca3be882fa34047c0abc00e82e8 Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 2 Nov 2026 00:34:04 +0100 Subject: [PATCH] fix(supabase): sheet-assets guard review LOWs (one destination, no anon key at build, issuer wording) --- CLAUDE.md | 2 +- docs/development/SUPABASE.md | 2 +- scripts/sheet-assets-e2e.sh | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c11150e1..d49161f8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,7 +135,7 @@ pnpm preview:draft # same, then serves it pnpm import:equine --check | --out # since R5.6 the official seed writer: the Rust pipeline (same as `pnpm r5:import-equine`), fingerprint `sha256-rfc8785-validated-v1`; the TypeScript generator left at R5.7 (replayed from a historical revision only, RUST.md §11.23) pnpm r5:import-equine --check | --out # the Rust pipeline (R5.2 importer, R5.3 draft, R5.4 review files): compare the 18 generated files with the committed folders (bytes; app drawings under the declared R3 rule), or write /{legacy-import,draft} into an empty folder; never deletes (scripts/import-equine.sh, first run compiles) pnpm assets:upload [--check] # R5.5: uploads the sheet drawings of a generated seed folder to the LOCAL stack's private bucket (Rust `upload-sheet-assets`, feature `upload`; SUPABASE_URL local with a port, SUPABASE_SERVICE_ROLE_KEY typed, never printed; no overwrite, confirm after verify; run by hand, scripts/upload-sheet-assets.sh) -pnpm e2e:sheet-assets # scripts/sheet-assets-e2e.sh: sandbox only, refuses before any request unless the sandbox gateway URL and sandbox-issued keys are set (its runner `pnpm db:sandbox sheet-assets-e2e` arrives with V1-2); never DEV +pnpm e2e:sheet-assets # scripts/sheet-assets-e2e.sh: sandbox only, refuses before any request unless the sandbox gateway URL and keys naming the sandbox issuer are set (its runner `pnpm db:sandbox sheet-assets-e2e` arrives with V1-2); never DEV pnpm report:compare ... # archive check: attachment vs its v3 reading, unresolved items flagged (docs/PDF-FORMAT.md); the core's `report-compare` binary since R4.7 (scripts/report-compare.sh, first run compiles) # Rust (docs/development/RUST.md) — native toolchain (user-level rustup, channel of rust-toolchain.toml) first diff --git a/docs/development/SUPABASE.md b/docs/development/SUPABASE.md index b0c1e58e..d5487f4e 100644 --- a/docs/development/SUPABASE.md +++ b/docs/development/SUPABASE.md @@ -159,7 +159,7 @@ never printed and goes through no proxy. `pnpm e2e:sheet-assets` runs the whole behaviour (upload, rerun, anon and wrong key, refused destinations, unreachable port) on the throwaway sandbox only: since 2026-11-02 it refuses, before building or any request, every target but the sandbox gateway -`http://127.0.0.1:57800` with keys issued by the sandbox (its runner +`http://127.0.0.1:57800` with keys naming the sandbox issuer (its runner `pnpm db:sandbox sheet-assets-e2e` arrives with V1-2); it never reads the DEV keys and never targets DEV. The TypeScript tool (`packages/supabase/scripts/upload-sheet-assets.ts`) was deleted at R5.7 (RUST.md §11.23). diff --git a/scripts/sheet-assets-e2e.sh b/scripts/sheet-assets-e2e.sh index d41a7349..eb898170 100755 --- a/scripts/sheet-assets-e2e.sh +++ b/scripts/sheet-assets-e2e.sh @@ -24,8 +24,8 @@ try: except Exception: sys.exit(1)'; } if [ "${SUPABASE_URL:-}" != "$SANDBOX_URL" ] || ! sandbox_key "$SERVICE" || ! sandbox_key "$ANON"; then - echo "sheet-assets-e2e: refused, nothing was run. Sandbox only: the sandbox gateway URL and sandbox-issued" >&2 - echo "keys, set by pnpm db:sandbox sheet-assets-e2e where that runner exists; it never targets DEV." >&2 + echo "sheet-assets-e2e: refused, nothing was run. Sandbox only: the sandbox gateway URL and keys naming" >&2 + echo "the sandbox issuer, set by pnpm db:sandbox sheet-assets-e2e where that runner exists; it never targets DEV." >&2 exit 2 fi @@ -34,8 +34,8 @@ SEED=supabase/seed/anatomical-sheets/equine/draft BIN=target/release/upload-sheet-assets FAIL=0 -env -u SUPABASE_SERVICE_ROLE_KEY cargo build --release --locked -q -p faunosteo-core --features upload --bin upload-sheet-assets || exit 2 -LOCAL=http://127.0.0.1:57800 +env -u SUPABASE_SERVICE_ROLE_KEY -u SUPABASE_ANON_KEY cargo build --release --locked -q -p faunosteo-core --features upload --bin upload-sheet-assets || exit 2 +LOCAL=$SANDBOX_URL # expect ; output kept to grep, keys never echoed. expect() {