سامانه صدور فاکتور و حسابداری

Tests: add Supabase roles to Wave 5a harness

davoodmehraban89 committed Oct 2, 2026 at 11:08 UTC 430b26beb3f9a9a579953e71cbcb6176b123930d
2 files changed +5
PROJECT_STATE.md
+1
@@ -14,6 +14,7 @@ This is high-assurance accounting/ERP software. Posted financial history, tenant
14 ## Current change ledger
15 | Date | Request / decision | Status | Evidence / next action |
16 |---|---|---|---|
17 +| 2026-10-02 | Gmail/GitHub failure review: latest Wave 5a Quality run failed only because the disposable PostgreSQL harness lacked Supabase roles `anon`/`authenticated`; Security latest run is green. | **TEST HARNESS FIXED / RETEST PENDING** | Added the two no-login Supabase compatibility roles to the disposable identity DB bootstrap. Failure occurred before behavior assertions and did not indicate a production migration failure. |
18 | 2026-10-02 | Second CI retest showed the safety-check regex itself was over-escaped. | **REGEX FIXED / RETEST PENDING** | Normalized regex literals to match the workflow labels/variable gate exactly; no runtime/product behavior changed. |
19 | 2026-10-02 | CI retest exposed a literal `\\n` introduced while editing the release-safety checker. | **TEST SYNTAX FIXED / RETEST PENDING** | Replaced the escaped text with a real newline; product/runtime code was unaffected. |
20 | 2026-10-02 | Release-safety invariant initially rejected the explicit Dependency Graph availability gate. | **TEST CONTRACT FIXED / RETEST PENDING** | Safety checker now requires both properties: Dependency Review is conditional on `DEPENDENCY_GRAPH_ENABLED=true`, and remains fail-closed whenever enabled. |
supabase/tests/identity_wave5a_bootstrap.sql
+4
@@ -1,4 +1,8 @@
1 create extension if not exists pgcrypto;
2 +do $$ begin
3 + if not exists(select 1 from pg_roles where rolname='anon') then create role anon nologin; end if;
4 + if not exists(select 1 from pg_roles where rolname='authenticated') then create role authenticated nologin; end if;
5 +end $$;
6 create schema if not exists auth;
7 create table auth.users(id uuid primary key,email text,raw_user_meta_data jsonb not null default '{}'::jsonb);
8 create table public.profiles(id uuid primary key references auth.users(id) on delete cascade,username text,role text not null default 'user',created_at timestamptz not null default now(),email text not null,full_name text);