Skip to content

Conversation

uruwhy
Copy link
Contributor

@uruwhy uruwhy commented Oct 10, 2025

Description

  • fix a bug where auto-closed operations with cleanup commands would always show the cleanup commands in a "collected" state, even if the agent completed them and sent the results, until the operation modal was refreshed or the page was reloaded
  • properly set the operation to cleanup state where appropriate and only set it to finished once cleanup has successfully completed

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manually and auto-closed operations and verified cleanup commands were updated accordingly

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Copy link

@deacon-mp deacon-mp requested a review from Copilot October 14, 2025 16:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in operation state management where auto-closed operations with cleanup commands would incorrectly display cleanup commands in a "collected" state instead of updating properly as the agent executed them. The fix ensures operations transition to the cleanup state when cleanup commands are present and only mark as finished after cleanup completes successfully.

  • Modified the is_closeable() method to remove premature state setting to "finished"
  • Updated _cleanup_operation() to properly set operation state to "cleanup" when cleanup commands exist
  • Added logging to track cleanup start and completion

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/objects/c_operation.py Modified operation state management logic and added cleanup logging
tests/objects/test_operation.py Added test fixture for planning service and test case to verify cleanup state behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@deacon-mp deacon-mp merged commit 54dd264 into master Oct 14, 2025
13 checks passed
@deacon-mp deacon-mp deleted the fix-operation-status branch October 14, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants