fix(agent): accept JSON null pre-decision evidence
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 1m38s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
ogt
2026-07-10 21:51:20 +08:00
parent cbb064b083
commit 7b08df3bdb
4 changed files with 12 additions and 2 deletions

View File

@@ -188,7 +188,10 @@ async def verify_ansible_candidate_pre_decision_evidence(
FROM incident_evidence
WHERE id = :snapshot_id
AND incident_id = :incident_id
AND post_execution_state IS NULL
AND (
post_execution_state IS NULL
OR CAST(post_execution_state AS jsonb) = 'null'::jsonb
)
AND sensors_succeeded > 0
AND NULLIF(recent_logs, '') IS NOT NULL
AND EXISTS (

View File

@@ -967,7 +967,11 @@ async def _load_pre_decision_context_runtime_stage_receipts(
ON candidate.op_id = CAST(:candidate_op_id AS uuid)
WHERE evidence.incident_id = CAST(:incident_id AS varchar(30))
AND evidence.collected_at <= candidate.created_at
AND evidence.post_execution_state IS NULL
AND (
evidence.post_execution_state IS NULL
OR CAST(evidence.post_execution_state AS jsonb)
= 'null'::jsonb
)
AND (
NULLIF(evidence.recent_logs, '') IS NOT NULL
OR evidence.mcp_health IS NOT NULL