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
+3 -2
View File
@@ -1,3 +1,4 @@
import itertools
import importlib.util
import io
import json
@@ -27,7 +28,7 @@ class WorkerTests(unittest.TestCase):
def test_desktop_queue_records_receipt_and_waits_for_final_hydration(self):
import appserver
with tempfile.TemporaryDirectory() as root:
cfg={'codex':'codex','cwd':root,'max_turn_seconds':10}
cfg={'codex':'codex','cwd':root,'max_turn_seconds':1000}
message={'id':'a'*24,'text':'hello','source':'human'}
prompt=worker.message_prompt(cfg,message)
thread='11111111-1111-4111-8111-111111111111'
@@ -44,7 +45,7 @@ class WorkerTests(unittest.TestCase):
if self.calls>2:items.append({'type':'agentMessage','text':'real reply','phase':'final_answer'})
return {'id':tid},[{'id':'observed-turn','status':'interrupted' if self.calls==2 else 'completed','items':items}]
receipts=[]
with patch.object(appserver,'AppServer',Reader),patch.object(worker.subprocess,'run',return_value=SimpleNamespace(returncode=0,stdout='Queued message '+receipt+' for thread '+thread+'.')),patch.object(worker.time,'sleep'):
with patch.object(appserver,'AppServer',Reader),patch.object(worker.subprocess,'run',return_value=SimpleNamespace(returncode=0,stdout='Queued message '+receipt+' for thread '+thread+'.')),patch.object(worker.time,'sleep'),patch.object(worker.time,'monotonic',side_effect=itertools.count(0,15)):
result=worker.run_queued(cfg,message,thread,lambda:None,lambda value:None,receipts.append)
self.assertEqual(result['outcome'],'completed')
self.assertEqual(result['text'],'real reply')