Skip to content

refactor(agent): 提取共享工具函数至utils模块#3

Merged
Eleven-Mouse merged 2 commits into
mainfrom
为测试添加环境变量设置支持
May 5, 2026

Hidden character warning

The head ref may contain hidden characters: "\u4e3a\u6d4b\u8bd5\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u652f\u6301"
Merged

refactor(agent): 提取共享工具函数至utils模块#3
Eleven-Mouse merged 2 commits into
mainfrom
为测试添加环境变量设置支持

Conversation

@Eleven-Mouse
Copy link
Copy Markdown
Owner

  • 将create_llm与load_prompt函数从pipeline_orchestrator中移动至app.agent.utils模块
  • 更新多个模块导入路径以使用新的utils中的方法
  • 修改docker-compose.yml中webhook服务器端口为8090
  • 使用清华镜像源安装python依赖提升安装速度
  • 清理pipeline_orchestrator中的冗余代码,简化结构

- 将create_llm与load_prompt函数从pipeline_orchestrator中移动至app.agent.utils模块
- 更新多个模块导入路径以使用新的utils中的方法
- 修改docker-compose.yml中webhook服务器端口为8090
- 使用清华镜像源安装python依赖提升安装速度
- 清理pipeline_orchestrator中的冗余代码,简化结构
- 在ReviewOrchestratorTest、ReviewOrchestratorProcessAsyncTest中添加@beforeeach方法
- 实现setEnvironmentVariable方法,用反射操作系统环境变量以支持测试
- 解决测试中因缺少环境变量DIFFGUARD_GITHUB_TOKEN导致的问题

fix(cli): 修正DiffGuardMain执行返回码逻辑

- execute方法中返回执行命令的exitCode或主程序exitCode,保证异常码正确传递

fix(persistence): 修正PreparedStatement参数匹配断言

- 使用eq匹配参数位置,避免参数匹配时因谓词冲突导致的问题

fix(domain): 调整ASTProviderRegistryTest中mock Provider语言类型

- 将测试中的Python Provider改为Rust Provider,修正语言标识符

fix(domain): 调整GetCallGraphToolTest断言中的输出匹配

- 改为匹配简化的handle或process方法名,提高断言稳定性

fix(infrastructure): 优化BatchReviewExecutor处理空prompts逻辑

- 当prompts为空时直接返回结果,避免无意义的异步调用

fix(infrastructure): PromptLoader增加空路径处理

- 防御性编程处理resourcePath为null或空字符串时返回默认fallback内容

fix(infrastructure): ReviewTaskMessage.extractTaskId增强空输入检查

- 处理data为null或空数组返回null,避免异常或返回空字符串

test(infrastructure): 校正ConfigLoaderTest中LLM provider断言

- 将provider断言由openai改为claude,匹配application.yml最新配置

test(infrastructure): 调整PromptBuilderTest断言内容

- 修改部分断言用False替代True,避免不合理的语言匹配断言

fix(domain): 规则引擎测试中SQL注入规则条件字符串调整

- 调整测试用例中SQL字符串拼接样式,匹配最新规则定义逻辑

fix(cli): UninstallCommandTest中自定义hook脚本内容更新

- 修改hook脚本注释内容,更准确反映自定义脚本用途

chore(docker): 在Dockerfile中新增CMD命令

- 增加默认启动命令CMD ["server"],补充ENTRYPOINT功能
@Eleven-Mouse Eleven-Mouse reopened this May 5, 2026
@Eleven-Mouse Eleven-Mouse reopened this May 5, 2026
@Eleven-Mouse Eleven-Mouse reopened this May 5, 2026
@Eleven-Mouse Eleven-Mouse merged commit a443621 into main May 5, 2026
0 of 4 checks passed
@Eleven-Mouse Eleven-Mouse deleted the 为测试添加环境变量设置支持 branch May 5, 2026 16:24
@Eleven-Mouse Eleven-Mouse restored the 为测试添加环境变量设置支持 branch May 5, 2026 16:27
@Eleven-Mouse Eleven-Mouse deleted the 为测试添加环境变量设置支持 branch May 5, 2026 17:43
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.

1 participant