fix(tests): Resolve access violation in phase4 tests and auto-approval logic in cli integration tests
This commit is contained in:
8
gui_2.py
8
gui_2.py
@@ -325,6 +325,7 @@ class App:
|
||||
self.is_viewing_prior_session = False
|
||||
self.prior_session_entries: list[dict[str, Any]] = []
|
||||
self.test_hooks_enabled = ("--enable-test-hooks" in sys.argv) or (os.environ.get("SLOP_TEST_HOOKS") == "1")
|
||||
self.ui_manual_approve = False
|
||||
self.perf_monitor = PerformanceMonitor()
|
||||
self.perf_history = {"frame_time": [0.0]*100, "fps": [0.0]*100, "cpu": [0.0]*100, "input_lag": [0.0]*100}
|
||||
self._perf_last_update = 0.0
|
||||
@@ -421,7 +422,8 @@ class App:
|
||||
'mma_status': 'mma_status',
|
||||
'mma_active_tier': 'active_tier',
|
||||
'ui_new_track_name': 'ui_new_track_name',
|
||||
'ui_new_track_desc': 'ui_new_track_desc'
|
||||
'ui_new_track_desc': 'ui_new_track_desc',
|
||||
'manual_approve': 'ui_manual_approve'
|
||||
}
|
||||
self._clickable_actions: dict[str, Callable[..., Any]] = {
|
||||
'btn_reset': self._handle_reset_session,
|
||||
@@ -1424,8 +1426,8 @@ class App:
|
||||
|
||||
def _confirm_and_run(self, script: str, base_dir: str, qa_callback: Optional[Callable[[str], str]] = None) -> str | None:
|
||||
print(f"[DEBUG] _confirm_and_run triggered for script length: {len(script)}")
|
||||
if self.test_hooks_enabled:
|
||||
print(f"[DEBUG] test_hooks_enabled is True; AUTO-APPROVING script execution in {base_dir}")
|
||||
if self.test_hooks_enabled and not getattr(self, "ui_manual_approve", False):
|
||||
print(f"[DEBUG] test_hooks_enabled is True and ui_manual_approve is False; AUTO-APPROVING script execution in {base_dir}")
|
||||
self.ai_status = "running powershell..."
|
||||
output = shell_runner.run_powershell(script, base_dir, qa_callback=qa_callback)
|
||||
self._append_tool_log(script, output)
|
||||
|
||||
Reference in New Issue
Block a user