feat(supervision): add choice watcher daemon, HTTPS spec docs, and test suites
- bin/muse_choice_watcher.py + systemd/muse-choices-reconcile.*: automatic choice answering and timer reconciliation - bin/digest.py: fleet log and health summarization - docs/BOX-*-HTTPS.md: comprehensive HTTPS execution contracts and API documentation - docs/MUSE-CHOICES-POLICY.md & docs/SUPERVISION-SPEC.md: autonomous execution specs - tests/test_*.py: unit test suites for HTTPS API, choice watcher, fleet heal, and swarm pruning
This commit is contained in:
@@ -198,6 +198,17 @@ class TestRateLimitUserInteraction(unittest.TestCase):
|
||||
self.assertEqual(updated[0]["text"], "Earlier reply")
|
||||
self.assertEqual(updated[1]["text"], "New uncommitted instruction")
|
||||
|
||||
def test_history_payload_mentioning_rate_limits_not_falsely_flagged(self):
|
||||
"""Chat history discussing rate limits or HTTP 429 does NOT place node into cooldown when rc == 0."""
|
||||
msgs_about_rate_limits = [
|
||||
{"role": "user", "text": "Are we hitting any rate limits or 429 errors?"},
|
||||
{"role": "assistant", "text": "No rate limit reached, all queues are unthrottled and healthy."}
|
||||
]
|
||||
with patch.object(muse_tui_rl, "run_command_isolated", return_value=(0, json.dumps(msgs_about_rate_limits), "")):
|
||||
self.tui.data._fetch_history("pip", "thread-chat")
|
||||
self.assertFalse(self.tui.data.is_node_rate_limited("pip"))
|
||||
self.assertEqual(len(self.tui.data.history_cache.get(("pip", "thread-chat"), [])), 2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import json
|
||||
|
||||
Reference in New Issue
Block a user