OpenBMB / OpenBMB/ChatDev

There is a bug in the break_cycle logic in CodeReview

Open
#387 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
34.3k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

composed_phase.py

class CodeReview(ComposedPhase):
    def break_cycle(self, phase_env) -> bool:
        if "<INFO> Finished".lower() in phase_env['modification_conclusion'].lower():
            return True
        else:
            return False

According to the prompt, " Finished" is only returned during the CodeReviewComment stage, and the conclusion of this stage will be stored in chat_env.env_dict['review_comments']. There seems to be a bug in the current code logic. I believe the correct code should be as follows:

class CodeReview(ComposedPhase):
    def break_cycle(self, phase_env) -> bool:
        # 修复bug,这个标识来自于review_comments
        if "<INFO> Finished".lower() in phase_env['review_comments'].lower():
            return True
        else:
            return False

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open composed_phase.py and inspect CodeReview.break_cycle, especially how phase_env is populated during CodeReviewComment. Verify which field contains the “ Finished” conclusion and confirm that cycle breaking reads review_comments. Done when the logic checks the field identified by the issue and the surrounding workflow still behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.