FACTUAL ACTIVITY RECORD · An activity record based on work that took place
Building a fresh local Supabase baseline
Fixing the shared database, authentication, Data API, and safe-write boundaries locally for later components
Purpose
Synchronization, the Control Center, Public Web, and editorial execution needed a shared backend contract without legacy schemas or raw-table access.
Before creating production resources, permissions, the agent registry, authentication callbacks, and capacity-and-backup write gates needed fail-closed local verification.
Implementation
The fresh database is divided into two baseline migrations for relations and API/ACL, with domain responsibilities across six schemas. Only the facade is exposed through the Data API; RLS, default revocation, and principal-specific RPCs prevent direct use of domain tables and private helpers.
- Separate runtime observations from public agent definitions and manage revisions, relationships, visual allowlists, and runtime bindings.
- Reject every mutation except initialization before the registry exists and preserve exactly one active main agent.
- Derive Connector and Runner user, session, and installation bindings from the database each time, with revocation taking priority.
- Validate single-use Google OAuth state and PKCE, native callbacks, and six-digit OTP recovery.
- Use a three-stage state that blocks normal writes until capacity evidence and initial-backup completion both exist.
- Share TLS verify-full, credential-free arguments, ephemeral password files, and a pure-SQL parser.
An exact eight-dataset backup manifest, local-only dummy fixtures, and fixed idempotent backup and restore were added. Dummy loading and local restore helpers reject environments that contain a production-target row.
Rendering diagram…
What was confirmed
Verification results
A fresh reset and exact matching of two migrations and eight datasets passed.
All 236 assertions across ten pgTAP files passed with zero database-lint errors.
Raw domain routes were not exposed, and the public schema's OpenAPI surface contained RPCs only.
Twenty-one TypeScript tests, one Swift contract test, builds, type checks, secret scanning, specification audit, and live-reference verification passed.
Repeat dummy-data loading passed, as did a local backup and restore that recovered two messages after one had been removed.
The local baseline was applied to the target. Production database creation, configuration, and remote application had not occurred by the cutoff.
Basis for completion
The work was complete when the fresh schema, facade RPCs, RLS and ACL, agent registry, authentication callbacks, write safety, and backup manifest passed all 236 assertions, API-boundary checks, local restore, and full verification.