Goal
A new table can never silently skip tenant isolation: CI fails when any table in schema app lacks forced RLS or a company policy.
Acceptance criteria
Not part of this task
- Changing existing policies
Affected areas
src/features/tenancy/
tests/integration/
Test plan
| Criterion |
Check |
| guard |
integration test; plus a deliberately unprotected temp table in the test proves the guard fails |
Security/Privacy affected?
Yes – tenant isolation (ADR-0001 D7).
Epic: #18 · Architecture: docs/decisions/ADR-0001-pilot-architecture.md
Goal
A new table can never silently skip tenant isolation: CI fails when any table in schema
applacks forced RLS or a company policy.Acceptance criteria
app(pg_class/pg_policy) and asserts RLS enabled + forced and acompany_idpolicyverifyNot part of this task
Affected areas
src/features/tenancy/tests/integration/Test plan
Security/Privacy affected?
Yes – tenant isolation (ADR-0001 D7).
Epic: #18 · Architecture:
docs/decisions/ADR-0001-pilot-architecture.md