Close P21 runtime incident journal

This commit is contained in:
Codex
2026-05-12 08:54:45 +08:00
parent 03cd2aa915
commit 1b9b223935
20 changed files with 774 additions and 16 deletions
@@ -0,0 +1,21 @@
create table if not exists runtime_incidents (
id bigserial primary key,
incident_key text not null unique,
severity text not null,
source text not null,
reason text not null,
subject text not null default 'runtime',
status text not null default 'open',
first_seen_ts timestamptz not null,
last_seen_ts timestamptz not null,
occurrence_count integer not null default 1,
recommended_action text not null default '',
last_error text,
payload jsonb not null default '{}'::jsonb
);
create index if not exists idx_runtime_incidents_last_seen_desc
on runtime_incidents (last_seen_ts desc, id desc);
create index if not exists idx_runtime_incidents_severity_status
on runtime_incidents (severity, status, last_seen_ts desc);