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

@@ -198,6 +198,7 @@ async def test_predecision_verifier_casts_json_health_to_jsonb(
assert verified is True
assert "CAST(mcp_health AS jsonb)" in statements[0]
assert "CAST(post_execution_state AS jsonb) = 'null'::jsonb" in statements[0]
@pytest.mark.asyncio

View File

@@ -2037,6 +2037,8 @@ def test_ansible_context_receipts_reference_pre_decision_evidence_without_conten
loader_source = inspect.getsource(_load_pre_decision_context_runtime_stage_receipts)
assert "evidence.collected_at <= candidate.created_at" in loader_source
assert "evidence.post_execution_state IS NULL" in loader_source
assert "CAST(evidence.post_execution_state AS jsonb)" in loader_source
assert "= 'null'::jsonb" in loader_source
def test_ansible_context_receipt_rejects_zero_success_mcp_attempts() -> None: