chore(mma): Deterministic track IDs, worker spawn hooks, and improved simulation reliability

This commit is contained in:
2026-02-28 22:09:18 -05:00
parent cb0e14e1c0
commit 37df4c8003
8 changed files with 140 additions and 83 deletions

View File

@@ -32,8 +32,13 @@ def test_mma_complete_lifecycle(live_gui) -> None:
for _ in range(60): # Poll for up to 60 seconds
status = client.get_mma_status()
print(f"Polling status: {status}")
# Assuming 'ai_status' might be a key within the status dictionary. If not, this needs adjustment.
print(f"Polling ai_status: {status.get('ai_status', 'N/A')}")
if status and status.get('pending_spawn') is True:
print('[SIM] Worker spawn required. Clicking btn_approve_spawn...')
client.click('btn_approve_spawn')
elif status and status.get('pending_approval') is True:
print('[SIM] Tool approval required. Clicking btn_approve_tool...')
client.click('btn_approve_tool')
if status and status.get('proposed_tracks') and len(status['proposed_tracks']) > 0:
proposed_tracks_found = True
break
@@ -47,6 +52,12 @@ def test_mma_complete_lifecycle(live_gui) -> None:
tracks_populated = False
for _ in range(30): # Poll for up to 30 seconds
status = client.get_mma_status()
if status and status.get('pending_spawn') is True:
print('[SIM] Worker spawn required. Clicking btn_approve_spawn...')
client.click('btn_approve_spawn')
elif status and status.get('pending_approval') is True:
print('[SIM] Tool approval required. Clicking btn_approve_tool...')
client.click('btn_approve_tool')
if status and status.get('tracks') and len(status['tracks']) > 0:
tracks_populated = True
break