Merge remote-tracking branch 'origin/main' into codex/sre-typed-automation-20260715

This commit is contained in:
ogt
2026-07-15 12:07:12 +08:00
20 changed files with 1161 additions and 92 deletions

View File

@@ -1959,7 +1959,25 @@ class IwoooSSecurityAssetControlPlaneService:
NULLIF(route.incident_id::text, ''),
NULLIF(route.input ->> 'incident_id', '')
) IS NOT NULL
AND NULLIF(route.input ->> 'catalog_id', '') IS NOT NULL)
AND (
NULLIF(route.input ->> 'catalog_id', '') IS NOT NULL
OR EXISTS (
SELECT 1
FROM jsonb_array_elements(
CASE
WHEN jsonb_typeof(
route.input -> 'executor_candidates'
) = 'array'
THEN route.input -> 'executor_candidates'
ELSE '[]'::jsonb
END
) candidate(candidate_payload)
WHERE NULLIF(
candidate.candidate_payload ->> 'catalog_id',
''
) IS NOT NULL
)
))
AS correlated_controlled_route_count_24h,
(SELECT count(*) FROM incident_evidence verifier
WHERE verifier.collected_at >= NOW() - INTERVAL '24 hours'

View File

@@ -744,6 +744,9 @@ def test_service_bounds_source_concurrency_for_database_budget(monkeypatch) -> N
)
assert "correlated_controlled_route_count_24h" in siem_query
assert "ansible_candidate_matched" in siem_query
assert "jsonb_array_elements" in siem_query
assert "executor_candidates" in siem_query
assert "candidate_payload ->> 'catalog_id'" in siem_query
assert "independent_verifier_pass_count_24h" in siem_query
assert "all_postconditions_passed" in siem_query
assert "executor_returncode_trusted" in siem_query