refactor(sdm): Global pass with refined 'External Only' SDM tags. Pruned redundant internal references and fixed indentation logic in injector. Verified full project compilation.

This commit is contained in:
2026-05-09 14:32:44 -04:00
parent 696c08692e
commit 8c06c1767b
142 changed files with 2352 additions and 990 deletions
+10 -8
View File
@@ -13,11 +13,12 @@ from src.api_hook_client import ApiHookClient
@pytest.mark.timeout(10)
def test_user_request_integration_flow(mock_app: App) -> None:
"""
Verifies that pushing a UserRequestEvent to the event_queue:
1. Triggers ai_client.send
2. Results in a 'response' event back to the queue
3. Eventually updates the UI state (ai_response, ai_status) after processing GUI tasks.
ANTI-SIMPLIFICATION: This verifies the full cross-thread boundary.
Verifies that pushing a UserRequestEvent to the event_queue:
1. Triggers ai_client.send
2. Results in a 'response' event back to the queue
3. Eventually updates the UI state (ai_response, ai_status) after processing GUI tasks.
ANTI-SIMPLIFICATION: This verifies the full cross-thread boundary.
"""
app = mock_app
# Mock all ai_client methods called during _handle_request_event
@@ -74,8 +75,9 @@ def test_user_request_integration_flow(mock_app: App) -> None:
@pytest.mark.timeout(10)
def test_user_request_error_handling(mock_app: App) -> None:
"""
Verifies that if ai_client.send raises an exception, the UI is updated with the error state.
"""
Verifies that if ai_client.send raises an exception, the UI is updated with the error state.
"""
app = mock_app
with (
patch('src.ai_client.send', side_effect=Exception("API Failure")),
@@ -129,4 +131,4 @@ def test_api_gui_state_live(live_gui) -> None:
assert success, f"GUI state did not update. Got: {client.get_gui_state()}"
final_state = client.get_gui_state()
assert final_state['current_provider'] == 'anthropic'
assert final_state['current_model'] == 'claude-3-haiku-20240307'
assert final_state['current_model'] == 'claude-3-haiku-20240307'