fix(agent): assign timeline projection ids
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m15s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-10 20:20:07 +08:00
parent 0bb5e9c95a
commit 34276c807b
2 changed files with 3 additions and 1 deletions

View File

@@ -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,

View File

@@ -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)