chore(mma): Verify track loading in visual simulation and fix deterministic ID logic
This commit is contained in:
@@ -10,7 +10,7 @@ auto_add = true
|
||||
|
||||
[discussions.main]
|
||||
git_commit = ""
|
||||
last_updated = "2026-02-28T22:08:57"
|
||||
last_updated = "2026-02-28T22:11:24"
|
||||
history = [
|
||||
"@2026-02-28T22:02:40\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 83.5%. Please consider optimizing recent changes or reducing load.",
|
||||
"@2026-02-28T22:03:10\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 103.9%. Please consider optimizing recent changes or reducing load.",
|
||||
|
||||
@@ -47,6 +47,7 @@ def test_mma_complete_lifecycle(live_gui) -> None:
|
||||
|
||||
# 4. Click 'Accept' to start tracks.
|
||||
client.click('btn_mma_accept_tracks')
|
||||
time.sleep(5) # Add delay to ensure background thread processes track refresh
|
||||
|
||||
# 5. Wait for 'tracks' list to populate.
|
||||
tracks_populated = False
|
||||
@@ -70,7 +71,12 @@ def test_mma_complete_lifecycle(live_gui) -> None:
|
||||
tracks_list = status_after_tracks.get('tracks')
|
||||
assert tracks_list is not None and len(tracks_list) > 0, "Tracks list is empty or not found."
|
||||
|
||||
track_id_to_load = tracks_list[0]['id']
|
||||
track_id_to_load = None
|
||||
for track in tracks_list:
|
||||
if 'Mock Goal 1' in track.get('title', ''):
|
||||
track_id_to_load = track['id']
|
||||
break
|
||||
assert track_id_to_load is not None, "Could not find a track with 'Mock Goal 1' in its title."
|
||||
print(f"Attempting to load track with ID: {track_id_to_load}")
|
||||
|
||||
# Load the first track
|
||||
@@ -80,7 +86,17 @@ def test_mma_complete_lifecycle(live_gui) -> None:
|
||||
active_track_and_tickets_found = False
|
||||
for _ in range(60): # Poll for up to 60 seconds
|
||||
status = client.get_mma_status()
|
||||
if status and status.get('active_track') == track_id_to_load and \
|
||||
print(f"Polling load status: {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')
|
||||
|
||||
# Updated condition to correctly check active_track ID or value
|
||||
active_track = status.get('active_track')
|
||||
if status and ( (isinstance(active_track, dict) and active_track.get('id') == track_id_to_load) or (active_track == track_id_to_load) ) and \
|
||||
'active_tickets' in status and len(status['active_tickets']) > 0:
|
||||
active_track_and_tickets_found = True
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user