Skip to content

Conversation

@fengju0213
Copy link
Collaborator

@fengju0213 fengju0213 commented Nov 22, 2025

Description

The previous stop design was intended to stop the entire workforce, but there was a logical error that caused running tasks not to actually stop.
This PR fixes that issue by correcting the logic so that calling the stop method properly halts the entire workforce.

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTION guide (required)
  • I have linked this PR to an issue using the Development section on the right sidebar or by adding Fixes #issue-number in the PR description (required)
  • I have checked if any dependencies need to be added or updated in pyproject.toml and uv lock
  • I have updated the tests accordingly (required for a bug fix or a new feature)
  • I have updated the documentation if needed:
  • I have added examples if this is a new feature

If you are unsure about any of these, don't hesitate to ask. We are here to help!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 22, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix_workforce_stop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Review Required PR need to be reviewed label Nov 22, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@a7m-1st a7m-1st self-requested a review November 24, 2025 09:59
@fengju0213 fengju0213 changed the title chore: fix_workforce_stop chore: update_workforce_stop_logic Nov 24, 2025
@fengju0213 fengju0213 added this to the Sprint 43 milestone Nov 24, 2025
@fengju0213 fengju0213 self-assigned this Nov 26, 2025
Copy link
Collaborator

@a7m-1st a7m-1st left a comment

Choose a reason for hiding this comment

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

Great handling on the stop and I like to see you implemented the get_in_flight_tasks from #3232. Lastly, is it better to transfer those tasks from task_channel &/ pending_tasks to completed_taks via the _handle_completed_task or clearing them it okay?

Before:
Image

After:
Image

@a7m-1st a7m-1st added the Waiting for Update PR has been reviewed, need to be updated based on review comment label Nov 26, 2025
@fengju0213
Copy link
Collaborator Author

_handle_completed_task

Great handling on the stop and I like to see you implemented the get_in_flight_tasks from #3232. Lastly, is it better to transfer those tasks from task_channel &/ pending_tasks to completed_taks via the _handle_completed_task or clearing them it okay?

Before: Image

After: Image

we should just remove them ,_handle_completed_task is used to handle completed tasks.

@fengju0213
Copy link
Collaborator Author

@a7m-1st thanks for useful comments!

@fengju0213 fengju0213 removed the Waiting for Update PR has been reviewed, need to be updated based on review comment label Nov 27, 2025
@a7m-1st
Copy link
Collaborator

a7m-1st commented Nov 27, 2025

Thanks for your swift actions @fengju0213 !!

Copy link
Collaborator

@waleedalzarooni waleedalzarooni left a comment

Choose a reason for hiding this comment

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

LGTM!

@waleedalzarooni waleedalzarooni merged commit da23060 into master Nov 28, 2025
12 of 13 checks passed
@waleedalzarooni waleedalzarooni deleted the fix_workforce_stop branch November 28, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review Required PR need to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants