Harden ops ROLE_SYSTEM answer shape with good/bad reply examples.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-12 22:40:47 +08:00
parent 2f1d3983b8
commit 02f2c69deb
4 changed files with 84 additions and 6 deletions

View file

@ -12,3 +12,15 @@ def test_ops_role_system_en_prefers_localized_file() -> None:
assert "ops specialist" in en.lower()
assert "reply entirely in the user's language" in en.lower()
assert "运维专家" not in en
def test_ops_role_system_has_answer_shape_examples() -> None:
zh = build_role_system_context("ops", lang="zh")
en = build_role_system_context("ops", lang="en")
for text in (zh, en):
assert "Result:" in text
assert "Evidence:" in text
assert "Good vs bad" in text or "好例 vs 坏例" in text
assert "Let me check the fiber cut" in text
assert "Fiber cut / LOS — network-wide" in text
assert "incomplete answer" in text.lower() or "不合格" in text