fix(CI): 修复 GitHub Actions 后端覆盖率门禁误判与 UI 类型检查失败#245
Merged
ThreeFish-AI merged 2 commits intofeature/1.0.0from Mar 13, 2026
Merged
fix(CI): 修复 GitHub Actions 后端覆盖率门禁误判与 UI 类型检查失败#245ThreeFish-AI merged 2 commits intofeature/1.0.0from
ThreeFish-AI merged 2 commits intofeature/1.0.0from
Conversation
pyproject.toml 的 addopts 全局注入了 --cov,导致集成测试和性能 A2B3 试 虽然全部通过但因覆盖率不足 50% 而失败。添加 --no-cov 显式覆盖, 覆盖率门禁仅对单元测试生效。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
1. lib/adk.ts: tool 角色消息处理中 text 变量超出 else 块作用域, 改为调用 extractTextParts() 在使用处提取文本。 2. adk.test.ts: functionResponse 测试数据补充必填的 name 字段, 与 schema.ts 中 adkFunctionResponseSchema 的定义保持一致。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
GitHub Actions 近期所有 CI 运行均失败,涉及 Backend Test Suite 和 UI Test Suite 两条流水线。本 PR 定位并修复了全部代码层面的问题。
修复内容
1. Backend 集成测试与性能测试覆盖率门禁误判
pyproject.toml的addopts全局注入--cov,集成测试 15/15 全部通过但覆盖率仅 25%,触发fail_under=50门禁失败--no-cov,覆盖率门禁仅对单元测试生效.github/workflows/reusable-negentropy-backend-quality.yml2. ADK 消息流标准化器变量作用域错误
lib/adk.ts中text变量在else块内定义(第 278 行),却在外层作用域的 tool 角色消息处理中被引用(第 420 行),导致 TypeScript 编译失败extractTextParts(payload).join("")提取文本apps/negentropy-ui/lib/adk.ts3. 测试数据与 Schema 定义不一致
adkFunctionResponseSchema要求必填name字段,测试数据未同步更新name: "google_search"字段apps/negentropy-ui/tests/unit/lib/adk.test.ts备注:Dependency Review Guard
验证结果
pnpm typecheck通过pnpm typecheck:test通过pnpm test全部 334 个测试通过(59 个文件)🤖 Generated with Claude Code