diff --git a/src/generator/shortspec.py b/src/generator/shortspec.py index 3845b9e..0c2d073 100644 --- a/src/generator/shortspec.py +++ b/src/generator/shortspec.py @@ -159,6 +159,17 @@ when the source says "walnut shaped with a wide rim around its circumference" \ — pick a shorter span that is still verbatim, or drop the quote marks and \ state the fact plainly. +**A quote field that takes a list of lines is ONE span, broken where it has to \ +break to fit.** It is not two quotes and not two slots to fill. Read the lines \ +back joined with a single space: that sentence is what the check looks for in \ +the sources, and what a viewer reads off the frame. Welding a real fragment to \ +a phrase from somewhere else produces a sentence nobody ever said — \ +"“LIKE ALUMINUM" + "SMOOTH, NO WINDOWS”" is a fabricated quote even though \ +every word of it appears in the material, because the witness said the first \ +half and a later writer summarising him said the second. Attribution makes it \ +worse, not better: the line under the quote names the person you just put \ +those words into. + # 5. A worked example — FORMAT ONLY This is a case_file that produced a good video. Read it for shape: how long a \ diff --git a/tests/test_grounding.py b/tests/test_grounding.py index 0068a96..ab13b35 100644 --- a/tests/test_grounding.py +++ b/tests/test_grounding.py @@ -122,12 +122,37 @@ def test_geometry_is_not_a_claim(spec): def test_a_split_quote_is_one_claim(spec): """scale_bars.quote son las líneas de UNA cita: se comprueba entera, no a - trozos (el renderizador no envuelve; el caller parte las líneas).""" + trozos (esas líneas las parte quien escribe el spec, no el renderizador).""" quotes = [c.text for c in extract_claims(spec) if c.kind == "quote"] assert "TWICE THE SIZE OF AN AIRCRAFT CARRIER" in quotes assert "TWICE THE SIZE OF" not in quotes +def test_a_quote_welded_from_two_sources_is_flagged(spec): + """El fallo real del Short de Socorro: cada mitad existe, la frase no. + + El modelo cogió un verbatim del testigo y le soldó la compresión de un + resumen posterior, todo dentro de unas comillas y con su atribución debajo. + Comprobar las líneas por separado habría dado las dos por buenas y publicado + una frase que nadie dijo — por eso la unión es la unidad de comprobación. + """ + chunks = CHUNKS + [{ + "url": "https://example.org/retelling", + "content": ("Terauchi called it “twice the size of an aircraft carrier”. " + "Later writers described the contact as unlit and silent."), + }] + haystack = " ".join(c["content"] for c in chunks).upper() + assert "TWICE THE SIZE OF" in haystack and "UNLIT AND SILENT" in haystack + + welded = json.loads(json.dumps(spec)) + welded["shots"][3]["props"]["quote"] = ["“TWICE THE SIZE OF", "UNLIT AND SILENT”"] + + report = check_grounding(welded, chunks) + + assert [c.text for c in report.ungrounded if c.kind == "quote"] == [ + "TWICE THE SIZE OF UNLIT AND SILENT"] + + # --- comprobación ----------------------------------------------------------- def test_reference_spec_is_fully_grounded(spec):