Skip to content

[CI] Add unittest Claude skill and supplement unit test coverage#7888

Open
EmmonsCurse wants to merge 1 commit into
PaddlePaddle:developfrom
EmmonsCurse:add_unittest_with_skill
Open

[CI] Add unittest Claude skill and supplement unit test coverage#7888
EmmonsCurse wants to merge 1 commit into
PaddlePaddle:developfrom
EmmonsCurse:add_unittest_with_skill

Conversation

@EmmonsCurse
Copy link
Copy Markdown
Collaborator

Motivation

To improve unit test development efficiency and standardization, a dedicated Claude skill for FastDeploy unittest generation is introduced. In addition, related unit tests need to be supplemented to improve test coverage and validation completeness.

Modifications

  • Added unittest Claude skill documentation and related configurations.
  • Supplemented missing unit test cases.
  • Improved unit test coverage and development workflow consistency.

Usage or Command

N/A

Accuracy Tests

N/A

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented May 21, 2026

Thanks for your contribution!

@EmmonsCurse
Copy link
Copy Markdown
Collaborator Author

/skip-ci ci_iluvatar
/skip-ci ci_hpu
/skip-ci build_xpu
/skip-ci gpu_4cards_test
/skip-ci pre_ce_test
/skip-ci stable_test
/skip-ci base_test
/skip-ci logprob_test

PaddlePaddle-bot

This comment was marked as outdated.

@PaddlePaddle-bot

This comment was marked as outdated.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@91ca3d1). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #7888   +/-   ##
==========================================
  Coverage           ?   77.79%           
==========================================
  Files              ?      396           
  Lines              ?    56001           
  Branches           ?     8769           
==========================================
  Hits               ?    43568           
  Misses             ?     9633           
  Partials           ?     2800           
Flag Coverage Δ
GPU 77.79% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

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

🤖 Paddle-CI-Agent | pr_review | 2026-05-23 19:45:17

📋 Review 摘要

PR 概述:新增 FastDeploy unittest Claude Skill 文档,删除非规范测试脚本,补充约 39 个单测文件以提升覆盖率,同时扩展 .coveragerc omit 规则。
变更范围.claude/skills/(Skill 文档)、scripts/.coveragerctests/(大量新增单测)、fastdeploy/entrypoints/openai/(删除遗留脚本)
影响面 Tag[CI]

问题

级别 文件 概述
🟡 建议 PR 变更量较大(43 文件),建议拆分以降低审查难度和合入风险
❓ 疑问 tests/entrypoints/test_api_server.py test_launch_uvicorn_exception_handled 无任何 assert,仅靠"不抛异常"通过
❓ 疑问 tests/layers/test_fused_moe_marlin_backend.py test_create_weights_scale_shapes 中 up_gate 与 down 两个 scale shape 断言值完全相同 [4, 1, 2048],需确认源码意图

⚠️ 本 PR 变更量较大(43 文件),建议拆分以降低审查难度和合入风险。

建议拆分方案

  • PR 1: [CI] Skill 文档 + coveragerc — .claude/skills/write-fastdeploy-unittest/, scripts/.coveragerc
  • PR 2: [CI] cache_manager / layers / quantization 单测 — tests/cache_manager/, tests/layers/, tests/quantization/
  • PR 3: [CI] worker / model_executor / scheduler / multimodal 单测 — tests/worker/, tests/model_executor/, tests/scheduler/, tests/multimodal/
  • PR 4: [CI] entrypoints / input / inter_communicator / rl 单测 + 遗留脚本清理 — tests/entrypoints/, tests/input/, tests/inter_communicator/, tests/rl/, fastdeploy/entrypoints/openai/test_openai.py

📝 PR 规范检查

PR 结构合规,## Motivation## Modifications## Usage or Command## Accuracy Tests## Checklist 各段均存在且内容完整,标题 Tag [CI] 与 diff 主要影响面(Skill 文档 + CI 脚本 + 单测覆盖)匹配。

总体评价

整体质量较高:Skill 文档结构完整、规范清晰;抽样的 5 个测试文件(test_ipc_cache_transfertest_fused_moe_marlin_backendtest_w8a8test_worker_tbotest_api_server)均有实质性断言,mock 隔离合理,命名符合规范,资源清理到位。存在一处空断言测试(test_launch_uvicorn_exception_handled)和一处 scale shape 断言待确认,建议作者核实后酌情补强,不阻塞合入。

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.

3 participants