feat(short): el prompt sabe cuánto texto cabe dibujado, y el informe grita si quedó ilegible
Build & Deploy ResearchOwl / build-and-push (push) Successful in 10s

x-fits llega vivo del contrato y se pone delante del modelo: es el único
límite que nada rechaza, porque el renderizador encoge en vez de fallar. Sin
esto el modelo escribe una cita de 58 caracteres para un hueco de 16 y se
entera cuando ya está renderizada.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ChemaVX
2026-08-06 16:19:48 +00:00
co-authored by Claude Fable 5
parent a13c3062b6
commit 129f436fd2
5 changed files with 63 additions and 1 deletions
+18
View File
@@ -165,3 +165,21 @@ class TestNarrationWarnings:
{"kind": "narration", "text": "no voice installed"}]))
assert "1 textos recortados" in text # sólo cuenta el de dibujo
assert "🔇 no voice installed" in text
class TestSevereShrink:
"""Un recorte leve es cosmético; uno grave deja el texto ilegible justo
donde importaba. Mezclarlos entrena al lector a ignorar los dos."""
def test_a_severe_shrink_is_called_out(self):
text = _claims_message(result_with(render_warnings=[
{"template": "document_quote", "text": "“UNA CITA MUY LARGA”",
"requested": 84, "size": 20, "severe": True}]))
assert "🔴" in text and "ILEGIBLES" in text
def test_a_cosmetic_shrink_stays_quiet(self):
text = _claims_message(result_with(render_warnings=[
{"template": "scale_bars", "text": "PHYSICAL EVIDENCE",
"requested": 92, "size": 84, "severe": False}]))
assert "recortados" in text
assert "ILEGIBLES" not in text and "🔴" not in text