feat: harden community production foundation through story 1.5

This commit is contained in:
2026-08-14 00:21:59 +03:00
parent c30461cc92
commit f6fc2e5c9b
161 changed files with 16758 additions and 2515 deletions
@@ -0,0 +1,20 @@
alter table invocation_logs
add column trace_id text;
alter table invocation_logs
add constraint invocation_logs_trace_id_format_check
check (
trace_id is null
or (
trace_id ~ '^[0-9a-f]{32}$'
and trace_id <> '00000000000000000000000000000000'
)
) not valid;
create index invocation_logs_workspace_request_id_idx
on invocation_logs(workspace_id, request_id)
where request_id is not null and octet_length(request_id) <= 128;
create index invocation_logs_workspace_trace_id_idx
on invocation_logs(workspace_id, trace_id)
where trace_id is not null;