test(supabase): the audit privacy check no longer reads a uuid as a date

014 #237 matched « 20[0-9]{2}- » inside a workspace uuid on a long-lived stack.
The pattern now reads the metadata without workspace_id, still over every
audit row. It would have stopped the DEV procedure at db:test. Found by the
V1-1.6 verifier.
This commit is contained in:
bchanot committed 2026-10-26 17:53:37 +01:00
1 parent 10413478fb
commit e7fd7e34e6
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -784,7 +784,9 @@ select is(
);
select is(
(select count(*) from audit.audit_logs where split_part(action, '.', 1) in ('animal', 'animal_client_relation')
and (metadata::text ~* '(eclair|bijou|tonnerre|furet|selle|owner|keeper|contact|20[0-9]{2}-)' or correlation_id is not null)),
-- The workspace uuid is left out: its hex digits can read as a year (« …2012-… »); the test above proves it is the only key.
and ((metadata - 'workspace_id')::text ~* '(eclair|bijou|tonnerre|furet|selle|owner|keeper|contact|20[0-9]{2}-)'
or correlation_id is not null)),
0::bigint, 'no name, role, breed or date in the audit rows'
);
select is(