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:
operator
2026-10-07 00:25:46 +00:00
parent 04339bad14
commit 0065d11e97
29 changed files with 6419 additions and 7 deletions
+11
View File
@@ -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