Isolation
- Each customer is its own tenant. Isolation is enforced in the database by PostgreSQL row-level security (RLS) on every table that holds customer data, not only in application code.
- Services connect with a database role that cannot bypass RLS. If code forgets to set the tenant, the answer is zero rows, never another customer's data.
- The protection is fail-closed: database rules switch RLS on for new tables and block attempts to switch it off, and the API refuses to start if any customer table lacks RLS.
- A user can be limited to some of the companies in the group. The limit is held in the database (RLS) on every path: in the app, through MCP, in SQL and in the AI features.
- Isolation tests run before every production deployment.