Commit Graph
91 Commits
Author SHA1 Message Date
bchanot 45d74536f5 feat(supabase): db:trial grants owner with one verified TOTP factor
Owner decision 2026-11-11: on the trial stack one verified factor suffices
for owner as for admin, a second one optional. The count before the typed
confirmation and the recount inside the grant transaction stay; SQL, aal2
and the rule for every other stack are unchanged.
2026-11-11 22:37:40 +01:00
bchanot 5f63d2229c fix(supabase): db:trial database logs no statement from its first start
The image's init (migrate.sh) sent the supabase_admin password as SQL text
while its postgresql.conf logged DDL, so the password reached the container
log. The server now starts with -c log_statement=none, which the entrypoint
also hands to the init server; a harness check pins it, and DEPLOY.md makes
the post-init log scan a production prerequisite.
2026-11-11 19:53:56 +01:00
bchanot 953ae41b86 docs(supabase): db:trial app comment and TODO review tick
The cmd_app shortcut comment matches SUPABASE.md on the rotate-secrets 401 window; TODO ticks the reviews and lists the app no-lock shortcut.
2026-11-11 14:43:41 +01:00
bchanot f2cbf6814f fix(supabase): db:trial second re-review fixes
Post-create scan covers pg_stat_statements and labels each count; log path defined; rotate-secrets 401 window documented; plan shows image state unknown without a daemon; start_containers checks the app host before recreating GoTrue; truthful restore and destroy way-out messages; harness checks read stdin from /dev/null. Harness 372/0.
2026-11-11 14:36:12 +01:00
bchanot d3bdbbe0ba fix(supabase): db:trial closure review fixes
Strict absent detection (stderr sentence per kind, measured on Docker 29.9.3), tri-state container_running, empty-volume check before restore, quieter DB init and rotation logging, backup/migrate refuse while the app runs, lock first in start/stop, truthful rotate-secrets and post-create checks. Stub reproduces Docker's stdout/stderr split. Harness 364/0.
2026-11-11 14:16:32 +01:00
bchanot 3b687a218e feat(supabase): db:trial accounts, grants, equine drawings, app
account: confirmed account through GoTrue's admin API, hidden password typed
twice. grant: owner/admin by the operator path (factors counted in SQL and again
in the transaction, names sanitised); catalogue rights mirror grant_catalog_right
(admin first for sheet_editor), audit row, no implicit admin. Every grant typed
at a terminal. assets: R5.5 tool through the gateway. app: Vite stopped and
waited on exit. 323 stub-only harness cases.
2026-11-10 22:33:49 +01:00
bchanot b85614aa09 feat(supabase): db:trial backup, restore, destroy, migrate, rotations
Cold read-only backups proven before any change (checksums covering
the folder, entry counts, keys, images); typed confirmations at a
terminal only; rotate-secrets in one explicit transaction with a commit
marker, no secrets.prev; destroy refuses without a restorable backup and
names the manual way out. Harness: 210 stub-only cases.
2026-11-10 19:08:33 +01:00
bchanot 1a7b952f2f feat(supabase): db:trial foundation (plan, create, start, stop, status)
scripts/db-trial.sh builds the persistent manual trial stack on
literal faunosteo_trial_* names, loopback 58xxx ports, named volumes
and a 700 state folder outside any git work tree; it refuses
SANDBOX_* variables, a remote Docker daemon, a missing or failing
ss, and checks each container's exact loopback publication and the
gateway identity. The stub harness (scripts/db-trial-check.sh,
87 cases, no daemon reachable) proves it; db-sandbox.sh refuses a
trial state folder (additions only). Nothing is created here.
2026-11-10 14:05:56 +01:00
bchanot 9e68bdd1fa docs(supabase): trial comments and guide state the refusals exactly 2026-11-04 23:51:55 +01:00
bchanot fb95255759 fix(supabase): LAN trial serves the app sources only, no Postgres password in Vite 2026-11-04 23:03:47 +01:00
bchanot d74c54ed05 feat(supabase): owner trial served on the LAN address, sandbox kept on loopback 2026-11-04 22:36:50 +01:00
bchanot ac5fbfbc44 feat(supabase): owner trial sandbox commands and the V1-2.6 trial guide 2026-11-04 14:11:23 +01:00
bchanot bbc0627f8a fix(supabase): sheet-assets runner review LOWs (one destination, no anon key at build) 2026-11-02 00:34:03 +01:00
bchanot 34a49f5769 fix(supabase): branch-neutral refusal message of the sheet-assets runner 2026-11-02 00:24:01 +01:00
bchanot f924ad056d test(supabase): sheet-assets e2e on the sandbox only
pnpm e2e:sheet-assets is now an alias of pnpm db:sandbox sheet-assets-e2e:
gateway on 127.0.0.1:57800 (occupied port refused), the runner refuses any
URL but the sandbox gateway and any key not issued by the sandbox, before
building or any request; no DEV URL, port or key remains.
2026-11-02 00:09:02 +01:00
bchanot 3c141c942b fix(supabase): targeted review LOWs on retry and sandbox isolation
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.
2026-11-01 23:13:42 +01:00
bchanot cdd43ac431 test(supabase): avatar e2e on the sandbox only, per-session seed secret
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.
2026-11-01 22:55:23 +01:00
bchanot 2a84e3702e test(supabase): avatar suite on the sandbox, per-run sandbox passwords
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.
2026-11-01 21:02:59 +01:00
bchanot 6aa85fe7e4 fix(worker): V1-2.3 hostile corpus through verify, verdict and memory caps aligned 2026-11-01 17:55:49 +01:00
bchanot 5afb34ed0f test(supabase): V1-2.3 verification worker end to end on the sandbox 2026-11-01 17:34:33 +01:00
bchanot 661212a852 chore(ci): drop the debug name section from the shipped wasm module
wasm-bindgen --remove-name-section: 279 KB raw of function names no code
reads, 30.7 KB gzip; the 600 000-byte budget and its test are unchanged.
2026-10-29 16:24:18 +01:00
bchanot 77e5fa4cf5 feat(supabase): V1-2.1 M4/M5 secure sheet access and review workflow
M4 20261028100000_sheet_access_hardening + M5 20261028110000_sheet_review_workflow
(applied together; no unprotected window). Implements contract §5-§14.

- Catalogue rights table + owner RPCs; has_mfa / has_aal2_session (live
  auth.sessions check); grant_active vs caller_has split; catalogue reader
  predicate; can_edit_sheet on the sheet_editor capability (F14).
- AR-1 B: aal2 required on every platform role change, target verified factor,
  race-free last-owner guard (F18/F19); service_role loses table privileges on
  the catalogue + profiles/profile_roles and EXECUTE on the role RPCs (F12/F17).
- Reviewed lifecycle: version provenance + review columns, content/freeze/
  author triggers, rounds/comments/acknowledgments, save/submit/withdraw/
  comment/acknowledge/decide, atomic publish_sheet_version(review_id) on the
  stored verdict, deprecate/archive/restore, species RPCs, equine working copy,
  uploads with the storage check (F7) + editor INSERT policy + 2 MiB bucket.
  F1-F3,F5,F6,F8,F9,F13,F15,F16 closed. Verdict is a fixture until M6 (V1-2.3).
- O22: SQL business mirror removed, declared status check kept; pgTAP 011 and
  the Rust generator's SQL parts deleted, ledger retargeted.
- Access layer sheets.ts (closed SheetFailure kinds); old client publish gate
  deleted; types regenerated; upload tool reads via get_sheet_asset_state.

Tested on the throwaway sandbox only; DEV untouched. pgTAP 850 (real stack) /
122 (PGlite) green; real-GoTrue AR-1 B + F18 race green; fresh install and
M3->M5 upgrade green; V1-1 regression green; rust:check, typecheck, lint,
build, types drift clean. BDR-084, LRN-095.
2026-10-28 15:52:49 +01:00
bchanot 3e968eeeab test(app): Playwright animal and relation journeys on the sandbox
Ten journeys, FR and EN, desktop and 375 px, axe on every state. Seeds go
through quoted SQL literals; db:sandbox e2e-shell passes its arguments to
Playwright.
2026-10-26 17:11:29 +01:00
bchanot d7845b7339 chore(ci): check:all names each browser suite PASSED, SKIPPED or NOT RUN
A failing stage prints FAILED with its name and exits non-zero; e2e:shell is
reported NOT RUN (it needs the isolated stack); both suites keep their own
commands.
2026-10-26 01:02:54 +01:00
bchanot 2dc04bcfba chore(supabase): sandbox upgrade can stop at an intermediate migration
`pnpm db:sandbox up upgrade <version> <then>` applies the migrations before
<then> over the seeded older base, reports the workspaces, then the rest: the
path of a DEV database that took M1 first and M2 + M3 later.
2026-10-26 00:52:21 +01:00
bchanot 9b2a4bc6fc chore(ci): run the Chromium UI suite in check:all when installed
pnpm check:all runs pnpm e2e:ui after the node stage when the Chromium of the pinned Playwright is present, and prints a SKIPPED line with the install command otherwise. The shell suite needs the isolated stack and stays a separate run.
2026-10-25 23:37:00 +01:00
bchanot e3a2b3e114 test(app): authenticated shell suite on the isolated stack
pnpm e2e:shell (db-sandbox e2e-shell) builds a Vite server on 127.0.0.1:5192 against a Supabase URL that resolves nowhere and replays its calls on the sandbox. Per-test fictitious accounts through the admin API, a clean avatar seeded: sign-in, dashboard, the photo confirmation with a slow removal, the phone drawer, FR and EN, axe. No trace kept, fixture values masked in reports.
2026-10-25 22:46:19 +01:00
bchanot 57922e0902 fix(supabase): refuse bad sandbox arguments before starting anything
pnpm db:sandbox up with an unknown mode or a missing or malformed upgrade version started four containers and wrote the secrets before refusing. The mode and the version (fourteen digits) are now checked first.
2026-10-25 22:20:55 +01:00
bchanot a945e79131 fix(supabase): keep sandbox secrets off command lines and DEV out of reach
Security gate findings on db-sandbox.sh: containers get secrets from 600 env files, psql and the CLI read PGPASSWORD (no password in --db-url), an incomplete secrets file stops the script before any CLI call, the state folder is refused inside the repository.
2026-10-25 21:27:29 +01:00
bchanot 08abe42c48 test(supabase): isolated Supabase stack and real-stack suite for M1
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.
2026-10-25 20:57:09 +01:00
bchanot 1b359598ab chore(workspace): R5.7 delete packages/anatomy and packages/domain
The TS pipeline, domain, upload script and legacy scripts leave; xmldom out of the
lockfile, Dockerfile copies trimmed. LEDGER.tsv (407 cases) and FILES.tsv (112 files)
record each disposition; r4 and r5 census tests guard the tree, lockfile and
production imports.
2026-10-25 04:00:07 +01:00
bchanot 9e87016399 feat(domain): R5.6 fingerprint switch to sha256-rfc8785-validated-v1
The Rust pipeline is the official seed writer (pnpm import:equine); sheet-ref.json
and report-migration-map.json carry 12d78872...74e2 and the v1 block, the only two
seed files changed. 27c7383c...2660 stays a registered alias, honoured only through
LoadedSheet::recognises_historical_stamp (verified v1, recomputed document). M1: the
snapshot of an old report keeps its stamp; export, archive reader strict. Historical
oracles run in their pre-switch context; equivalence is crate-private.
2026-10-25 02:02:42 +01:00
bchanot 3b9a395d43 feat(domain): R5.6 prepared, fingerprint convention and registry inert, switch patch
canonical_json (RFC 8785), sheet_fingerprint behind feature fingerprint,
TRUSTED_ALIASES (one equine pair), equivalence and check_declared; tests against
the RFC vectors, the V8 numbers, an independent Node reference and the archives.
No consumer wired: the switch is a rehearsed patch under .claude/tasks/plans.
2026-10-24 14:36:01 +02:00
bchanot fad85c0f92 fix(supabase): R5.5 round 2 nits, e2e INIT_CWD, final error wording 2026-10-23 21:43:30 +02:00
bchanot 56593af25c fix(supabase): R5.5 gate round 1, final errors, four attempts, keys off argv, runbook 2026-10-23 21:34:24 +02:00
bchanot 2c445063a4 feat(supabase): R5.5 upload-sheet-assets in Rust, R5.4 caps and FLOOR clarification
Core rules curation::upload (manifest, local destination, bytes through the SVG reader,
plan from observed state); binary upload-sheet-assets over ureq (handshake, no overwrite,
confirm after verify, bounded retries, key never printed); pnpm assets:upload repointed,
e2e:sheet-assets for the local stack. 4 MiB cap on changes.json and references.json.
FLOOR clarification for audit prose with its negative proof.
2026-10-23 21:15:22 +02:00
bchanot eb667ada57 docs(docs): R5.4 synthetic coverage and URL query rule stated exactly 2026-10-23 17:39:33 +02:00
bchanot e0f149b28a feat(anatomy): R5.3 curated draft in Rust (changeset applier, migration map, stats, seed SQL) and pnpm r5:import-equine
crates/core/src/curation/draft behind the curation feature: strict changeset and references parsing as JSON.parse + Zod, the six ops, rename cascades, the B/C review rule, the R2 shape and integrity gate, migration map, document stats, seed SQL. import-equine writes both folders; --check reproduces legacy-import/ and the R5.3 draft files byte for byte (12 files, 0 differences), --out claims an absent or empty, non-symlink destination and never deletes. Parity: 825 records, 46 changes, stats, 612 leaves 442/141/29, 58 synthetic TypeScript cases (oracle r5/curation-synthetic.json).
2026-10-23 00:10:55 +02:00
bchanot 03bdb5eaa0 feat(anatomy): R5.2 legacy importer in Rust (curation feature, import-equine --check/--out), Prettier JSON and table layout, JS semantics; parity oracles frozen from the TypeScript 2026-10-22 21:14:45 +02:00
bchanot aed6b1e300 fix(domain): js_number rounds exact decimal ties to even as ECMAScript (zmij digits); V8 oracle of 44,322 values, Zod oracle bytes checked against the core's printing 2026-10-22 20:50:32 +02:00
bchanot 60cc0f5fa8 test(anatomy): R5.1 freeze of the TypeScript pipeline (oracles r5: intermediates, ids, fingerprint matrix) and the D-R5 study scripts; RUST.md §11 2026-10-22 20:18:12 +02:00
bchanot 3ed8ebb79f fix(tests): harness results name the build relative to the repository; absolute local paths redacted from committed results 2026-10-21 16:30:11 +02:00
bchanot dcc79400de fix(ui): bundle the footer's ZenQuality logo (production CSP img-src 'self' refused the hotlink); CSP proof counts every violation; gitleaks allowlist carries the owner's [gated 2026-10-18] marker 2026-10-21 15:47:18 +02:00
bchanot baebb98bc6 fix(tests): serve.mjs marks immutable by the resolved file's folder, not the request prefix; offline harness kills its server when setup fails 2026-10-21 00:30:47 +02:00
bchanot 63034e10c4 fix(tests): recette server sends the nginx.conf Cache-Control lines (env.js no-store, /assets/ immutable) so an offline import reuses the cached worker chunk; r4-offline-import.mjs re-runs J1.7 on three engines and two network cuts 2026-10-21 00:26:06 +02:00
bchanot 49b812b9b4 docs(docs): R4.9 verifier and security follow-ups: §6 rows 19 (J2 device run, blocking before merge) and 20 (WebKit worker error trace); port 4173 in the exposure table as an owner-opened recette rule; serve.mjs post-bind check typed from the address; report-compare comment names the residual race 2026-10-20 22:05:04 +02:00
bchanot 854d988c07 fix(tests): serve.mjs post-bind wildcard check reads the 'IPv6' family of server.address(); report-compare checks the type before opening (a FIFO or device is never opened) and again on the handle 2026-10-20 21:56:03 +02:00
bchanot a17ae45ed1 fix(domain): the core builds with no feature again: restore_copy (worker import path) behind pdf-read, the layout test sink behind pdf-write; rust-check lints and builds the core alone (the workspace run unified the wasm crate's features and hid it) 2026-10-20 21:27:04 +02:00
bchanot 9965d7f0a0 fix(tests): serve.mjs resolves --host before listening and refuses any wildcard result (every spelling: 0, 0::, ::ffff:0.0.0.0, scoped ::), listens on the resolved address and checks the bound one; report-compare opens once and checks size and type on the handle 2026-10-20 21:22:22 +02:00
bchanot 80cc261c24 fix(tests): R4.9 security gate findings: serve.mjs refuses an empty or unspecified --host (an unset FAUNOSTEO_DEV_HOST bound every interface); report-compare reads at most the 50 MiB cap + 1 byte after its size check; recettes source dev-env.sh first 2026-10-20 21:16:48 +02:00