From 95b01cb8fc51b5b4c5d7464acf200c01f2a9d139 Mon Sep 17 00:00:00 2001 From: Guilherme Gomes Date: Mon, 31 Aug 2026 14:11:43 -0300 Subject: [PATCH] test(agent): simetria com o lado Go no teste de preservacao (CRM-464 review) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_repair_keeps_a_model_the_agent_already_has passa a aferir db.commit.called, como os outros dois testes do arquivo. Aqui nao cabe a assercao de valor persistido que a PR irma ganhou — o SQLAlchemy comita o proprio objeto mutado, nao ha copia de onde os dois valores possam divergir. O que se documenta e que o reparo ESCREVE e o modelo do cliente sobrevive a escrita. --- tests/unit/test_agent_repair_default_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/test_agent_repair_default_model.py b/tests/unit/test_agent_repair_default_model.py index 177f008..406b0ef 100644 --- a/tests/unit/test_agent_repair_default_model.py +++ b/tests/unit/test_agent_repair_default_model.py @@ -71,3 +71,4 @@ def test_repair_keeps_a_model_the_agent_already_has(): # matching would leave the model untouched and the test would still pass. assert result.type == "llm", "repair did not run" assert result.model == "perplexity/sonar-pro" + assert db.commit.called, "the repair still writes — the model just has to survive the write"