feat(mma): complete Phase 6 and finalize Comprehensive GUI UX track

- Implement Live Worker Streaming: wire ai_client.comms_log_callback to Tier 3 streams
- Add Parallel DAG Execution using asyncio.gather for non-dependent tickets
- Implement Automatic Retry with Model Escalation (Flash-Lite -> Flash -> Pro)
- Add Tier Model Configuration UI to MMA Dashboard with project TOML persistence
- Fix FPS reporting in PerformanceMonitor to prevent transient 0.0 values
- Update Ticket model with retry_count and dictionary-like access
- Stabilize Gemini CLI integration tests and handle script approval events in simulations
- Finalize and verify all 6 phases of the implementation plan
This commit is contained in:
2026-03-01 22:38:43 -05:00
parent d1ce0eaaeb
commit 9fb01ce5d1
22 changed files with 756 additions and 498 deletions

View File

@@ -102,3 +102,35 @@ def test_handle_ai_response_resets_stream(app_instance: App):
# (sometimes streaming chunks don't perfectly match final text if there are
# tool calls or specific SDK behaviors).
assert app_instance.mma_streams[stream_id] == "Final complete response."
def test_handle_ai_response_streaming(app_instance: App):
"""Verifies that 'handle_ai_response' with status='streaming...' appends to mma_streams."""
stream_id = "Tier 3 (Worker): T-001"
# 1. First chunk
with app_instance._pending_gui_tasks_lock:
app_instance._pending_gui_tasks.append({
"action": "handle_ai_response",
"payload": {
"stream_id": stream_id,
"text": "Chunk 1. ",
"status": "streaming..."
}
})
app_instance._process_pending_gui_tasks()
assert app_instance.mma_streams[stream_id] == "Chunk 1. "
# 2. Second chunk
with app_instance._pending_gui_tasks_lock:
app_instance._pending_gui_tasks.append({
"action": "handle_ai_response",
"payload": {
"stream_id": stream_id,
"text": "Chunk 2.",
"status": "streaming..."
}
})
app_instance._process_pending_gui_tasks()
# 3. Verify final state
assert app_instance.mma_streams[stream_id] == "Chunk 1. Chunk 2."