From 672bd972022eba20a5b880d38620af16488e49d4 Mon Sep 17 00:00:00 2001 From: Cao Hanzhe Date: Thu, 7 May 2026 22:05:54 +0800 Subject: [PATCH 1/3] fix: stop silently swallowing exceptions in forward_incremental The retry loop in forward_incremental was catching all exceptions with a bare 'except Exception: pass', making it impossible to diagnose failures. This collects error messages, logs them when verbose mode is on, and reports failures to the tracer - matching the behavior of forward(). --- .../tagging/action/llm_taging/base.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py b/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py index 8c011b504..e147b655d 100644 --- a/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py +++ b/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py @@ -109,13 +109,26 @@ async def forward_incremental( snapshot: BrowserSnapshot, previous_action_list: list[InteractionAction], ) -> PossibleActionSpace: + errors: list[str] = [] + last_error: Exception | None = None for _ in range(self.max_tries): try: return await self.pipe.forward_incremental(snapshot, previous_action_list) - except Exception: - pass + except Exception as e: + last_error = e + errors.append(str(e)) + if self.verbose: + logger.debug(f"forward_incremental: failed to parse action list but retrying. Start of error msg: {str(e)[:200]}...") if self.verbose: - logger.debug("Failed to get action list after max tries => returning previous action list") + logger.debug( + f"Failed to get incremental action list after {self.max_tries} tries with errors: {errors} => returning previous action list" + ) + self.tracer.trace( + status="failure", + pipe_name=self.pipe.__class__.__name__, + nb_retries=len(errors), + error_msgs=errors, + ) return PossibleActionSpace( # TODO: get description from previous action list description="", From c238a3a0cf8a1d3e64820ffff0aaab0ba4a7e985 Mon Sep 17 00:00:00 2001 From: Cao Hanzhe Date: Sat, 9 May 2026 08:19:55 +0800 Subject: [PATCH 2/3] fix: prefix unused last_error with _ and run ruff format Fixes F841 (unused variable) in forward_incremental and reformats base.py to pass pre-commit ruff hooks. --- .../src/notte_browser/tagging/action/llm_taging/base.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py b/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py index e147b655d..e477147db 100644 --- a/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py +++ b/packages/notte-browser/src/notte_browser/tagging/action/llm_taging/base.py @@ -110,15 +110,17 @@ async def forward_incremental( previous_action_list: list[InteractionAction], ) -> PossibleActionSpace: errors: list[str] = [] - last_error: Exception | None = None + _last_error: Exception | None = None for _ in range(self.max_tries): try: return await self.pipe.forward_incremental(snapshot, previous_action_list) except Exception as e: - last_error = e + _last_error = e errors.append(str(e)) if self.verbose: - logger.debug(f"forward_incremental: failed to parse action list but retrying. Start of error msg: {str(e)[:200]}...") + logger.debug( + f"forward_incremental: failed to parse action list but retrying. Start of error msg: {str(e)[:200]}..." + ) if self.verbose: logger.debug( f"Failed to get incremental action list after {self.max_tries} tries with errors: {errors} => returning previous action list" From 6555c9ec71000e99f2df557c29aa3179292c2cac Mon Sep 17 00:00:00 2001 From: Kral Date: Sun, 10 May 2026 16:04:15 +0800 Subject: [PATCH 3/3] ci: retrigger test suite