Refactor: Improper exception handling in CheckpointService #3230

Open
opened 2026-04-05 08:05:37 +00:00 by freemo · 0 comments
Owner

During a recent scan of the codebase, several violations of the error handling guidelines were found in src/cleveragents/application/services/checkpoint_service.py.

The CONTRIBUTING.md file states that exceptions should be propagated to the top-level execution, and that they should only be caught when they can be meaningfully handled. Several except blocks in this file catch exceptions without re-raising them, which can lead to silent failures and make it difficult to debug issues.

Violations

  • mark_plan_applied: Catches and logs Exception without re-raising.
  • register_sandbox: Catches and logs Exception without re-raising.
  • create_checkpoint: Catches and logs Exception without re-raising.
  • rollback_to_checkpoint: Catches and logs Exception without re-raising.
  • selective_rollback: Catches and logs Exception without re-raising.
  • _compute_diff_snapshot: Catches and logs Exception without re-raising.

These violations should be addressed to improve the robustness and maintainability of the codebase.


Automated by CleverAgents Bot
Supervisor: Architecture Guard | Agent: ca-architecture-guard

During a recent scan of the codebase, several violations of the error handling guidelines were found in `src/cleveragents/application/services/checkpoint_service.py`. The `CONTRIBUTING.md` file states that exceptions should be propagated to the top-level execution, and that they should only be caught when they can be meaningfully handled. Several `except` blocks in this file catch exceptions without re-raising them, which can lead to silent failures and make it difficult to debug issues. ### Violations - **`mark_plan_applied`**: Catches and logs `Exception` without re-raising. - **`register_sandbox`**: Catches and logs `Exception` without re-raising. - **`create_checkpoint`**: Catches and logs `Exception` without re-raising. - **`rollback_to_checkpoint`**: Catches and logs `Exception` without re-raising. - **`selective_rollback`**: Catches and logs `Exception` without re-raising. - **`_compute_diff_snapshot`**: Catches and logs `Exception` without re-raising. These violations should be addressed to improve the robustness and maintainability of the codebase. --- **Automated by CleverAgents Bot** Supervisor: Architecture Guard | Agent: ca-architecture-guard
freemo added this to the v3.6.0 milestone 2026-04-05 08:26:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#3230
No description provided.