-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修复QA-Engineer在RunCode(执行用例)结束后,要求Engineer WriteCode(修改代码), Engineer未修改,业务流直接结束的问题 #1267
base: main
Are you sure you want to change the base?
Conversation
when RunCode(for test scripts) fails, it publishes message to Alex(Engineer), Engineer needs to rewrite the code. If we do this, the success rate gets down, thus I extend test_round_allowed from 5 to 20 by default. Signed-off-by: Zhang Bo <bobooscar@gmail.com>
add some logs in case metagpt ends with error, but no message got.
PR Description updated to latest commit (463d2a5)
|
PR Review 🔍
|
PR Code Suggestions ✨
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1267 +/- ##
==========================================
- Coverage 70.22% 70.20% -0.03%
==========================================
Files 316 316
Lines 18860 18867 +7
==========================================
Hits 13245 13245
- Misses 5615 5622 +7 ☔ View full report in Codecov by Sentry. |
async def _handle_bugfix(self, req: Document) -> Message:
# ... bugfix logic ...
await self.repo.docs.save(filename=BUGFIX_FILENAME, content=req.content)
await self.repo.docs.save(filename=REQUIREMENT_FILENAME, content="")
return AIMessage(
content=f"A new issue is received: {BUGFIX_FILENAME}",
cause_by=FixBug,
send_to="Alex", # the name of Engineer
)
if self.config.inc and msg.cause_by in write_plan_and_change_filters:
logger.debug(f"TODO WriteCodePlanAndChange:{msg.model_dump_json()}")
await self._new_code_plan_and_change_action(cause_by=msg.cause_by)
return self.rc.todo |
@@ -148,6 +148,7 @@ async def aask( | |||
message.extend(msg) | |||
logger.debug(message) | |||
rsp = await self.acompletion_text(message, stream=stream, timeout=self.get_timeout(timeout)) | |||
logger.debug(f"llm {rsp=}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些调试用的代码在提交前可以删掉了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
个人觉得llm的回显信息在问题定位(debug级别)还是很重要的,建议保留。(终端显示默认不打印)
好的,感谢! |
User description
Features
修复QA-Engineer在RunCode(执行用例)结束后,要求Engineer WriteCode(修改代码), Engineer未修改,业务流直接结束的问题
Influence
导致过早结束业务流程,Engineer代码有问题而直接结束流程;修复后会增加代码修改流程,增加成功率,但同时会降低完成率。请慎重评估是否合入。
Result
修改后,在QA测试发现原码有问题时,Engineer继续修改代码,进行重试。
PR Type
Bug fix, Enhancement
Description
RunCode
in the actions that can trigger code writing, enhancing the engineer's role responsiveness.Changes walkthrough 📝
base_llm.py
Add Debug Logging for LLM Response
metagpt/provider/base_llm.py
engineer.py
Enhance Logging and Action Handling in Engineer Role
metagpt/roles/engineer.py
RunCode
.gets done.
RunCode
in the set of actions that trigger writing code.qa_engineer.py
Increase QA Engineer Test Rounds Limit
metagpt/roles/qa_engineer.py
role.py
Improve Logging for Role Actions and Decisions
metagpt/roles/role.py