From 34276c807bfdf478096c984367a493c522eb8d27 Mon Sep 17 00:00:00 2001 From: ogt Date: Fri, 10 Jul 2026 20:20:07 +0800 Subject: [PATCH] fix(agent): assign timeline projection ids --- apps/api/src/services/awooop_ansible_check_mode_service.py | 3 ++- apps/api/tests/test_awooop_truth_chain_service.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/api/src/services/awooop_ansible_check_mode_service.py b/apps/api/src/services/awooop_ansible_check_mode_service.py index 57aea87f3..6d5e4a6ad 100644 --- a/apps/api/src/services/awooop_ansible_check_mode_service.py +++ b/apps/api/src/services/awooop_ansible_check_mode_service.py @@ -1026,10 +1026,11 @@ async def _record_timeline_projection_receipt( LIMIT 1 ), inserted AS ( INSERT INTO timeline_events ( - incident_id, event_type, status, title, description, + id, incident_id, event_type, status, title, description, actor, actor_role, risk_level, created_at ) SELECT + gen_random_uuid()::text, :incident_id, 'exec', :status, diff --git a/apps/api/tests/test_awooop_truth_chain_service.py b/apps/api/tests/test_awooop_truth_chain_service.py index b7a650424..910713e31 100644 --- a/apps/api/tests/test_awooop_truth_chain_service.py +++ b/apps/api/tests/test_awooop_truth_chain_service.py @@ -2001,6 +2001,7 @@ def test_ansible_timeline_projection_receipt_is_same_run_and_idempotent() -> Non assert receipt["detail"]["projection_status"] == "error" writer_source = inspect.getsource(_record_timeline_projection_receipt) assert "WITH existing AS" in writer_source + assert "gen_random_uuid()::text" in writer_source assert "WHERE NOT EXISTS (SELECT 1 FROM existing)" in writer_source assert inspect.iscoroutinefunction(_record_timeline_projection_receipt)