human behavior: classifier gate, pacing, splitting, quiet hours, stable prompt prefix

This commit is contained in:
Oleksandr Kozachuk
2026-07-13 15:55:26 +02:00
parent 13b9569c07
commit ae870db181
15 changed files with 510 additions and 42 deletions
+4 -3
View File
@@ -35,9 +35,10 @@ class TestPerChannelPrompt(unittest.TestCase):
class TestNewsFileMissing(unittest.TestCase):
def test_missing_news_file_keeps_placeholder(self):
"""CFG-03: nonexistent news file -> {news} placeholder stays literal, no crash."""
def test_missing_news_file_degrades_silently(self):
"""CFG-03 (revised): nonexistent news file -> no news section, no literal, no crash."""
config = {"system": "N: {news}", "history-limit": 5, "news": "/nonexistent/news.txt"}
responder = AIResponder(config, "chat")
system = responder.message(AIMessage("alice", "hei"))[0]["content"]
self.assertIn("{news}", system)
self.assertNotIn("{news}", system)
self.assertNotIn("news:", system)