Hold the escalation mark in one module, and carry a ruling's step through the cycle's states

This commit is contained in:
2026-10-23 04:45:03 +02:00
parent 4764d3d522
commit f0e14f3fdf
11 changed files with 159 additions and 92 deletions
+11
View File
@@ -51,3 +51,14 @@ def part_line(part: object, tool_input_chars: int) -> str:
name, arguments = call
return f"[tool {name}] {json.dumps(arguments, ensure_ascii=False)[:tool_input_chars]}"
return ""
def verbatim(quote: str, text: str) -> bool:
"""Whether text holds the judge's quote word for word, as plain reads both."""
quoted = plain(quote)
return quoted != "" and quoted in plain(text)
def plain(text: str) -> str:
# The judge drops markdown emphasis and reflows whitespace when it quotes.
return " ".join(text.replace("*", "").replace("_", "").split())