The sandbox suites (stack.ts and its importers, the shell Playwright
config) stop before their first request unless the container, the
four loopback URLs and the key issuer are exactly the db:sandbox
ones; the LAN config accepts the 5193 trial app only. Drift and
wiring tests tie the constants to scripts/db-sandbox.sh.
After e2e:shell seeds the same content-addressed drawing, Storage answers HTTP 400 with statusCode 409 (KeyAlreadyExists); any other 400 still fails. Docs: M7 adds no new write path; a TOTP code replays more than once within its span.
Nav hint from own grants and roles (never a control); RequireCatalog, RequireAdmin (no admin read before aal2), Accès non autorisé page, placeholder routes; TOTP factor list, enrolment with QR and one-time secret, removal, inline step-up for aal2 actions, step-up in password reset; auth kind aal2_required. App 601, e2e:ui 227.
list_official_sheets_admin and get_official_sheet_admin: badges, version and round states, named actors; capability holders at aal2, one answer for unknown or forbidden ids, no write path. pgTAP 022 (40); sandbox fresh and upgrade from M6: 1938 pass, types match.
Ten cases on the pinned GoTrue: aal1 cannot enrol a second factor or remove a verified one (no STOP); removal downgrades only the sessions verified with that factor; password change and reset need aal2 once a factor is verified. Findings in IDENTITY.md §4.1.
fail_sheet_verification refuses lease_expired (the claim's record, never a
worker report); the sandbox state dir guard resolves the repository path; the
avatar suite also refuses keys not issued by the sandbox. pgTAP 021: 90.
resource_limit (intrinsic to the frozen input: frame, input or output cap,
SIGXCPU, SIGABRT, SIGSYS) and verdict_refused close the round at the first
occurrence; timeout, unavailable (now also an external SIGKILL) and
lease_expired keep the 2/5/10/20 s retries up to five attempts. pgTAP 021: 89;
sandbox case k closes at attempt 1.
pnpm e2e:avatar is now an alias of pnpm db:sandbox avatar-e2e and the DEV
script scripts/avatar-e2e.sh is removed; the suite fails on any target but
the sandbox gateway and database; an occupied port 57800 stops the run before
anything starts. The sandbox replaces the seed accounts' DEV password by a
per-session secret.
M6 amended in place (applied only to the throwaway sandbox): a hidden
not_before on the round, set by fail_sheet_verification and honoured by the
claim; RPC signatures unchanged. pgTAP 021 (68), sandbox cases i (delay with
the real worker), j (inputs at the caps, 2 MiB base), k (just beyond).
pnpm db:sandbox avatar-e2e runs tests/e2e/avatar-flow.e2e.ts with the real
worker (default mode) on the throwaway stack; the suite now requires its
database container by name, makes both accounts per run and expedites only
its own purges. Throwaway sandbox accounts get random passwords per run.
jsonb_path_query row by row is quadratic on PostgreSQL 17: a document of
200k numbers under the cap ran into the statement timeout. One
jsonb_path_query_array call, then its elements. pgTAP 017 saves 600 000
numbers; the perf suite times 600k (saved) and 1M (closed code) over HTTP.
M6 option A: grant_catalog_right no longer refuses an owner granting
itself sheet_reviewer; authors stay refused at acknowledgment, approval
and publication. The document cap is the UTF-8 bytes of the JSON text:
check_document_structure drops pg_column_size and M5 replaces the base
table CHECK by octet_length(content::text). pgTAP 015 and 017 cover the
owner-reviewer journey and cap - 1, cap, cap + 1, multi-byte, dense.
F18 and workspaces no longer leave the seed owner changed. Ten two-session
scenarios with a blocking session, seed-owner AR-1 acceptance, shim columns
against the image, save/submit/approve/publish timed at the caps.
Approval needs an active sheet (lock sheet, version, round); a base only
from a still-published round version; rights.mfa before rights.capability;
withdrawal of a published round refused; approver separation at publish;
deprecate and working copy serialised; closed codes; append-only acks;
upload policy bound to the registering editor. pgTAP 017-019 added.
animals.ts: POST search with species filter and a probe row, read by id with
explicit columns, create with the optional first client in one call, update,
archive. relations.ts: an animal's relations in one select (voided left out),
create, end, dates, void. Kinds duplicate_relation and already_ended added.
fetchPersonalWorkspaceId, client search (keyset, one probe row), read by id
with explicit columns, create (request id), update (every field), archive,
client animals and archive preview, species labels; RecordFailure kinds of
contract §9.4 plus session_expired and network; RPC answers checked by Zod.
Unit tests and the same functions against real PostgREST on the sandbox.
A client whose only link was voided while current must not count the animal;
B linking its own animal to a client of A must not wait on A's lock. Also a
relation create racing the archive of its animal, and a replay changing the
initial relation's role.
Species rows (8 + other), animals with the D6b birth model, relations with
composite workspace keys, current/ended/voided states and a partial unique
index; definer RPCs for animals and relations (one lock order, shared write
budget, caps), invoker reads (search_animals, list_client_animals,
client_archive_preview) and search_clients with current_animal_count.
pgTAP 014 (254), parity test, sandbox suite, types from the isolated stack.
scripts/db-sandbox.sh (pnpm db:sandbox): DEV images on an own network, loopback ports distinct from DEV, no volume, secrets generated outside Git; fresh and upgrade modes through the CLI's migration up, test db and gen types with --db-url. packages/supabase/tests/sandbox: M1 sign-up and confirmation, reads and refusals per role, residual GoTrue admin path, correlation cap, concurrent sessions.
V1-1.1 (contract V1-1_OWNERS_ANIMALS.md §4, §8, §9). Tables workspaces and workspace_members, created with the profile by trigger through one atomic, idempotent write path; deferred invariant (a personal workspace has exactly its account as holder); backfill of existing profiles; access helpers caller_workspace_ids (active profile, confirmed email) and writable_workspace_ids; RLS select for members only; no privilege for anon or service_role. log_event keeps x-correlation-id only as a short token. pgTAP 012 (85 checks), census and types updated, config test.
A draft the core refuses as lone_surrogate is unreadable content: it
goes to osteo:quarantine:draft verbatim with the existing notice. An
import is refused as ImportError('lone_surrogate') with the owner's
wording (home.import.error_lone_surrogate, FR/EN), the file untouched.
The publish gate reads the kind as invalid_shape. Tests on the real
core: quarantine keeps the exact text, an editor action leaves the
report as it was, normal text with pairs and literal backslashes reads
unchanged.
publishSheetVersion(client, versionId, validate) takes the core's
sheet.check (the package never loads the module itself); anything but a
publishable verdict refuses publication before the RPC: invalid_shape,
not_publishable (same message as before: first error code), and
validator_unavailable when the core cannot run. Tests run on the real
Node core; the shape case now asserts the closed kind instead of any
throw. The package no longer depends on @faunosteo/domain.
Security audit (PASS, 2 MEDIUM + LOW): the global ceiling summed every
non-deleted row, so rejected uploads ratcheted it toward storage_full with no
disk used → in-flight rows by declared size, clean rows by byte_size, nothing
else (pgTAP: rejected rows do not count, in-flight rows do); confirm refuses a
deactivated account like begin; complete_avatar_job refuses a null sha256;
begin / confirm / remove granted to authenticated only. Worker: SUPABASE_URL
over http:// accepted only for loopback or a single-label Docker service
name; ureq proxy(None); the job's keys must embed its owner and asset ids;
backend_failure / claim_failed / sweep_failure lines carry the closed kind and
the HTTP status, never the library's error text. e2e: uuid shape checked
before the psql query. Contract revision 2 (oracle fixes).
packages/supabase/tests/e2e/avatar-flow.e2e.ts (pnpm e2e:avatar through
scripts/avatar-e2e.sh: worker container on the Supabase network, 5 s sweep,
no quarantine grace; a fresh account per run): clean upload and owner-only
download (Bob, anon, quarantine key, direct final-key write refused),
replacement purged after the grace (queue clock shifted through psql), late
bytes through a still-valid signed upload URL swept, hostile and corrupted
uploads rejected with closed codes, removal with the purge queue drained.
Worker: the Storage API answers a missing object with HTTP 400 and
statusCode 404; normalised to 404 so a purge of a never-written key is acked.
docker-compose.yml: service worker under the worker profile (read-only,
cap_drop ALL, no-new-privileges, 512m, 1 cpu, 64 pids, .env.worker, external
Supabase network). docs/development/STORAGE.md: the implementation contract.
packages/supabase assets module: closed AssetFailure kinds, begin / quarantine
upload (upsert off) / confirm / remove, own-row state read with an explicit
column list, download under the SELECT policy. App: client transport (magic
byte sniff, never SVG, createImageBitmap, canvas 1024 px, JPEG 0.9, 5 MiB
cap), AvatarSection (preview, save, 1 s polling up to 30 s, rejection and
failure messages per closed code, removal with confirmation, in-flight row
resumed at mount), auth store blob URL revoked on change and sign-out,
AvatarCircle in UserBadge and the top bar link to Mon compte (D3), FR/EN
strings, fake client extended, 27 new tests (app 300).