Add reliable execution reporting and coordinated dashboard views

This commit is contained in:
aiagent
2026-10-19 04:29:33 -07:00
parent 547f62fa53
commit c2dfe311f7
41 changed files with 3867 additions and 107 deletions
+12
View File
@@ -35,6 +35,18 @@ class FaultTests(unittest.TestCase):
self.assertTrue(records['mirror']['needs_reconciliation'])
self.assertEqual(records['mirror']['delivery'],'uncertain_recovery')
def test_only_persistent_fault_escalates_after_recovery_window(self):
with tempfile.TemporaryDirectory() as root:
c=SimpleNamespace(call=lambda *args:None);records={}
with patch.object(faults,'Client',return_value=c),patch.object(c,'call') as call,patch.object(faults.time,'time',return_value=100):
faults.report_process({'control':{}},Path(root),'mirror',SimpleNamespace(poll=lambda:2),records)
self.assertEqual(call.call_args.args[1]['severity'],'warning')
with patch.object(faults,'Client',return_value=c),patch.object(c,'call') as call,patch.object(faults.time,'time',return_value=221):
faults.report_process({'control':{}},Path(root),'mirror',SimpleNamespace(poll=lambda:2),records)
faults.report_process({'control':{}},Path(root),'mirror',SimpleNamespace(poll=lambda:2),records)
self.assertEqual(call.call_count,1)
self.assertEqual(call.call_args.args[0],'/api/hooks/escalate')
def test_hook_failure_remains_persistently_visible(self):
with tempfile.TemporaryDirectory() as root:
c=SimpleNamespace(call=lambda *args:None)