refactor(agent): split orchestration into config, healing, and main modules

This commit is contained in:
patrick committed 2026-02-10 22:11:33 -05:00
1 parent 5fc5b8c114
commit 480eea8095
7 files changed
+388 -335

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@ import unittest
from datetime import datetime
from unittest.mock import patch
from agent import should_heal, execute_heal_and_verify
from healing import should_heal, execute_heal_and_verify
class FakeReporter:
@@ -49,7 +49,7 @@ class HealGateTests(unittest.TestCase):
class PostHealVerificationTests(unittest.TestCase):
@patch("agent.time.sleep", return_value=None)
@patch("healing.time.sleep", return_value=None)
def test_execute_heal_and_verify_success(self, _sleep):
reporter = FakeReporter()
post_drift = {
@@ -73,7 +73,7 @@ class PostHealVerificationTests(unittest.TestCase):
self.assertEqual(post_drift, returned_post_drift)
self.assertEqual([(True, 12, None)], reporter.update_calls)
@patch("agent.time.sleep", return_value=None)
@patch("healing.time.sleep", return_value=None)
def test_execute_heal_and_verify_restart_failed(self, _sleep):
reporter = FakeReporter()
auditor = FakeAuditor(heal_ok=False, reconcile_result=(True, 0, {}))