Owner run: the CLI prints 'All services bind to 0.0.0.0' and ignored the
rootless daemon's default address; the gateway could not share 54321/54324
with 0.0.0.0 listeners. Now: Kong serves the API directly; the DEV gateway
serves only Mailpit with basic auth on <DEV host>:54325; ENVIRONMENTS.md §3
gives the exact UFW rules (interface-scoped deny on 54322-54324, two cases
by current UFW state), rollback and impact; dev:net-check proves the
allowed surfaces from a distinct Docker network (5/5 OK) and prints the
refusal checks to run from another device, since a rootless container's
traffic to the host is delivered locally and cannot see the LAN firewall.
LRN-053 corrects LRN-052.
The Supabase CLI publishes 54321-54324 on every interface with no bind
option. Design: the rootless daemon binds published ports on loopback by
default (~/.config/docker/daemon.json {"ip":"127.0.0.1"}, owner action,
not applied), and the DEV gateway (Compose service dev-gateway, profile
dev, container faunosteo_dev_gateway) re-publishes only the API (Kong) and
Mailpit behind HTTP basic auth on FAUNOSTEO_DEV_HOST; Studio and PostgreSQL
stay loopback (SSH tunnel for Studio). pnpm dev:gateway generates the Mailpit
credentials (gitignored; htpasswd 644 because the rootless container user
cannot read a 600 file, hash only). pnpm dev:net-check probes from a
throwaway container on its own Docker network: app, API health, REST 401,
Mailpit 401/200, PostgreSQL and Studio closed. Gateway proven on alternate
ports (health 200, password login 200, Mailpit 401 / 200).
The owner tests from other devices of the private network: every test
surface is addressed by the machine's LAN address, never 127.0.0.1 or
localhost, never hard-coded. scripts/dev-env.sh decides the host once
(hostname -I, FAUNOSTEO_DEV_HOST override, production hosts refused);
scripts/supabase.sh exports it for every CLI call (pnpm db:*, pnpm supabase)
because config.toml now reads api.external_url (mail links), auth.site_url
and studio.api_url with env(); scripts/dev.sh = pnpm dev on that origin,
pnpm dev:offline keeps the local tool alone; dev-lan.sh removed.
Verified: GoTrue API_EXTERNAL_URL and Studio SUPABASE_PUBLIC_URL on the LAN
address, a signup mail linking to http://<lan>:54321/auth/v1/verify, the
four published ports answering from a separate Docker network, and the
10-step procedure in headless Chromium at the LAN origin with every request
URL audited (no 127.0.0.1 / localhost).
Fourth audit (PASS, residual MEDIUM): one account could hold real bytes
during the grace with no bound. begin_avatar_upload now refuses rate_limited
when the caller's objects under its two prefixes plus one cap exceed
private.account_byte_budget(); pending claims count one 5 MiB cap each
(the declared size is not enforced by the upload); an object without a size
does not cancel its claim. pgTAP (plan 140): landed upload charged once by
its bytes, per-account budget refusal. STORAGE.md names the residuals
(colluding accounts at their budget, filesystem quota) and the musl ndots
detail.
Third audit (BLOCK 1): counting terminal rows while queued let begin spam
pin the ceiling with declared sizes. The ceiling now sums storage.objects
sizes of the bucket (whatever the row's state) plus the declared size of
pending_upload rows whose quarantine object has not landed: a claim dies
with its row, a present object counts whatever its row says, no full scan of
the assets history. confirm_asset_upload treats an object without a size as
upload_missing. pgTAP (plan 138): rejected rows without bytes weigh nothing,
pending claims fill, superseded claims vanish, present bytes fill, unsized
object refused. Worker: a single-label cleartext host must start with an
ASCII letter (0X… hex forms refused, test added); STORAGE.md names the
native-run search-domain residual.
Re-audit findings: the ceiling now also counts terminal rows whose keys still
wait in the purge queue (contract wording kept honest, residual named);
confirm_asset_upload refuses an object larger than the declared size;
can_upload_avatar_object joins profiles.active; pgTAP covers the null
sha256 guard on a live lease, the three service_role revocations, the
queued-purge accounting and the deactivated-account upload (plan 137).
Worker: cleartext http only for localhost, a dotted-quad loopback address or
a non-numeric single-label name (numeric and hex hosts refused, tests added).
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.
The ci.yml step assigns git status to a variable before testing it (a git
failure now fails the step, as scripts/check-all.sh already did); both gates
pass --untracked-files=all; the rust-check.sh comment names the real gate.
RUST.md §1 (three environments, native install recipe, what stays in Docker
and why), §4 (pre-merge gate, workflow files prepared and never run), §5.8
(native run numbers against the builder image), §6; CLAUDE.md stack row,
commands, map, workflow rule; README quick start and verification; DEPLOY.md
CI status; WORKSPACE.md; TEST_STRATEGY.md; CHANGELOG; review Annex C.1
addendum of 2026-10-13.