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
+3 -3
View File
@@ -14,8 +14,8 @@ def entry(channel: str, text: str = "x"):
class TestSystemPromptTemplate(unittest.TestCase):
def test_template_substitution(self):
"""ENV-10: {date}/{memory} substituted; missing news file leaves {news} literal."""
def test_dynamic_context_in_suffix(self):
"""ENV-10: date/memory reach the system message via the context suffix (ENV-20)."""
config = {"system": "Date {date} memory {memory} news {news}", "history-limit": 5, "news": "/nonexistent/news.txt"}
responder = AIResponder(config, "chat")
responder.memory = "MEMSTR"
@@ -23,7 +23,7 @@ class TestSystemPromptTemplate(unittest.TestCase):
system = messages[0]["content"]
self.assertIn(time.strftime("%Y-%m-%d"), system)
self.assertIn("MEMSTR", system)
self.assertIn("{news}", system) # left literal — file does not exist
self.assertNotIn("{news}", system) # placeholders stripped since ENV-20
class TestHistoryShrink(unittest.TestCase):