Ajustes conforme relatorio de testes 2026-08-27

This commit is contained in:
2026-08-29 09:53:32 -03:00
parent 0ecff719b7
commit 88e1f070d7
791 changed files with 27040 additions and 29038 deletions

View File

@@ -50,3 +50,46 @@ def test_transaction_state_patch_preserva_latch():
runtime = Runtime()
patch = runtime.transaction_state_patch({"business_workflows_executed": ["invoice_explanation"]})
assert patch["business_workflows_executed"] == ["invoice_explanation"]
def test_transaction_state_patch_preserva_boundary_de_soft_reset():
runtime = Runtime()
patch = runtime.transaction_state_patch({
"transaction_status": "COMPLETED",
"operational_context_boundary_pending": True,
})
assert patch["transaction_status"] == "COMPLETED"
assert patch["operational_context_boundary_pending"] is True
def test_workflow_response_final_fecha_latch_mesmo_se_adapter_retornar_paused():
runtime = Runtime()
state = {
"pending_domain_workflow": {
"execution_id": "exec-1",
"workflow_name": "invoice_explanation",
},
"transaction_status": "WORKFLOW_PAUSED",
}
envelope = {
"result": {
"result": {
"status": "PAUSED",
"execution_id": "exec-1",
"metadata": {
"workflow_name": "invoice_explanation",
"workflow_execution_id": "exec-1",
"resume_tool": "retomar_workflow",
},
"output": {
"workflow_response_final": True,
"mensagem": "Seu número de protocolo é 1234567890.",
},
"state": {"current_node": "registrar_protocolo_aceite"},
}
}
}
runtime._capture_pending_domain_workflow(state, envelope)
assert state["pending_domain_workflow"] is None
assert state["transaction_status"] == "COMPLETED"
assert state["operational_context_boundary_pending"] is True