WI-015 · Platform & Contracts · data-model-layers
queued P0 high risk Owner: Paul 0% · 0/5 tasks complete
Consolidate the data-model layers in schema.sql (idempotent) with a documented owner-scoped RLS upgrade path (data-model.md).
Spec (docs/specs/P6)
Build (foundation)
Test (Supabase branch, real JWTs)
Gap-resolution expansion (D26, 2026-06-20)
Secrets split (D34)
Foundation/Authority domain (tenants, tenant_memberships, roles, permissions, sale_team_assignments) + authorization helper contract; deny-by-default, membership/permission-based RLS architecture with insert/update WITH CHECK; the additive upgrade-path stages (owner-only -> team -> sale-scoped); schema.sql current-state bootstrap + ordered-migration contract + generated types + demo-fixture parity; empty-DB + upgrade migration tests + tenant-isolation persona tests on a Supabase branch. Per spec section 58/59 (authority/RLS rows). Section 61 reconciliations tracked. **Wave-1 retro (D39):** the physical layer MUST be conformance-tested against the P5 in-memory reference (@trovesnap/ingestion-contract) — not hand-rolled — covering import-run idempotency, durable-media/temp-URL rejection, expected target item-version on merge/status/media, status-update & attach-media promotion decisions, and physical actor authz (membership/credential-scope/RLS).
No paid API / infra spend triggered by this item.
queued Sprint: P&C Wave 2: Core Contracts
Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.
No human tasks linked.
None recorded yet.
None recorded yet.
None recorded yet.
None recorded yet.
No tool calls recorded.
No files / artifacts recorded.
No log entries yet.